@overmap-ai/core 1.0.63-form-submission-fix.2 → 1.0.63-form-submission-fix.4

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.
@@ -2582,8 +2582,10 @@ var __publicField = (obj, key, value) => {
2582
2582
  ],
2583
2583
  (issues, forms, formRevisions, submissions, issueId) => {
2584
2584
  const issue = issues[issueId];
2585
- if (!issue || !issue.issue_type) {
2585
+ if (!issue)
2586
2586
  return [];
2587
+ if (!issue.issue_type) {
2588
+ return Object.values(submissions).filter((submission) => submission.issue === issueId);
2587
2589
  }
2588
2590
  const issueTypeForms = new Set(
2589
2591
  Object.keys(forms).filter((formId) => forms[formId].issue_type === issue.issue_type)
@@ -2638,8 +2640,10 @@ var __publicField = (obj, key, value) => {
2638
2640
  ],
2639
2641
  (assets, forms, formRevisions, submissions, assetId) => {
2640
2642
  const asset = assets[assetId];
2641
- if (!asset || !asset.asset_type) {
2643
+ if (!asset)
2642
2644
  return [];
2645
+ if (!asset.asset_type) {
2646
+ return Object.values(submissions).filter((submission) => submission.asset === assetId);
2643
2647
  }
2644
2648
  const issueTypeForms = new Set(
2645
2649
  Object.keys(forms).filter((formId) => forms[formId].asset_type === asset.asset_type)
@@ -5523,6 +5527,7 @@ var __publicField = (obj, key, value) => {
5523
5527
  const attachmentPayload = {
5524
5528
  offline_id: offlineFormRevisionAttachment.offline_id,
5525
5529
  name: file.name,
5530
+ field_identifier: fieldIdentifier,
5526
5531
  sha1
5527
5532
  };
5528
5533
  attachmentPayloads.push(attachmentPayload);
@@ -5878,7 +5883,8 @@ var __publicField = (obj, key, value) => {
5878
5883
  const attachmentPayload = {
5879
5884
  offline_id: offlineFormSubmissionAttachment.offline_id,
5880
5885
  name: file.name,
5881
- sha1
5886
+ sha1,
5887
+ field_identifier: fieldIdentifier
5882
5888
  };
5883
5889
  attachmentPayloads.push(attachmentPayload);
5884
5890
  }