From 1b8b78d61581d5295579d5d4b3e7c7f5dcc27ce1 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Thu, 22 Jun 2023 14:57:08 -0700 Subject: [PATCH] Various fixes (#362) --- front/src/generated/graphql.tsx | 7 ++++--- .../modules/opportunities/components/NewButton.tsx | 1 + front/src/modules/opportunities/queries/index.ts | 2 ++ .../modules/pipelines/components/PipelineChip.tsx | 2 +- .../pipelines/interfaces/pipeline.interface.ts | 12 ------------ server/src/ability/ability.factory.ts | 6 ++++++ .../src/ability/handlers/company.ability-handler.ts | 1 + server/src/core/company/company.resolver.ts | 4 ++-- 8 files changed, 17 insertions(+), 18 deletions(-) delete mode 100644 front/src/modules/pipelines/interfaces/pipeline.interface.ts diff --git a/front/src/generated/graphql.tsx b/front/src/generated/graphql.tsx index 74bd17043..11f9373ea 100644 --- a/front/src/generated/graphql.tsx +++ b/front/src/generated/graphql.tsx @@ -1517,7 +1517,6 @@ export type WorkspaceMember = { user: User; userId: Scalars['String']; workspace: Workspace; - workspaceId: Scalars['String']; }; export type CreateCommentMutationVariables = Exact<{ @@ -1633,6 +1632,7 @@ export type UpdateOnePipelineProgressMutationVariables = Exact<{ export type UpdateOnePipelineProgressMutation = { __typename?: 'Mutation', updateOnePipelineProgress?: { __typename?: 'PipelineProgress', id: string } | null }; export type CreateOnePipelineProgressMutationVariables = Exact<{ + uuid: Scalars['String']; entityType: PipelineProgressableType; entityId: Scalars['String']; pipelineId: Scalars['String']; @@ -2298,9 +2298,9 @@ export type UpdateOnePipelineProgressMutationHookResult = ReturnType; export type UpdateOnePipelineProgressMutationOptions = Apollo.BaseMutationOptions; export const CreateOnePipelineProgressDocument = gql` - mutation CreateOnePipelineProgress($entityType: PipelineProgressableType!, $entityId: String!, $pipelineId: String!, $pipelineStageId: String!) { + mutation CreateOnePipelineProgress($uuid: String!, $entityType: PipelineProgressableType!, $entityId: String!, $pipelineId: String!, $pipelineStageId: String!) { createOnePipelineProgress( - data: {progressableType: $entityType, progressableId: $entityId, pipeline: {connect: {id: $pipelineId}}, pipelineStage: {connect: {id: $pipelineStageId}}} + data: {id: $uuid, progressableType: $entityType, progressableId: $entityId, pipeline: {connect: {id: $pipelineId}}, pipelineStage: {connect: {id: $pipelineStageId}}} ) { id } @@ -2321,6 +2321,7 @@ export type CreateOnePipelineProgressMutationFn = Apollo.MutationFunction Company) @@ -59,7 +59,7 @@ export class CompanyResolver { nullable: true, }) @UseGuards(AbilityGuard) - @CheckAbilities(UpdateCommentAbilityHandler) + @CheckAbilities(UpdateCompanyAbilityHandler) async updateOneCompany( @Args() args: UpdateOneCompanyArgs, @PrismaSelector({ modelName: 'Company' })