bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 59 forks source link

Filings UI: The "Unsaved Changes" pop-up appears even when the user resets the filing to its original state. #24619

Open riyazuddinsyed opened 2 days ago

riyazuddinsyed commented 2 days ago

Describe the bug in the current situation

When a user makes changes to filings, such as COD/COA, and then reverts those changes, leaving the filing in its original state, clicking "Cancel" still triggers a pop-up warning that unsaved changes will be lost. This behavior is unexpected since the filing has been restored to its original state.

Steps to reproduce the behavior:

  1. Go to 'https://test.business.bcregistry.gov.bc.ca/BC1156192/'
  2. Start a COA/COD filing.
  3. Make some changes and revert those.
  4. Now click on Cancel.
  5. Observe that the Unsaved Changes Pop-Up shows up.

Screenshots/ Visual Reference/ Source

Private Zenhub Video

severinbeauvais commented 1 day ago

The reason for this is the way "unsaved changed" functionality is implemented -- the user has made changes, and undoing them doesn't clear the flag.

This could be better, but Mihai and Jacqueline believe the user will figure this out and click "exit".

severinbeauvais commented 1 day ago

This change should apply to all local filings.