Skip to content

The open alternative to Salesforce, designed for AI.

[opportunities] fix poc being removed after pipeline update (#1148)

Weikoa2891e50e6bd
diff --git a/front/src/generated/graphql.tsx b/front/src/generated/graphql.tsx
index b73cb3d6bb4..82a519fb7b2 100644
--- a/front/src/generated/graphql.tsx
+++ b/front/src/generated/graphql.tsx
@@ -2655,7 +2655,7 @@ export type UpdateOnePipelineProgressMutationVariables = Exact<{
}>;
-export type UpdateOnePipelineProgressMutation = { __typename?: 'Mutation', updateOnePipelineProgress?: { __typename?: 'PipelineProgress', id: string, amount?: number | null, closeDate?: string | null, probability?: number | null } | null };
+export type UpdateOnePipelineProgressMutation = { __typename?: 'Mutation', updateOnePipelineProgress?: { __typename?: 'PipelineProgress', id: string, amount?: number | null, closeDate?: string | null, probability?: number | null, pointOfContact?: { __typename?: 'Person', id: string } | null } | null };
export type UpdateOnePipelineProgressStageMutationVariables = Exact<{
id?: InputMaybe<Scalars['String']>;
@@ -4685,6 +4685,9 @@ export const UpdateOnePipelineProgressDocument = gql`
amount
closeDate
probability
+ pointOfContact {
+ id
+ }
}
}
`;
diff --git a/front/src/modules/pipeline/queries/update.ts b/front/src/modules/pipeline/queries/update.ts
index 00bf4653ed7..d392274262b 100644
--- a/front/src/modules/pipeline/queries/update.ts
+++ b/front/src/modules/pipeline/queries/update.ts
@@ -28,6 +28,9 @@ export const UPDATE_PIPELINE_PROGRESS = gql`
amount
closeDate
probability
+ pointOfContact {
+ id
+ }
}
}
`;
diff --git a/front/src/modules/ui/editable-field/components/GenericEditableDateFieldEditMode.tsx b/front/src/modules/ui/editable-field/components/GenericEditableDateFieldEditMode.tsx
index 73e1e8ef370..8d3b256d7ae 100644
--- a/front/src/modules/ui/editable-field/components/GenericEditableDateFieldEditMode.tsx
+++ b/front/src/modules/ui/editable-field/components/GenericEditableDateFieldEditMode.tsx
@@ -33,7 +33,7 @@ export function GenericEditableDateFieldEditMode({ viewField }: OwnProps) {
setFieldValue(newDateISO);
- if (currentEditableFieldEntityId && updateField && newDateISO) {
+ if (currentEditableFieldEntityId && updateField) {
updateField(currentEditableFieldEntityId, viewField, newDateISO);
}
}