@overmap-ai/core 1.0.50 → 1.0.51-add-submitted-at-to-form-revisions.1

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.
@@ -6815,13 +6815,14 @@ var __publicField = (obj, key, value) => {
6815
6815
  };
6816
6816
  const currentUser = state.userReducer.currentUser;
6817
6817
  const activeWorkspaceId = state.workspaceReducer.activeWorkspaceId;
6818
+ const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
6818
6819
  const offlineFormPayload = offline({});
6819
- const offlineRevisionPayload = offline(initialRevision);
6820
+ const offlineRevisionPayload = offline({ ...initialRevision, submitted_at: submittedAt });
6820
6821
  const retForm = {
6821
6822
  ...offlineFormPayload,
6822
6823
  index_workspace: activeWorkspaceId,
6823
6824
  favorite: true,
6824
- submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
6825
+ submitted_at: submittedAt,
6825
6826
  created_by: currentUser.id,
6826
6827
  ...componentTypeId && { component_type: componentTypeId },
6827
6828
  ...ownerAttrs
@@ -6831,7 +6832,8 @@ var __publicField = (obj, key, value) => {
6831
6832
  ...payloadWithoutImage,
6832
6833
  created_by: currentUser.id,
6833
6834
  form: retForm.offline_id,
6834
- revision: 0
6835
+ revision: 0,
6836
+ submitted_at: submittedAt
6835
6837
  };
6836
6838
  const { store } = this.client;
6837
6839
  store.dispatch(addUserForm(retForm));
@@ -6894,7 +6896,8 @@ var __publicField = (obj, key, value) => {
6894
6896
  ...payloadWithoutImage,
6895
6897
  created_by: currentUserId,
6896
6898
  revision: "Pending",
6897
- form: formId2
6899
+ form: formId2,
6900
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString()
6898
6901
  };
6899
6902
  store.dispatch(addUserFormRevision(fullRevision));
6900
6903
  const promise = this.enqueueRequest({