-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added fix for timeout on autorecover [B:1361] #513
Added fix for timeout on autorecover [B:1361] #513
Conversation
droberts-ctrlo
commented
Jan 31, 2025
- Added a record identifier to the session
- Removed clear from the save button code (we want the data cleared on successful submission)
- Created a new Alert component that checks for the data attribute that contains the record ID, and clears the data using that if it's present
- Added data attribute to the message_center view
- Added a record identifier to the session - Removed clear from the save button code (we want the data cleared on successful submission) - Created a new Alert component that checks for the data attribute that contains the record ID, and clears the data using that if it's present - Added data attribute to the message_center view
Despite me saying that this should go in the alert, I think that actually on reflection it can be kept separate (I was originally thinking that using the alert was the only way of keeping it persistent across requests). I think that actually you should set a session variable on successful submit (as you are doing), but instead it should be a more generic variable (e.g. As such, I think it should be rendered for all pages, not just the data page. Finally, having seen the complicated code needed for removing all the required fields, I am wondering if we can change the data structure of the local storage, having a way of grouping all fields together for one instance, so that they can be easily deleted rather than needing to loop through and find each one. |
- Removed the `alert` component - Moved the session variable for the updated record into a new variable to - promote extensibility - enable other actions to be added as required for other purposes in future - Promote extensible handlers - Added a JS handler implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Dave, just some minor comments for consideration
Also added unit tests for clearAutoRecover and renamed file appropriately