VRMS
VRMS copied to clipboard
Update default form values for Edit on Save so that `Unsaved Changes` is triggered
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.
@josiehandeveloper Please provide update:
- Progress: "What is the current status of your project? What have you completed and what is left to do?"
- Blockers: "Difficulties or errors encountered."
- Availability: "How much time will you have this week to work on this issue?"
- ETA: "When do you expect this issue to be completed?"
- 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.
https://github.com/hackforla/VRMS/assets/63170710/717dbc38-f4d7-4dc6-b527-480e2780c1bf
Blockers: I can't seem to recreate the issue
@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.
@josiehandeveloper See attached (recreated the issue on Dev)
https://github.com/hackforla/VRMS/assets/134463646/5a4601f9-f5f8-483d-b1cd-4f29321c9c9b
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
New fix for close button bug, committed to my last PR
https://github.com/hackforla/VRMS/assets/63170710/8e0c8917-4212-41b6-bddf-719ffe25014d