@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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @overmap-ai/core
2
-
3
- The `core` package contains core functionality for the Overmap platform. It is a peer dependency of all other overmap
4
- packages.
1
+ # @overmap-ai/core
2
+
3
+ The `core` package contains core functionality for the Overmap platform. It is a peer dependency of all other overmap
4
+ packages.
@@ -6824,13 +6824,14 @@ class UserFormService extends BaseApiService {
6824
6824
  };
6825
6825
  const currentUser = state.userReducer.currentUser;
6826
6826
  const activeWorkspaceId = state.workspaceReducer.activeWorkspaceId;
6827
+ const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
6827
6828
  const offlineFormPayload = offline({});
6828
- const offlineRevisionPayload = offline(initialRevision);
6829
+ const offlineRevisionPayload = offline({ ...initialRevision, submitted_at: submittedAt });
6829
6830
  const retForm = {
6830
6831
  ...offlineFormPayload,
6831
6832
  index_workspace: activeWorkspaceId,
6832
6833
  favorite: true,
6833
- submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
6834
+ submitted_at: submittedAt,
6834
6835
  created_by: currentUser.id,
6835
6836
  ...componentTypeId && { component_type: componentTypeId },
6836
6837
  ...ownerAttrs
@@ -6840,7 +6841,8 @@ class UserFormService extends BaseApiService {
6840
6841
  ...payloadWithoutImage,
6841
6842
  created_by: currentUser.id,
6842
6843
  form: retForm.offline_id,
6843
- revision: 0
6844
+ revision: 0,
6845
+ submitted_at: submittedAt
6844
6846
  };
6845
6847
  const { store } = this.client;
6846
6848
  store.dispatch(addUserForm(retForm));
@@ -6903,7 +6905,8 @@ class UserFormService extends BaseApiService {
6903
6905
  ...payloadWithoutImage,
6904
6906
  created_by: currentUserId,
6905
6907
  revision: "Pending",
6906
- form: formId2
6908
+ form: formId2,
6909
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString()
6907
6910
  };
6908
6911
  store.dispatch(addUserFormRevision(fullRevision));
6909
6912
  const promise = this.enqueueRequest({