@overmap-ai/core 1.0.62-store-clear-fixes.6 → 1.0.63-form-submission-fix.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5859,12 +5859,12 @@ var __publicField = (obj, key, value) => {
|
|
|
5859
5859
|
throw new Error("Expected an active project");
|
|
5860
5860
|
}
|
|
5861
5861
|
const { values, files } = separateFilesFromValues(payload.values);
|
|
5862
|
-
const offlineSubmission = {
|
|
5862
|
+
const offlineSubmission = offline({
|
|
5863
5863
|
...payload,
|
|
5864
5864
|
values,
|
|
5865
5865
|
created_by: state.userReducer.currentUser.id,
|
|
5866
5866
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
5867
|
-
};
|
|
5867
|
+
});
|
|
5868
5868
|
const promise = this.enqueueRequest({
|
|
5869
5869
|
description: "Respond to form",
|
|
5870
5870
|
method: HttpMethod.POST,
|
|
@@ -5873,7 +5873,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5873
5873
|
blockers: [payload.issue, payload.asset, payload.asset_stage, "add-form-entry"].filter(
|
|
5874
5874
|
(x) => x !== void 0
|
|
5875
5875
|
),
|
|
5876
|
-
blocks: [
|
|
5876
|
+
blocks: [offlineSubmission.offline_id]
|
|
5877
5877
|
});
|
|
5878
5878
|
const attachFilesPromises = this.getAttachFilesPromises(files, offlineSubmission);
|
|
5879
5879
|
this.dispatch(addFormSubmission(offlineSubmission));
|
|
@@ -5882,7 +5882,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5882
5882
|
this.dispatch(setFormSubmission(result));
|
|
5883
5883
|
return result;
|
|
5884
5884
|
}).catch(() => {
|
|
5885
|
-
this.dispatch(deleteFormSubmission(
|
|
5885
|
+
this.dispatch(deleteFormSubmission(offlineSubmission.offline_id));
|
|
5886
5886
|
this.dispatch(addActiveProjectFormSubmissionsCount(-1));
|
|
5887
5887
|
});
|
|
5888
5888
|
const settledPromise = Promise.all([promise, ...attachFilesPromises]).then(() => promise);
|