-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fixed autosave from triggering on empty forms #195
Conversation
22a65f7
to
da2ed8b
Compare
frontend/src/components/housing/submission/SubmissionIntakeForm.vue
Outdated
Show resolved
Hide resolved
Looking almost perfect! I did have one weird thing where I didn't fill out the Address section, clicked Submit and the validation occurred telling me I forgot that field...I stopped to read the red error message and it all of a sudden auto-saved and the validation went away...but I couldn't make it happen again! But I did find one error...go back and fill out the address/coordinates and click Submit and I get an Axios Error 422 (Failed to save intake) after clicking Yes to submitting so I couldn't actually submit my submission. |
da2ed8b
to
ef806df
Compare
async function generateActivityId() { | ||
try { | ||
const response = await submissionService.updateDraft({}); | ||
if (response.data?.activityId && response.data?.submissionId) { | ||
emit('activityGenerated', response.data.activityId, response.data.submissionId); | ||
return response.data.activityId; | ||
} else { | ||
return undefined; | ||
} | ||
} catch (error) { | ||
toast.error('Failed to generate activity ID'); | ||
return undefined; | ||
} | ||
} | ||
|
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.
This is a lot of logic unrelated to file uploading. Can this be moved to the intake form?
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.
done
ef806df
to
e10bdc8
Compare
e10bdc8
to
37e97ba
Compare
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.
Approving as is. Changes will have to be made to this due to the new draft saving functionality happening in another branch.
Description
When changing steps in the submission intake form autosave is no longer triggered, onBlur for phone number doesn't trigger autosave anymore, and no more double autosave on initial save of draft.
Keeps empty drafts from cluttering the draft and submissions table.
PADS-337
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist