@overmap-ai/core 1.0.38-component-fields.36 → 1.0.38-component-fields.38
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
|
@@ -1737,6 +1737,21 @@ const selectStagesFromStageIds = restructureCreateSelectorWithArgs(
|
|
|
1737
1737
|
return stageIds.map((offline_id) => stageMapping[offline_id]).filter((stage) => !!stage);
|
|
1738
1738
|
})
|
|
1739
1739
|
);
|
|
1740
|
+
const selectStageFormIdsFromStageIds = restructureCreateSelectorWithArgs(
|
|
1741
|
+
createSelector([selectStageMapping, (_state, stageIds) => stageIds], (stageMapping, stageIds) => {
|
|
1742
|
+
const ret = {};
|
|
1743
|
+
for (const stageId of stageIds) {
|
|
1744
|
+
const stage = stageMapping[stageId];
|
|
1745
|
+
if (!stage) {
|
|
1746
|
+
throw new Error("No stage exists with the id " + stageId);
|
|
1747
|
+
}
|
|
1748
|
+
if (stage.user_form) {
|
|
1749
|
+
ret[stageId] = stage.user_form;
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
return ret;
|
|
1753
|
+
})
|
|
1754
|
+
);
|
|
1740
1755
|
const { addStages, updateStages, removeStages, linkStageToForm, unlinkStageToForm } = componentStageSlice.actions;
|
|
1741
1756
|
const componentStageReducer = componentStageSlice.reducer;
|
|
1742
1757
|
const initialState$g = {
|
|
@@ -5725,7 +5740,7 @@ class UserFormSubmissionService extends BaseApiService {
|
|
|
5725
5740
|
method: HttpMethod.POST,
|
|
5726
5741
|
url: `/forms/submission/${payload.offline_id}/attachments/`,
|
|
5727
5742
|
payload: submissionAttachmentPayload,
|
|
5728
|
-
blockers: [payload.component, payload.issue, payload.form_revision].filter(
|
|
5743
|
+
blockers: [payload.component, payload.component_stage, payload.issue, payload.form_revision].filter(
|
|
5729
5744
|
(x) => x !== void 0
|
|
5730
5745
|
),
|
|
5731
5746
|
blocks: [submissionAttachmentPayload.offline_id]
|
|
@@ -5754,7 +5769,9 @@ class UserFormSubmissionService extends BaseApiService {
|
|
|
5754
5769
|
method: HttpMethod.POST,
|
|
5755
5770
|
url: `/forms/revisions/${payload.form_revision}/respond/`,
|
|
5756
5771
|
payload: { ...payloadWithoutFiles, project: activeProjectId },
|
|
5757
|
-
blockers: [payload.issue, payload.component].filter(
|
|
5772
|
+
blockers: [payload.issue, payload.component, payload.component_stage].filter(
|
|
5773
|
+
(x) => x !== void 0
|
|
5774
|
+
),
|
|
5758
5775
|
blocks: [payload.offline_id]
|
|
5759
5776
|
});
|
|
5760
5777
|
const attachFilesPromises = this.getAttachFilesPromises(files, payload);
|
|
@@ -5796,7 +5813,9 @@ class UserFormSubmissionService extends BaseApiService {
|
|
|
5796
5813
|
method: HttpMethod.PATCH,
|
|
5797
5814
|
url: `/forms/submissions/${submission.offline_id}/`,
|
|
5798
5815
|
payload: fullResult,
|
|
5799
|
-
blockers: [fullResult.issue, fullResult.component].filter(
|
|
5816
|
+
blockers: [fullResult.issue, fullResult.component, fullResult.component_stage].filter(
|
|
5817
|
+
(x) => x !== void 0
|
|
5818
|
+
),
|
|
5800
5819
|
blocks: [fullResult.offline_id]
|
|
5801
5820
|
});
|
|
5802
5821
|
return Promise.all([promise, ...attachFilesPromises]).then(() => promise);
|
|
@@ -12216,6 +12235,7 @@ export {
|
|
|
12216
12235
|
selectSortedOrganizationUsers,
|
|
12217
12236
|
selectSortedProjectUsers,
|
|
12218
12237
|
selectSortedProjects,
|
|
12238
|
+
selectStageFormIdsFromStageIds,
|
|
12219
12239
|
selectStageMapping,
|
|
12220
12240
|
selectStages,
|
|
12221
12241
|
selectStagesFromComponentType,
|