338 on opportunities page when i associate a new company to a pipelinestage its persisted in db (#339)
* feature: add navigation for opportunities * chore: add companies in pipeline seed * feature: make the board scrollable * feature: make the board scrollable vertically * feature: remove board container * feature: fix newButton style * feature: add onClickNew method on board * feature: call backend with hardcoded id for new pipeline progressable * feature: refetch board on click on new * feature: use pipelineProgressId instead of entityId to ensure unicity of itemKey * feature: avoid rerender of columns when refetching
This commit is contained in:
@ -1639,6 +1639,16 @@ export type UpdateOnePipelineProgressMutationVariables = Exact<{
|
||||
|
||||
export type UpdateOnePipelineProgressMutation = { __typename?: 'Mutation', updateOnePipelineProgress?: { __typename?: 'PipelineProgress', id: string } | null };
|
||||
|
||||
export type CreateOnePipelineProgressMutationVariables = Exact<{
|
||||
entityType: PipelineProgressableType;
|
||||
entityId: Scalars['String'];
|
||||
pipelineId: Scalars['String'];
|
||||
pipelineStageId: Scalars['String'];
|
||||
}>;
|
||||
|
||||
|
||||
export type CreateOnePipelineProgressMutation = { __typename?: 'Mutation', createOnePipelineProgress: { __typename?: 'PipelineProgress', id: string } };
|
||||
|
||||
export type GetPeopleQueryVariables = Exact<{
|
||||
orderBy?: InputMaybe<Array<PersonOrderByWithRelationInput> | PersonOrderByWithRelationInput>;
|
||||
where?: InputMaybe<PersonWhereInput>;
|
||||
@ -2292,6 +2302,44 @@ export function useUpdateOnePipelineProgressMutation(baseOptions?: Apollo.Mutati
|
||||
export type UpdateOnePipelineProgressMutationHookResult = ReturnType<typeof useUpdateOnePipelineProgressMutation>;
|
||||
export type UpdateOnePipelineProgressMutationResult = Apollo.MutationResult<UpdateOnePipelineProgressMutation>;
|
||||
export type UpdateOnePipelineProgressMutationOptions = Apollo.BaseMutationOptions<UpdateOnePipelineProgressMutation, UpdateOnePipelineProgressMutationVariables>;
|
||||
export const CreateOnePipelineProgressDocument = gql`
|
||||
mutation CreateOnePipelineProgress($entityType: PipelineProgressableType!, $entityId: String!, $pipelineId: String!, $pipelineStageId: String!) {
|
||||
createOnePipelineProgress(
|
||||
data: {progressableType: $entityType, progressableId: $entityId, pipeline: {connect: {id: $pipelineId}}, pipelineStage: {connect: {id: $pipelineStageId}}}
|
||||
) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
export type CreateOnePipelineProgressMutationFn = Apollo.MutationFunction<CreateOnePipelineProgressMutation, CreateOnePipelineProgressMutationVariables>;
|
||||
|
||||
/**
|
||||
* __useCreateOnePipelineProgressMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useCreateOnePipelineProgressMutation` within a React component and pass it any options that fit your needs.
|
||||
* When your component renders, `useCreateOnePipelineProgressMutation` returns a tuple that includes:
|
||||
* - A mutate function that you can call at any time to execute the mutation
|
||||
* - An object with fields that represent the current status of the mutation's execution
|
||||
*
|
||||
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
|
||||
*
|
||||
* @example
|
||||
* const [createOnePipelineProgressMutation, { data, loading, error }] = useCreateOnePipelineProgressMutation({
|
||||
* variables: {
|
||||
* entityType: // value for 'entityType'
|
||||
* entityId: // value for 'entityId'
|
||||
* pipelineId: // value for 'pipelineId'
|
||||
* pipelineStageId: // value for 'pipelineStageId'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useCreateOnePipelineProgressMutation(baseOptions?: Apollo.MutationHookOptions<CreateOnePipelineProgressMutation, CreateOnePipelineProgressMutationVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<CreateOnePipelineProgressMutation, CreateOnePipelineProgressMutationVariables>(CreateOnePipelineProgressDocument, options);
|
||||
}
|
||||
export type CreateOnePipelineProgressMutationHookResult = ReturnType<typeof useCreateOnePipelineProgressMutation>;
|
||||
export type CreateOnePipelineProgressMutationResult = Apollo.MutationResult<CreateOnePipelineProgressMutation>;
|
||||
export type CreateOnePipelineProgressMutationOptions = Apollo.BaseMutationOptions<CreateOnePipelineProgressMutation, CreateOnePipelineProgressMutationVariables>;
|
||||
export const GetPeopleDocument = gql`
|
||||
query GetPeople($orderBy: [PersonOrderByWithRelationInput!], $where: PersonWhereInput, $limit: Int) {
|
||||
people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) {
|
||||
|
||||
Reference in New Issue
Block a user