Prevent loss of unsaved model configuration changes - #63
Open
utsinboots wants to merge 1 commit into
Open
Conversation
(cherry picked from commit c44061e8e9304844831ead78fc8be6b426e0455f)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What it changes:
-Adds NavigationGuard.Class.js to prevent users from leaving model configuration with unsaved changes.
-Adds one confirmation-dialog method to Message.Class.js.
-Refactors existing model-data collection in AddCase.js into a helper.
-Adds a guard around the existing hash-based navigation in Routes.Class.js.
-Does not change the backend, API endpoints, stored JSON format, model schema, or simulation workflow.
What it does:
-Warns users before leaving Model Configuration with unsaved changes.
-Supports saving or discarding changes before navigating.
-Covers page navigation, model selection, creating a new model, and browser reload or close.
Testing
-Verified that navigation without changes proceeds normally.
-Verified that unsaved changes trigger a confirmation prompt.
-Verified the Save and Don't save actions.
-Verified model selection, new model, browser navigation, and page reload behavior.