issue fixed
This commit is contained in:
parent
b75950b0d6
commit
3311e51e5c
@ -621,9 +621,8 @@ if (!establishment) {
|
|||||||
response = await submitSurvey(payload);
|
response = await submitSurvey(payload);
|
||||||
|
|
||||||
// Update local storage with the new submission ID if this was a create operation
|
// Update local storage with the new submission ID if this was a create operation
|
||||||
if (response && response.id) {
|
if (response && response.submission_data) {
|
||||||
const updatedSubmission = { ...currentSubmission, id: response.id };
|
localStorage.setItem('currentSubmission', JSON.stringify(response.submission_data));
|
||||||
localStorage.setItem('currentSubmission', JSON.stringify(updatedSubmission));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
alert('Draft saved successfully')
|
alert('Draft saved successfully')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user