-
Notifications
You must be signed in to change notification settings - Fork 33
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
TAN-3444 - Prevent custom form saving if updated more recently in another browser window #9888
base: master
Are you sure you want to change the base?
Conversation
|
…ng' into TAN-3444-improve-form-save-logging
%i[options options.image map_config] | ||
super + %i[map_config] |
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.
Just tidying up this
@@ -63,14 +63,15 @@ def as_geojson | |||
|
|||
def update_all | |||
authorize CustomField.new(resource: @custom_form), :update_all?, policy_class: IdeaCustomFieldPolicy | |||
@participation_method = @custom_form.participation_context.pmethod |
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.
Did not need setting as a global variable
triggerAutosave && | ||
autosaveEnabled && | ||
totalSubmissions === 0 && | ||
isDirty |
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.
Added this to prevent it saving when there are no changes
import { CustomFormKeys, ICustomForm, ICustomFormParameters } from './types'; | ||
|
||
const fetchCustomForm = ({ projectId, phaseId }: ICustomFormParameters) => { | ||
const apiEndpoint = phaseId |
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.
I think for surveys, we will always have a phaseId 🤔. But this might also be in other places so we could probably enforce it separately in another ticket.
How this works:
Changelog
Changed
Technical