@overmap-ai/core 1.0.38-component-fields.31 → 1.0.38-component-fields.32
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
|
@@ -5660,21 +5660,13 @@ class UserFormService extends BaseApiService {
|
|
|
5660
5660
|
}
|
|
5661
5661
|
async attachToComponentStage(formId2, componentStageId) {
|
|
5662
5662
|
const { store } = this.client;
|
|
5663
|
-
const activeProjectId = store.getState().projectReducer.activeProjectId;
|
|
5664
|
-
if (!activeProjectId) {
|
|
5665
|
-
throw new Error("Expected an active project.");
|
|
5666
|
-
}
|
|
5667
5663
|
store.dispatch(attachFormToComponentStage({ formId: formId2, componentStageId }));
|
|
5668
5664
|
try {
|
|
5669
5665
|
await this.enqueueRequest({
|
|
5670
5666
|
description: "Attach form to component stage",
|
|
5671
|
-
method: HttpMethod.
|
|
5672
|
-
url: `/forms/${formId2}/`,
|
|
5667
|
+
method: HttpMethod.POST,
|
|
5668
|
+
url: `/forms/${formId2}/associate-with-stage/`,
|
|
5673
5669
|
payload: { component_stage: componentStageId },
|
|
5674
|
-
queryParams: {
|
|
5675
|
-
project_id: activeProjectId.toString(),
|
|
5676
|
-
component_stage: componentStageId
|
|
5677
|
-
},
|
|
5678
5670
|
blockers: [formId2, componentStageId],
|
|
5679
5671
|
blocks: [formId2]
|
|
5680
5672
|
});
|
|
@@ -5685,21 +5677,12 @@ class UserFormService extends BaseApiService {
|
|
|
5685
5677
|
}
|
|
5686
5678
|
async removeFromComponentStage(formId2, componentStageId) {
|
|
5687
5679
|
const { store } = this.client;
|
|
5688
|
-
const activeProjectId = store.getState().projectReducer.activeProjectId;
|
|
5689
|
-
if (!activeProjectId) {
|
|
5690
|
-
throw new Error("Expected an active project.");
|
|
5691
|
-
}
|
|
5692
5680
|
store.dispatch(removeFormFromComponentStage({ formId: formId2 }));
|
|
5693
5681
|
try {
|
|
5694
5682
|
await this.enqueueRequest({
|
|
5695
5683
|
description: "Remove form from component stage",
|
|
5696
|
-
method: HttpMethod.
|
|
5697
|
-
url: `/forms/${formId2}/`,
|
|
5698
|
-
payload: { component_stage: void 0 },
|
|
5699
|
-
queryParams: {
|
|
5700
|
-
project_id: activeProjectId.toString(),
|
|
5701
|
-
component_stage: componentStageId
|
|
5702
|
-
},
|
|
5684
|
+
method: HttpMethod.DELETE,
|
|
5685
|
+
url: `/forms/${formId2}/associate-with-stage/`,
|
|
5703
5686
|
blockers: [formId2, componentStageId],
|
|
5704
5687
|
blocks: [formId2]
|
|
5705
5688
|
});
|