@overmap-ai/core 1.0.38-component-fields.22 → 1.0.38-component-fields.24
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.
|
@@ -5759,10 +5759,12 @@ var __publicField = (obj, key, value) => {
|
|
|
5759
5759
|
blocks: [payload.offline_id]
|
|
5760
5760
|
});
|
|
5761
5761
|
const attachFilesPromises = this.getAttachFilesPromises(files, payload);
|
|
5762
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
5762
5763
|
const fullOfflineResult = {
|
|
5763
5764
|
...payload,
|
|
5764
5765
|
created_by: state.userReducer.currentUser.id,
|
|
5765
|
-
created_at:
|
|
5766
|
+
created_at: now,
|
|
5767
|
+
updated_at: now
|
|
5766
5768
|
};
|
|
5767
5769
|
const offlineResultWithoutFiles = {
|
|
5768
5770
|
...fullOfflineResult,
|
|
@@ -5785,16 +5787,18 @@ var __publicField = (obj, key, value) => {
|
|
|
5785
5787
|
throw new Error("Expected payloadWithoutFiles to have created_by and created_at fields.");
|
|
5786
5788
|
}
|
|
5787
5789
|
const attachFilesPromises = this.getAttachFilesPromises(files, submission);
|
|
5788
|
-
|
|
5790
|
+
const fullResult = {
|
|
5791
|
+
...payloadWithoutFiles,
|
|
5792
|
+
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
5793
|
+
};
|
|
5794
|
+
store.dispatch(updateOrCreateUserFormSubmission(fullResult));
|
|
5789
5795
|
const promise = this.enqueueRequest({
|
|
5790
5796
|
description: "Patch form submission",
|
|
5791
5797
|
method: HttpMethod.PATCH,
|
|
5792
5798
|
url: `/forms/submissions/${submission.offline_id}/`,
|
|
5793
|
-
payload:
|
|
5794
|
-
blockers: [
|
|
5795
|
-
|
|
5796
|
-
),
|
|
5797
|
-
blocks: [payloadWithoutFiles.offline_id]
|
|
5799
|
+
payload: fullResult,
|
|
5800
|
+
blockers: [fullResult.issue, fullResult.component].filter((x) => x !== void 0),
|
|
5801
|
+
blocks: [fullResult.offline_id]
|
|
5798
5802
|
});
|
|
5799
5803
|
return Promise.all([promise, ...attachFilesPromises]).then(() => promise);
|
|
5800
5804
|
}
|
|
@@ -10345,6 +10349,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10345
10349
|
} = props;
|
|
10346
10350
|
const { readonly } = schema.meta;
|
|
10347
10351
|
const formId2 = React.useMemo(() => crypto.randomUUID(), []);
|
|
10352
|
+
console.log(initialFormValues(schema.fields, values));
|
|
10348
10353
|
const formik$1 = formik.useFormik({
|
|
10349
10354
|
initialValues: initialFormValues(schema.fields, values),
|
|
10350
10355
|
onSubmit,
|