@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.
package/dist/overmap-core.js
CHANGED
|
@@ -2594,8 +2594,10 @@ const selectAttachedFormSubmissionsOfIssue = restructureCreateSelectorWithArgs(
|
|
|
2594
2594
|
],
|
|
2595
2595
|
(issues, forms, formRevisions, submissions, issueId) => {
|
|
2596
2596
|
const issue = issues[issueId];
|
|
2597
|
-
if (!issue
|
|
2597
|
+
if (!issue)
|
|
2598
2598
|
return [];
|
|
2599
|
+
if (!issue.issue_type) {
|
|
2600
|
+
return Object.values(submissions).filter((submission) => submission.issue === issueId);
|
|
2599
2601
|
}
|
|
2600
2602
|
const issueTypeForms = new Set(
|
|
2601
2603
|
Object.keys(forms).filter((formId) => forms[formId].issue_type === issue.issue_type)
|
|
@@ -2650,8 +2652,10 @@ const selectAttachedFormSubmissionsOfAsset = restructureCreateSelectorWithArgs(
|
|
|
2650
2652
|
],
|
|
2651
2653
|
(assets, forms, formRevisions, submissions, assetId) => {
|
|
2652
2654
|
const asset = assets[assetId];
|
|
2653
|
-
if (!asset
|
|
2655
|
+
if (!asset)
|
|
2654
2656
|
return [];
|
|
2657
|
+
if (!asset.asset_type) {
|
|
2658
|
+
return Object.values(submissions).filter((submission) => submission.asset === assetId);
|
|
2655
2659
|
}
|
|
2656
2660
|
const issueTypeForms = new Set(
|
|
2657
2661
|
Object.keys(forms).filter((formId) => forms[formId].asset_type === asset.asset_type)
|
|
@@ -5535,6 +5539,7 @@ class FormService extends BaseUploadService {
|
|
|
5535
5539
|
const attachmentPayload = {
|
|
5536
5540
|
offline_id: offlineFormRevisionAttachment.offline_id,
|
|
5537
5541
|
name: file.name,
|
|
5542
|
+
field_identifier: fieldIdentifier,
|
|
5538
5543
|
sha1
|
|
5539
5544
|
};
|
|
5540
5545
|
attachmentPayloads.push(attachmentPayload);
|
|
@@ -5890,7 +5895,8 @@ class FormSubmissionService extends BaseUploadService {
|
|
|
5890
5895
|
const attachmentPayload = {
|
|
5891
5896
|
offline_id: offlineFormSubmissionAttachment.offline_id,
|
|
5892
5897
|
name: file.name,
|
|
5893
|
-
sha1
|
|
5898
|
+
sha1,
|
|
5899
|
+
field_identifier: fieldIdentifier
|
|
5894
5900
|
};
|
|
5895
5901
|
attachmentPayloads.push(attachmentPayload);
|
|
5896
5902
|
}
|