VRMS icon indicating copy to clipboard operation
VRMS copied to clipboard

Update default form values for Edit on Save so that `Unsaved Changes` is triggered

Open trillium opened this issue 1 year ago • 6 comments

Reference #1566

Overview

When Save is pressed, tell the system that the new current baseline for the fields is the saved state. This prevents the You have unsaved changes box from popping up

Action Items

  • [x] When Save is triggered, update the form to use the updated values as the current validation for Close/Save
  • [x] Also potentially get the info back from the db and update the form with the new data.
  • [x] QA
  • [ ] When complete, go to #1598 and mark the checkbox referencing this issue as complete.
  • [ ] Once this issue is complete, #1574 can be moved from the Icebox back to the top of the Priority Backlog and the Dependency label can be removed.

trillium avatar Feb 06 '24 03:02 trillium

@josiehandeveloper Please provide update:

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures or links* (if necessary): "Add any pictures or links that will help illustrate what you are working on."
  • remember to add links to the top of the issue if they are going to be needed again.

JackHaeg avatar Mar 05 '24 03:03 JackHaeg

https://github.com/hackforla/VRMS/assets/63170710/717dbc38-f4d7-4dc6-b527-480e2780c1bf

Blockers: I can't seem to recreate the issue

josiehandeveloper avatar Mar 12 '24 01:03 josiehandeveloper

@josiehandeveloper typically, after editing an event > clicking "save" > click "close" and the You have unsaved changes box pops up (despite already saving one's edits). Please try the same process and then click "close" to replicate the issue.

JackHaeg avatar Mar 12 '24 01:03 JackHaeg

@josiehandeveloper See attached (recreated the issue on Dev)

https://github.com/hackforla/VRMS/assets/134463646/5a4601f9-f5f8-483d-b1cd-4f29321c9c9b

JackHaeg avatar Mar 12 '24 01:03 JackHaeg

So I made some changes now after you hit save and then close you don't have the popup, but even when you click edit mode even if you don't make changes the popup comes up

https://github.com/hackforla/VRMS/assets/63170710/cac8cf7d-c613-4705-ab2e-2b73f555abfd

josiehandeveloper avatar Mar 18 '24 23:03 josiehandeveloper

New fix for close button bug, committed to my last PR

https://github.com/hackforla/VRMS/assets/63170710/8e0c8917-4212-41b6-bddf-719ffe25014d

josiehandeveloper avatar Mar 19 '24 03:03 josiehandeveloper