ephios-dev / ephios

ephios is a django web application for managing participation for services at events, like paramedics at a festival, lifeguards at the beach, referees and judges at competitions, etc.
https://ephios.de
MIT License
26 stars 8 forks source link

Edit and delete buttons in shift creation/edit view discard unsaved changes #1353

Open lukasrad02 opened 2 months ago

lukasrad02 commented 2 months ago

Describe the bug When I add or edit multiple shifts of an event and thus use the "Edit" link in the right sidebar, changes made to the current shift are not saved.

To Reproduce Steps to reproduce the behavior:

  1. Create a new event with settings of your choice.
  2. Add two shifts to the event, again with settings of your choice
  3. Save the event including the two shifts
  4. Notice that some settings on both shifts are not correct. For example, you specified the wrong meetup time
  5. In the event view, click the "Edit" menu entry of the first shift
  6. Change the meetup time for the current shift
  7. Click the "Edit" link of the other shift and change the meetup time there too
  8. Scroll down and click "Save".
  9. Observe the event view. Only the second shift has the new meetup time.

Expected behavior Both shifts should have the new meetup time applied OR clicking the edit link (step 7) should warn about unsaved changes.

I would prefer the first option as this would make bulk-editing of shifts much easier than selecting, editing and saving each shift on its own. A similar result could be achieved if the current shift would have an additional "Save" link that (in contrast to the save button at the bottom of the page) does not leave the edit view, combined with the warning on the "Edit" link if the current changes have not been changed.

Screenshots Example screenshot after step 6. Notice that the meetup time has been changed (old value can be seen in sidebar). Clicking "Edit" in the sidebar would discard this change. Saving this change would require the user to scroll down to the button of the page and additionally would leave the edit view.

Screenshot of ephios "Edit shift" view

Environment Ephios 0.16.6 as well as latest main branch.

Additional context Clicking any of the "Delete" links or the "Edit" link of the event in step 7 causes the same behavior.

jeriox commented 2 months ago

related to #280