@overmap-ai/core 1.0.38-component-fields.30 → 1.0.38-component-fields.31

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.
@@ -5660,6 +5660,10 @@ 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
+ }
5663
5667
  store.dispatch(attachFormToComponentStage({ formId: formId2, componentStageId }));
5664
5668
  try {
5665
5669
  await this.enqueueRequest({
@@ -5668,6 +5672,7 @@ class UserFormService extends BaseApiService {
5668
5672
  url: `/forms/${formId2}/`,
5669
5673
  payload: { component_stage: componentStageId },
5670
5674
  queryParams: {
5675
+ project_id: activeProjectId.toString(),
5671
5676
  component_stage: componentStageId
5672
5677
  },
5673
5678
  blockers: [formId2, componentStageId],
@@ -5680,6 +5685,10 @@ class UserFormService extends BaseApiService {
5680
5685
  }
5681
5686
  async removeFromComponentStage(formId2, componentStageId) {
5682
5687
  const { store } = this.client;
5688
+ const activeProjectId = store.getState().projectReducer.activeProjectId;
5689
+ if (!activeProjectId) {
5690
+ throw new Error("Expected an active project.");
5691
+ }
5683
5692
  store.dispatch(removeFormFromComponentStage({ formId: formId2 }));
5684
5693
  try {
5685
5694
  await this.enqueueRequest({
@@ -5688,6 +5697,7 @@ class UserFormService extends BaseApiService {
5688
5697
  url: `/forms/${formId2}/`,
5689
5698
  payload: { component_stage: void 0 },
5690
5699
  queryParams: {
5700
+ project_id: activeProjectId.toString(),
5691
5701
  component_stage: componentStageId
5692
5702
  },
5693
5703
  blockers: [formId2, componentStageId],