diff --git a/front/src/generated/graphql.tsx b/front/src/generated/graphql.tsx index 0605f4080..26f71c67f 100644 --- a/front/src/generated/graphql.tsx +++ b/front/src/generated/graphql.tsx @@ -2085,6 +2085,7 @@ export type PipelineStage = { color: Scalars['String']; createdAt: Scalars['DateTime']; id: Scalars['ID']; + index?: Maybe; name: Scalars['String']; pipeline: Pipeline; pipelineId: Scalars['String']; @@ -2097,6 +2098,7 @@ export type PipelineStageCreateManyPipelineInput = { color: Scalars['String']; createdAt?: InputMaybe; id?: InputMaybe; + index?: InputMaybe; name: Scalars['String']; type: Scalars['String']; updatedAt?: InputMaybe; @@ -2111,6 +2113,7 @@ export type PipelineStageCreateManyWorkspaceInput = { color: Scalars['String']; createdAt?: InputMaybe; id?: InputMaybe; + index?: InputMaybe; name: Scalars['String']; pipelineId: Scalars['String']; type: Scalars['String']; @@ -2147,6 +2150,7 @@ export type PipelineStageCreateWithoutPipelineInput = { color: Scalars['String']; createdAt?: InputMaybe; id?: InputMaybe; + index?: InputMaybe; name: Scalars['String']; pipelineProgresses?: InputMaybe; type: Scalars['String']; @@ -2157,6 +2161,7 @@ export type PipelineStageCreateWithoutWorkspaceInput = { color: Scalars['String']; createdAt?: InputMaybe; id?: InputMaybe; + index?: InputMaybe; name: Scalars['String']; pipeline: PipelineCreateNestedOneWithoutPipelineStagesInput; pipelineProgresses?: InputMaybe; @@ -2178,6 +2183,7 @@ export type PipelineStageOrderByWithRelationInput = { color?: InputMaybe; createdAt?: InputMaybe; id?: InputMaybe; + index?: InputMaybe; name?: InputMaybe; pipeline?: InputMaybe; pipelineId?: InputMaybe; @@ -2196,6 +2202,7 @@ export enum PipelineStageScalarFieldEnum { CreatedAt = 'createdAt', DeletedAt = 'deletedAt', Id = 'id', + Index = 'index', Name = 'name', PipelineId = 'pipelineId', Type = 'type', @@ -2210,6 +2217,7 @@ export type PipelineStageScalarWhereInput = { color?: InputMaybe; createdAt?: InputMaybe; id?: InputMaybe; + index?: InputMaybe; name?: InputMaybe; pipelineId?: InputMaybe; type?: InputMaybe; @@ -2220,6 +2228,7 @@ export type PipelineStageUpdateManyMutationInput = { color?: InputMaybe; createdAt?: InputMaybe; id?: InputMaybe; + index?: InputMaybe; name?: InputMaybe; type?: InputMaybe; updatedAt?: InputMaybe; @@ -2281,6 +2290,7 @@ export type PipelineStageUpdateWithoutPipelineInput = { color?: InputMaybe; createdAt?: InputMaybe; id?: InputMaybe; + index?: InputMaybe; name?: InputMaybe; pipelineProgresses?: InputMaybe; type?: InputMaybe; @@ -2291,6 +2301,7 @@ export type PipelineStageUpdateWithoutWorkspaceInput = { color?: InputMaybe; createdAt?: InputMaybe; id?: InputMaybe; + index?: InputMaybe; name?: InputMaybe; pipeline?: InputMaybe; pipelineProgresses?: InputMaybe; @@ -2317,6 +2328,7 @@ export type PipelineStageWhereInput = { color?: InputMaybe; createdAt?: InputMaybe; id?: InputMaybe; + index?: InputMaybe; name?: InputMaybe; pipeline?: InputMaybe; pipelineId?: InputMaybe; @@ -3275,7 +3287,7 @@ export type GetPipelinesQueryVariables = Exact<{ }>; -export type GetPipelinesQuery = { __typename?: 'Query', findManyPipeline: Array<{ __typename?: 'Pipeline', id: string, name: string, pipelineProgressableType: PipelineProgressableType, pipelineStages?: Array<{ __typename?: 'PipelineStage', id: string, name: string, color: string, pipelineProgresses?: Array<{ __typename?: 'PipelineProgress', id: string, progressableType: PipelineProgressableType, progressableId: string, amount?: number | null, closeDate?: string | null }> | null }> | null }> }; +export type GetPipelinesQuery = { __typename?: 'Query', findManyPipeline: Array<{ __typename?: 'Pipeline', id: string, name: string, pipelineProgressableType: PipelineProgressableType, pipelineStages?: Array<{ __typename?: 'PipelineStage', id: string, name: string, color: string, index?: number | null, pipelineProgresses?: Array<{ __typename?: 'PipelineProgress', id: string, progressableType: PipelineProgressableType, progressableId: string, amount?: number | null, closeDate?: string | null }> | null }> | null }> }; export type UpdateOnePipelineProgressMutationVariables = Exact<{ id?: InputMaybe; @@ -4560,6 +4572,7 @@ export const GetPipelinesDocument = gql` id name color + index pipelineProgresses { id progressableType diff --git a/front/src/modules/comments/components/right-drawer/create/RightDrawerCreateCommentThread.tsx b/front/src/modules/comments/components/right-drawer/create/RightDrawerCreateCommentThread.tsx index 0b5287516..e1b418251 100644 --- a/front/src/modules/comments/components/right-drawer/create/RightDrawerCreateCommentThread.tsx +++ b/front/src/modules/comments/components/right-drawer/create/RightDrawerCreateCommentThread.tsx @@ -19,12 +19,7 @@ export function RightDrawerCreateCommentThread() { return ( - { - return; - }} - /> + {commentThreadId && ( { + if (!a.index || !b.index) return 0; + return a.index - b.index; + }) + : []; const initialBoard: Column[] = - pipelineStages?.map((pipelineStage) => ({ + orderedPipelineStages?.map((pipelineStage) => ({ id: pipelineStage.id, title: pipelineStage.name, colorCode: pipelineStage.color, @@ -34,7 +40,7 @@ export function useBoard(pipelineId: string) { [], })) || []; - const pipelineProgresses = pipelineStages?.reduce( + const pipelineProgresses = orderedPipelineStages?.reduce( (acc, pipelineStage) => [ ...acc, ...(pipelineStage.pipelineProgresses || []), diff --git a/front/src/modules/pipeline-progress/queries/index.ts b/front/src/modules/pipeline-progress/queries/index.ts index 5581dbd3e..90adcc299 100644 --- a/front/src/modules/pipeline-progress/queries/index.ts +++ b/front/src/modules/pipeline-progress/queries/index.ts @@ -10,6 +10,7 @@ export const GET_PIPELINES = gql` id name color + index pipelineProgresses { id progressableType diff --git a/front/src/testing/mock-data/pipelines.ts b/front/src/testing/mock-data/pipelines.ts index 817634b39..93b0c269d 100644 --- a/front/src/testing/mock-data/pipelines.ts +++ b/front/src/testing/mock-data/pipelines.ts @@ -10,7 +10,7 @@ type MockedPipeline = Pick< 'id' | 'name' | 'pipelineProgressableType' | '__typename' > & { pipelineStages: Array< - Pick & { + Pick & { pipelineProgresses: Array< Pick< PipelineProgress, @@ -36,6 +36,7 @@ export const mockedPipelinesData: Array = [ id: 'fe256b39-3ec3-4fe3-8998-b76aa0bfb600', name: 'New', color: '#B76796', + index: 0, pipelineProgresses: [ { id: 'fe256b39-3ec3-4fe7-8998-b76aa0bfb600', @@ -60,6 +61,7 @@ export const mockedPipelinesData: Array = [ id: 'fe256b39-3ec3-4fe4-8998-b76aa0bfb600', name: 'Screening', color: '#CB912F', + index: 1, pipelineProgresses: [], __typename: 'PipelineStage', }, @@ -67,6 +69,7 @@ export const mockedPipelinesData: Array = [ id: 'fe256b39-3ec3-4fe5-8998-b76aa0bfb600', name: 'Meeting', color: '#9065B0', + index: 2, pipelineProgresses: [], __typename: 'PipelineStage', }, @@ -74,6 +77,7 @@ export const mockedPipelinesData: Array = [ id: 'fe256b39-3ec3-4fe6-8998-b76aa0bfb600', name: 'Proposal', color: '#337EA9', + index: 3, pipelineProgresses: [], __typename: 'PipelineStage', }, @@ -81,6 +85,7 @@ export const mockedPipelinesData: Array = [ id: 'fe256b39-3ec3-4fe7-8998-b76aa0bfb600', name: 'Customer', color: '#079039', + index: 4, pipelineProgresses: [], __typename: 'PipelineStage', }, diff --git a/server/src/core/@generated/pipeline-stage/aggregate-pipeline-stage.output.ts b/server/src/core/@generated/pipeline-stage/aggregate-pipeline-stage.output.ts index 42fa64665..839728056 100644 --- a/server/src/core/@generated/pipeline-stage/aggregate-pipeline-stage.output.ts +++ b/server/src/core/@generated/pipeline-stage/aggregate-pipeline-stage.output.ts @@ -1,6 +1,8 @@ import { Field } from '@nestjs/graphql'; import { ObjectType } from '@nestjs/graphql'; import { PipelineStageCountAggregate } from './pipeline-stage-count-aggregate.output'; +import { PipelineStageAvgAggregate } from './pipeline-stage-avg-aggregate.output'; +import { PipelineStageSumAggregate } from './pipeline-stage-sum-aggregate.output'; import { PipelineStageMinAggregate } from './pipeline-stage-min-aggregate.output'; import { PipelineStageMaxAggregate } from './pipeline-stage-max-aggregate.output'; @@ -10,6 +12,12 @@ export class AggregatePipelineStage { @Field(() => PipelineStageCountAggregate, {nullable:true}) _count?: PipelineStageCountAggregate; + @Field(() => PipelineStageAvgAggregate, {nullable:true}) + _avg?: PipelineStageAvgAggregate; + + @Field(() => PipelineStageSumAggregate, {nullable:true}) + _sum?: PipelineStageSumAggregate; + @Field(() => PipelineStageMinAggregate, {nullable:true}) _min?: PipelineStageMinAggregate; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-aggregate.args.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-aggregate.args.ts index 647227743..391a5c140 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-aggregate.args.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-aggregate.args.ts @@ -6,6 +6,8 @@ import { PipelineStageOrderByWithRelationInput } from './pipeline-stage-order-by import { PipelineStageWhereUniqueInput } from './pipeline-stage-where-unique.input'; import { Int } from '@nestjs/graphql'; import { PipelineStageCountAggregateInput } from './pipeline-stage-count-aggregate.input'; +import { PipelineStageAvgAggregateInput } from './pipeline-stage-avg-aggregate.input'; +import { PipelineStageSumAggregateInput } from './pipeline-stage-sum-aggregate.input'; import { PipelineStageMinAggregateInput } from './pipeline-stage-min-aggregate.input'; import { PipelineStageMaxAggregateInput } from './pipeline-stage-max-aggregate.input'; @@ -31,6 +33,12 @@ export class PipelineStageAggregateArgs { @Field(() => PipelineStageCountAggregateInput, {nullable:true}) _count?: PipelineStageCountAggregateInput; + @Field(() => PipelineStageAvgAggregateInput, {nullable:true}) + _avg?: PipelineStageAvgAggregateInput; + + @Field(() => PipelineStageSumAggregateInput, {nullable:true}) + _sum?: PipelineStageSumAggregateInput; + @Field(() => PipelineStageMinAggregateInput, {nullable:true}) _min?: PipelineStageMinAggregateInput; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-avg-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-avg-aggregate.input.ts new file mode 100644 index 000000000..a3e9a8034 --- /dev/null +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-avg-aggregate.input.ts @@ -0,0 +1,9 @@ +import { Field } from '@nestjs/graphql'; +import { InputType } from '@nestjs/graphql'; + +@InputType() +export class PipelineStageAvgAggregateInput { + + @Field(() => Boolean, {nullable:true}) + index?: true; +} diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-avg-aggregate.output.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-avg-aggregate.output.ts new file mode 100644 index 000000000..44e39bfda --- /dev/null +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-avg-aggregate.output.ts @@ -0,0 +1,10 @@ +import { Field } from '@nestjs/graphql'; +import { ObjectType } from '@nestjs/graphql'; +import { Float } from '@nestjs/graphql'; + +@ObjectType() +export class PipelineStageAvgAggregate { + + @Field(() => Float, {nullable:true}) + index?: number; +} diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-avg-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-avg-order-by-aggregate.input.ts new file mode 100644 index 000000000..42277bd91 --- /dev/null +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-avg-order-by-aggregate.input.ts @@ -0,0 +1,10 @@ +import { Field } from '@nestjs/graphql'; +import { InputType } from '@nestjs/graphql'; +import { SortOrder } from '../prisma/sort-order.enum'; + +@InputType() +export class PipelineStageAvgOrderByAggregateInput { + + @Field(() => SortOrder, {nullable:true}) + index?: keyof typeof SortOrder; +} diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-count-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-count-aggregate.input.ts index 1bb4a676f..8aae81df7 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-count-aggregate.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-count-aggregate.input.ts @@ -17,6 +17,9 @@ export class PipelineStageCountAggregateInput { @Field(() => Boolean, {nullable:true}) color?: true; + @Field(() => Boolean, {nullable:true}) + index?: true; + @Field(() => Boolean, {nullable:true}) pipelineId?: true; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-count-aggregate.output.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-count-aggregate.output.ts index a6804b890..e3104b8dc 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-count-aggregate.output.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-count-aggregate.output.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { ObjectType } from '@nestjs/graphql'; import { Int } from '@nestjs/graphql'; +import * as Validator from 'class-validator'; import { HideField } from '@nestjs/graphql'; @ObjectType() @@ -18,6 +19,11 @@ export class PipelineStageCountAggregate { @Field(() => Int, {nullable:false}) color!: number; + @Field(() => Int, {nullable:false}) + @Validator.IsNumber() + @Validator.IsOptional() + index!: number; + @Field(() => Int, {nullable:false}) pipelineId!: number; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-count-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-count-order-by-aggregate.input.ts index f495a3149..c53ea86ad 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-count-order-by-aggregate.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-count-order-by-aggregate.input.ts @@ -18,6 +18,9 @@ export class PipelineStageCountOrderByAggregateInput { @Field(() => SortOrder, {nullable:true}) color?: keyof typeof SortOrder; + @Field(() => SortOrder, {nullable:true}) + index?: keyof typeof SortOrder; + @Field(() => SortOrder, {nullable:true}) pipelineId?: keyof typeof SortOrder; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-pipeline.input.ts index 7856aebca..43d089db5 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-pipeline.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-pipeline.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; @InputType() @@ -23,6 +24,11 @@ export class PipelineStageCreateManyPipelineInput { @Validator.IsString() color!: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @HideField() workspaceId!: string; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-workspace.input.ts index b1a0b5cae..f21d68441 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-workspace.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many-workspace.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; @InputType() @@ -23,6 +24,11 @@ export class PipelineStageCreateManyWorkspaceInput { @Validator.IsString() color!: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @Field(() => String, {nullable:false}) pipelineId!: string; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many.input.ts index c041f28c2..db9cff1fa 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-many.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; @InputType() @@ -23,6 +24,11 @@ export class PipelineStageCreateManyInput { @Validator.IsString() color!: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @Field(() => String, {nullable:false}) pipelineId!: string; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-pipeline-progresses.input.ts index 3f656cf83..95249cb34 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-pipeline-progresses.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-pipeline-progresses.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; import { PipelineCreateNestedOneWithoutPipelineStagesInput } from '../pipeline/pipeline-create-nested-one-without-pipeline-stages.input'; import { WorkspaceCreateNestedOneWithoutPipelineStagesInput } from '../workspace/workspace-create-nested-one-without-pipeline-stages.input'; @@ -25,6 +26,11 @@ export class PipelineStageCreateWithoutPipelineProgressesInput { @Validator.IsString() color!: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @HideField() deletedAt?: Date | string; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-pipeline.input.ts index ea156775f..2ffa32850 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-pipeline.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-pipeline.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; import { PipelineProgressCreateNestedManyWithoutPipelineStageInput } from '../pipeline-progress/pipeline-progress-create-nested-many-without-pipeline-stage.input'; import { WorkspaceCreateNestedOneWithoutPipelineStagesInput } from '../workspace/workspace-create-nested-one-without-pipeline-stages.input'; @@ -25,6 +26,11 @@ export class PipelineStageCreateWithoutPipelineInput { @Validator.IsString() color!: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @HideField() deletedAt?: Date | string; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-workspace.input.ts index 8541319f6..9497e8b13 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-workspace.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-create-without-workspace.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; import { PipelineProgressCreateNestedManyWithoutPipelineStageInput } from '../pipeline-progress/pipeline-progress-create-nested-many-without-pipeline-stage.input'; import { PipelineCreateNestedOneWithoutPipelineStagesInput } from '../pipeline/pipeline-create-nested-one-without-pipeline-stages.input'; @@ -25,6 +26,11 @@ export class PipelineStageCreateWithoutWorkspaceInput { @Validator.IsString() color!: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @HideField() deletedAt?: Date | string; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-create.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-create.input.ts index f1f74472d..72f53c828 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-create.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-create.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; import { PipelineProgressCreateNestedManyWithoutPipelineStageInput } from '../pipeline-progress/pipeline-progress-create-nested-many-without-pipeline-stage.input'; import { PipelineCreateNestedOneWithoutPipelineStagesInput } from '../pipeline/pipeline-create-nested-one-without-pipeline-stages.input'; @@ -26,6 +27,11 @@ export class PipelineStageCreateInput { @Validator.IsString() color!: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @HideField() deletedAt?: Date | string; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-group-by.args.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-group-by.args.ts index 9d6c2e1aa..035750086 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-group-by.args.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-group-by.args.ts @@ -7,6 +7,8 @@ import { PipelineStageScalarFieldEnum } from './pipeline-stage-scalar-field.enum import { PipelineStageScalarWhereWithAggregatesInput } from './pipeline-stage-scalar-where-with-aggregates.input'; import { Int } from '@nestjs/graphql'; import { PipelineStageCountAggregateInput } from './pipeline-stage-count-aggregate.input'; +import { PipelineStageAvgAggregateInput } from './pipeline-stage-avg-aggregate.input'; +import { PipelineStageSumAggregateInput } from './pipeline-stage-sum-aggregate.input'; import { PipelineStageMinAggregateInput } from './pipeline-stage-min-aggregate.input'; import { PipelineStageMaxAggregateInput } from './pipeline-stage-max-aggregate.input'; @@ -35,6 +37,12 @@ export class PipelineStageGroupByArgs { @Field(() => PipelineStageCountAggregateInput, {nullable:true}) _count?: PipelineStageCountAggregateInput; + @Field(() => PipelineStageAvgAggregateInput, {nullable:true}) + _avg?: PipelineStageAvgAggregateInput; + + @Field(() => PipelineStageSumAggregateInput, {nullable:true}) + _sum?: PipelineStageSumAggregateInput; + @Field(() => PipelineStageMinAggregateInput, {nullable:true}) _min?: PipelineStageMinAggregateInput; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-group-by.output.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-group-by.output.ts index 3bac6bc21..661c0ad69 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-group-by.output.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-group-by.output.ts @@ -1,8 +1,11 @@ import { Field } from '@nestjs/graphql'; import { ObjectType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; import { PipelineStageCountAggregate } from './pipeline-stage-count-aggregate.output'; +import { PipelineStageAvgAggregate } from './pipeline-stage-avg-aggregate.output'; +import { PipelineStageSumAggregate } from './pipeline-stage-sum-aggregate.output'; import { PipelineStageMinAggregate } from './pipeline-stage-min-aggregate.output'; import { PipelineStageMaxAggregate } from './pipeline-stage-max-aggregate.output'; @@ -26,6 +29,11 @@ export class PipelineStageGroupBy { @Validator.IsString() color!: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @Field(() => String, {nullable:false}) pipelineId!: string; @@ -44,6 +52,12 @@ export class PipelineStageGroupBy { @Field(() => PipelineStageCountAggregate, {nullable:true}) _count?: PipelineStageCountAggregate; + @Field(() => PipelineStageAvgAggregate, {nullable:true}) + _avg?: PipelineStageAvgAggregate; + + @Field(() => PipelineStageSumAggregate, {nullable:true}) + _sum?: PipelineStageSumAggregate; + @Field(() => PipelineStageMinAggregate, {nullable:true}) _min?: PipelineStageMinAggregate; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-max-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-max-aggregate.input.ts index 9b0f60095..faaad5aef 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-max-aggregate.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-max-aggregate.input.ts @@ -17,6 +17,9 @@ export class PipelineStageMaxAggregateInput { @Field(() => Boolean, {nullable:true}) color?: true; + @Field(() => Boolean, {nullable:true}) + index?: true; + @Field(() => Boolean, {nullable:true}) pipelineId?: true; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-max-aggregate.output.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-max-aggregate.output.ts index ededb7d04..f8e893b8f 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-max-aggregate.output.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-max-aggregate.output.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { ObjectType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; @ObjectType() @@ -23,6 +24,11 @@ export class PipelineStageMaxAggregate { @Validator.IsString() color?: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @Field(() => String, {nullable:true}) pipelineId?: string; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-max-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-max-order-by-aggregate.input.ts index a6e3adf28..b539c6deb 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-max-order-by-aggregate.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-max-order-by-aggregate.input.ts @@ -18,6 +18,9 @@ export class PipelineStageMaxOrderByAggregateInput { @Field(() => SortOrder, {nullable:true}) color?: keyof typeof SortOrder; + @Field(() => SortOrder, {nullable:true}) + index?: keyof typeof SortOrder; + @Field(() => SortOrder, {nullable:true}) pipelineId?: keyof typeof SortOrder; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-min-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-min-aggregate.input.ts index baded7837..63b4b28a2 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-min-aggregate.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-min-aggregate.input.ts @@ -17,6 +17,9 @@ export class PipelineStageMinAggregateInput { @Field(() => Boolean, {nullable:true}) color?: true; + @Field(() => Boolean, {nullable:true}) + index?: true; + @Field(() => Boolean, {nullable:true}) pipelineId?: true; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-min-aggregate.output.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-min-aggregate.output.ts index 26a880854..3b5beaa62 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-min-aggregate.output.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-min-aggregate.output.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { ObjectType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; @ObjectType() @@ -23,6 +24,11 @@ export class PipelineStageMinAggregate { @Validator.IsString() color?: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @Field(() => String, {nullable:true}) pipelineId?: string; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-min-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-min-order-by-aggregate.input.ts index ec3e7862e..029a1831b 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-min-order-by-aggregate.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-min-order-by-aggregate.input.ts @@ -18,6 +18,9 @@ export class PipelineStageMinOrderByAggregateInput { @Field(() => SortOrder, {nullable:true}) color?: keyof typeof SortOrder; + @Field(() => SortOrder, {nullable:true}) + index?: keyof typeof SortOrder; + @Field(() => SortOrder, {nullable:true}) pipelineId?: keyof typeof SortOrder; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-with-aggregation.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-with-aggregation.input.ts index bbe829d1c..98cadcbab 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-with-aggregation.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-with-aggregation.input.ts @@ -3,8 +3,10 @@ import { InputType } from '@nestjs/graphql'; import { SortOrder } from '../prisma/sort-order.enum'; import { HideField } from '@nestjs/graphql'; import { PipelineStageCountOrderByAggregateInput } from './pipeline-stage-count-order-by-aggregate.input'; +import { PipelineStageAvgOrderByAggregateInput } from './pipeline-stage-avg-order-by-aggregate.input'; import { PipelineStageMaxOrderByAggregateInput } from './pipeline-stage-max-order-by-aggregate.input'; import { PipelineStageMinOrderByAggregateInput } from './pipeline-stage-min-order-by-aggregate.input'; +import { PipelineStageSumOrderByAggregateInput } from './pipeline-stage-sum-order-by-aggregate.input'; @InputType() export class PipelineStageOrderByWithAggregationInput { @@ -21,6 +23,9 @@ export class PipelineStageOrderByWithAggregationInput { @Field(() => SortOrder, {nullable:true}) color?: keyof typeof SortOrder; + @Field(() => SortOrder, {nullable:true}) + index?: keyof typeof SortOrder; + @Field(() => SortOrder, {nullable:true}) pipelineId?: keyof typeof SortOrder; @@ -39,9 +44,15 @@ export class PipelineStageOrderByWithAggregationInput { @Field(() => PipelineStageCountOrderByAggregateInput, {nullable:true}) _count?: PipelineStageCountOrderByAggregateInput; + @Field(() => PipelineStageAvgOrderByAggregateInput, {nullable:true}) + _avg?: PipelineStageAvgOrderByAggregateInput; + @Field(() => PipelineStageMaxOrderByAggregateInput, {nullable:true}) _max?: PipelineStageMaxOrderByAggregateInput; @Field(() => PipelineStageMinOrderByAggregateInput, {nullable:true}) _min?: PipelineStageMinOrderByAggregateInput; + + @Field(() => PipelineStageSumOrderByAggregateInput, {nullable:true}) + _sum?: PipelineStageSumOrderByAggregateInput; } diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-with-relation.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-with-relation.input.ts index e14e1967d..0f16c90ec 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-with-relation.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-order-by-with-relation.input.ts @@ -21,6 +21,9 @@ export class PipelineStageOrderByWithRelationInput { @Field(() => SortOrder, {nullable:true}) color?: keyof typeof SortOrder; + @Field(() => SortOrder, {nullable:true}) + index?: keyof typeof SortOrder; + @Field(() => SortOrder, {nullable:true}) pipelineId?: keyof typeof SortOrder; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-field.enum.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-field.enum.ts index 6f1a53a74..dc1d8f8ba 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-field.enum.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-field.enum.ts @@ -5,6 +5,7 @@ export enum PipelineStageScalarFieldEnum { name = "name", type = "type", color = "color", + index = "index", pipelineId = "pipelineId", workspaceId = "workspaceId", deletedAt = "deletedAt", diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-where-with-aggregates.input.ts index eb7974076..5cd9eed0c 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-where-with-aggregates.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-where-with-aggregates.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringWithAggregatesFilter } from '../prisma/string-with-aggregates-filter.input'; +import { IntNullableWithAggregatesFilter } from '../prisma/int-nullable-with-aggregates-filter.input'; import { HideField } from '@nestjs/graphql'; import { DateTimeNullableWithAggregatesFilter } from '../prisma/date-time-nullable-with-aggregates-filter.input'; import { DateTimeWithAggregatesFilter } from '../prisma/date-time-with-aggregates-filter.input'; @@ -29,6 +30,9 @@ export class PipelineStageScalarWhereWithAggregatesInput { @Field(() => StringWithAggregatesFilter, {nullable:true}) color?: StringWithAggregatesFilter; + @Field(() => IntNullableWithAggregatesFilter, {nullable:true}) + index?: IntNullableWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, {nullable:true}) pipelineId?: StringWithAggregatesFilter; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-where.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-where.input.ts index 712d6ed04..cb2a85faa 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-where.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-scalar-where.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringFilter } from '../prisma/string-filter.input'; +import { IntNullableFilter } from '../prisma/int-nullable-filter.input'; import { HideField } from '@nestjs/graphql'; import { DateTimeNullableFilter } from '../prisma/date-time-nullable-filter.input'; import { DateTimeFilter } from '../prisma/date-time-filter.input'; @@ -29,6 +30,9 @@ export class PipelineStageScalarWhereInput { @Field(() => StringFilter, {nullable:true}) color?: StringFilter; + @Field(() => IntNullableFilter, {nullable:true}) + index?: IntNullableFilter; + @Field(() => StringFilter, {nullable:true}) pipelineId?: StringFilter; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-sum-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-sum-aggregate.input.ts new file mode 100644 index 000000000..3b161cc5b --- /dev/null +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-sum-aggregate.input.ts @@ -0,0 +1,9 @@ +import { Field } from '@nestjs/graphql'; +import { InputType } from '@nestjs/graphql'; + +@InputType() +export class PipelineStageSumAggregateInput { + + @Field(() => Boolean, {nullable:true}) + index?: true; +} diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-sum-aggregate.output.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-sum-aggregate.output.ts new file mode 100644 index 000000000..1ab3c5a8c --- /dev/null +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-sum-aggregate.output.ts @@ -0,0 +1,13 @@ +import { Field } from '@nestjs/graphql'; +import { ObjectType } from '@nestjs/graphql'; +import { Int } from '@nestjs/graphql'; +import * as Validator from 'class-validator'; + +@ObjectType() +export class PipelineStageSumAggregate { + + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; +} diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-sum-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-sum-order-by-aggregate.input.ts new file mode 100644 index 000000000..9bbbd058c --- /dev/null +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-sum-order-by-aggregate.input.ts @@ -0,0 +1,10 @@ +import { Field } from '@nestjs/graphql'; +import { InputType } from '@nestjs/graphql'; +import { SortOrder } from '../prisma/sort-order.enum'; + +@InputType() +export class PipelineStageSumOrderByAggregateInput { + + @Field(() => SortOrder, {nullable:true}) + index?: keyof typeof SortOrder; +} diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline-progresses.input.ts index c1e93b71f..63d69a35a 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline-progresses.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline-progresses.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; @InputType() @@ -23,6 +24,11 @@ export class PipelineStageUncheckedCreateWithoutPipelineProgressesInput { @Validator.IsString() color!: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @Field(() => String, {nullable:false}) pipelineId!: string; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline.input.ts index b2c6de3eb..210c9db0f 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-pipeline.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineStageInput } from '../pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline-stage.input'; @@ -24,6 +25,11 @@ export class PipelineStageUncheckedCreateWithoutPipelineInput { @Validator.IsString() color!: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @HideField() workspaceId!: string; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-workspace.input.ts index b2249e733..ed7a1b8ff 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-workspace.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create-without-workspace.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineStageInput } from '../pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline-stage.input'; @@ -24,6 +25,11 @@ export class PipelineStageUncheckedCreateWithoutWorkspaceInput { @Validator.IsString() color!: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @Field(() => String, {nullable:false}) pipelineId!: string; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create.input.ts index 41fa54d34..b1076173c 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-create.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import * as Validator from 'class-validator'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineStageInput } from '../pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline-stage.input'; @@ -24,6 +25,11 @@ export class PipelineStageUncheckedCreateInput { @Validator.IsString() color!: string; + @Field(() => Int, {nullable:true}) + @Validator.IsNumber() + @Validator.IsOptional() + index?: number; + @Field(() => String, {nullable:false}) pipelineId!: string; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-stages.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-stages.input.ts index 94054bcb1..a4de8de3d 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-stages.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-stages.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input'; +import { NullableIntFieldUpdateOperationsInput } from '../prisma/nullable-int-field-update-operations.input'; import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input'; import { HideField } from '@nestjs/graphql'; import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input'; @@ -20,6 +21,9 @@ export class PipelineStageUncheckedUpdateManyWithoutPipelineStagesInput { @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) color?: StringFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, {nullable:true}) + index?: NullableIntFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) pipelineId?: StringFieldUpdateOperationsInput; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many.input.ts index dd2c461ae..c278b56f7 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-many.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input'; +import { NullableIntFieldUpdateOperationsInput } from '../prisma/nullable-int-field-update-operations.input'; import { HideField } from '@nestjs/graphql'; import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input'; import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input'; @@ -20,6 +21,9 @@ export class PipelineStageUncheckedUpdateManyInput { @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) color?: StringFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, {nullable:true}) + index?: NullableIntFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) pipelineId?: StringFieldUpdateOperationsInput; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline-progresses.input.ts index 1b5efa690..3f1fc29c5 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline-progresses.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline-progresses.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input'; +import { NullableIntFieldUpdateOperationsInput } from '../prisma/nullable-int-field-update-operations.input'; import { HideField } from '@nestjs/graphql'; import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input'; import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input'; @@ -20,6 +21,9 @@ export class PipelineStageUncheckedUpdateWithoutPipelineProgressesInput { @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) color?: StringFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, {nullable:true}) + index?: NullableIntFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) pipelineId?: StringFieldUpdateOperationsInput; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline.input.ts index 0c4d93d8d..11883bb2e 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-pipeline.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input'; +import { NullableIntFieldUpdateOperationsInput } from '../prisma/nullable-int-field-update-operations.input'; import { HideField } from '@nestjs/graphql'; import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input'; import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input'; @@ -21,6 +22,9 @@ export class PipelineStageUncheckedUpdateWithoutPipelineInput { @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) color?: StringFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, {nullable:true}) + index?: NullableIntFieldUpdateOperationsInput; + @HideField() workspaceId?: StringFieldUpdateOperationsInput; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-workspace.input.ts index 46f87868d..451e42799 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-workspace.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update-without-workspace.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input'; +import { NullableIntFieldUpdateOperationsInput } from '../prisma/nullable-int-field-update-operations.input'; import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input'; import { HideField } from '@nestjs/graphql'; import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input'; @@ -21,6 +22,9 @@ export class PipelineStageUncheckedUpdateWithoutWorkspaceInput { @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) color?: StringFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, {nullable:true}) + index?: NullableIntFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) pipelineId?: StringFieldUpdateOperationsInput; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update.input.ts index bb918bd0e..c113ee284 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-unchecked-update.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input'; +import { NullableIntFieldUpdateOperationsInput } from '../prisma/nullable-int-field-update-operations.input'; import { HideField } from '@nestjs/graphql'; import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input'; import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input'; @@ -21,6 +22,9 @@ export class PipelineStageUncheckedUpdateInput { @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) color?: StringFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, {nullable:true}) + index?: NullableIntFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) pipelineId?: StringFieldUpdateOperationsInput; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-mutation.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-mutation.input.ts index e66f15e78..5461b6d1a 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-mutation.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-many-mutation.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input'; +import { NullableIntFieldUpdateOperationsInput } from '../prisma/nullable-int-field-update-operations.input'; import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input'; import { HideField } from '@nestjs/graphql'; import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input'; @@ -20,6 +21,9 @@ export class PipelineStageUpdateManyMutationInput { @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) color?: StringFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, {nullable:true}) + index?: NullableIntFieldUpdateOperationsInput; + @HideField() deletedAt?: NullableDateTimeFieldUpdateOperationsInput; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-pipeline-progresses.input.ts index 44bd90d60..e39a0a0d2 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-pipeline-progresses.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-pipeline-progresses.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input'; +import { NullableIntFieldUpdateOperationsInput } from '../prisma/nullable-int-field-update-operations.input'; import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input'; import { HideField } from '@nestjs/graphql'; import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input'; @@ -22,6 +23,9 @@ export class PipelineStageUpdateWithoutPipelineProgressesInput { @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) color?: StringFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, {nullable:true}) + index?: NullableIntFieldUpdateOperationsInput; + @HideField() deletedAt?: NullableDateTimeFieldUpdateOperationsInput; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-pipeline.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-pipeline.input.ts index 408111514..5b2dfb6c8 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-pipeline.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-pipeline.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input'; +import { NullableIntFieldUpdateOperationsInput } from '../prisma/nullable-int-field-update-operations.input'; import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input'; import { HideField } from '@nestjs/graphql'; import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input'; @@ -22,6 +23,9 @@ export class PipelineStageUpdateWithoutPipelineInput { @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) color?: StringFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, {nullable:true}) + index?: NullableIntFieldUpdateOperationsInput; + @HideField() deletedAt?: NullableDateTimeFieldUpdateOperationsInput; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-workspace.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-workspace.input.ts index 9a697f7e6..805f5bffc 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-workspace.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-update-without-workspace.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input'; +import { NullableIntFieldUpdateOperationsInput } from '../prisma/nullable-int-field-update-operations.input'; import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input'; import { HideField } from '@nestjs/graphql'; import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input'; @@ -22,6 +23,9 @@ export class PipelineStageUpdateWithoutWorkspaceInput { @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) color?: StringFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, {nullable:true}) + index?: NullableIntFieldUpdateOperationsInput; + @HideField() deletedAt?: NullableDateTimeFieldUpdateOperationsInput; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-update.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-update.input.ts index 21b3c95a6..e94a8caac 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-update.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-update.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input'; +import { NullableIntFieldUpdateOperationsInput } from '../prisma/nullable-int-field-update-operations.input'; import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input'; import { HideField } from '@nestjs/graphql'; import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input'; @@ -23,6 +24,9 @@ export class PipelineStageUpdateInput { @Field(() => StringFieldUpdateOperationsInput, {nullable:true}) color?: StringFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, {nullable:true}) + index?: NullableIntFieldUpdateOperationsInput; + @HideField() deletedAt?: NullableDateTimeFieldUpdateOperationsInput; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage-where.input.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage-where.input.ts index eb97b3236..6246d9cf3 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage-where.input.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage-where.input.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { InputType } from '@nestjs/graphql'; import { StringFilter } from '../prisma/string-filter.input'; +import { IntNullableFilter } from '../prisma/int-nullable-filter.input'; import { HideField } from '@nestjs/graphql'; import { DateTimeNullableFilter } from '../prisma/date-time-nullable-filter.input'; import { DateTimeFilter } from '../prisma/date-time-filter.input'; @@ -32,6 +33,9 @@ export class PipelineStageWhereInput { @Field(() => StringFilter, {nullable:true}) color?: StringFilter; + @Field(() => IntNullableFilter, {nullable:true}) + index?: IntNullableFilter; + @Field(() => StringFilter, {nullable:true}) pipelineId?: StringFilter; diff --git a/server/src/core/@generated/pipeline-stage/pipeline-stage.model.ts b/server/src/core/@generated/pipeline-stage/pipeline-stage.model.ts index cd06a877f..5a6b28e18 100644 --- a/server/src/core/@generated/pipeline-stage/pipeline-stage.model.ts +++ b/server/src/core/@generated/pipeline-stage/pipeline-stage.model.ts @@ -1,6 +1,7 @@ import { Field } from '@nestjs/graphql'; import { ObjectType } from '@nestjs/graphql'; import { ID } from '@nestjs/graphql'; +import { Int } from '@nestjs/graphql'; import { HideField } from '@nestjs/graphql'; import { PipelineProgress } from '../pipeline-progress/pipeline-progress.model'; import { Pipeline } from '../pipeline/pipeline.model'; @@ -22,6 +23,9 @@ export class PipelineStage { @Field(() => String, {nullable:false}) color!: string; + @Field(() => Int, {nullable:true}) + index!: number | null; + @Field(() => String, {nullable:false}) pipelineId!: string; diff --git a/server/src/database/migrations/20230710235621_pipline_stage_index/migration.sql b/server/src/database/migrations/20230710235621_pipline_stage_index/migration.sql new file mode 100644 index 000000000..7ccb23420 --- /dev/null +++ b/server/src/database/migrations/20230710235621_pipline_stage_index/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "pipeline_stages" ADD COLUMN "index" INTEGER; diff --git a/server/src/database/schema.prisma b/server/src/database/schema.prisma index 602caa385..85d606edd 100644 --- a/server/src/database/schema.prisma +++ b/server/src/database/schema.prisma @@ -434,6 +434,9 @@ model PipelineStage { type String /// @Validator.IsString() color String + /// @Validator.IsNumber() + /// @Validator.IsOptional() + index Int? pipelineProgresses PipelineProgress[] pipeline Pipeline @relation(fields: [pipelineId], references: [id]) diff --git a/server/src/database/seeds/pipelines.ts b/server/src/database/seeds/pipelines.ts index 31b922afa..b4cd94904 100644 --- a/server/src/database/seeds/pipelines.ts +++ b/server/src/database/seeds/pipelines.ts @@ -19,6 +19,7 @@ export const seedPipelines = async (prisma: PrismaClient) => { id: 'twenty-fe256b39-3ec3-4fe3-8998-b76aa0bfb600', name: 'New', color: '#B76796', + index: 0, type: 'open', pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400', workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419', @@ -32,6 +33,7 @@ export const seedPipelines = async (prisma: PrismaClient) => { id: 'twenty-fe256b39-3ec3-4fe4-8998-b76aa0bfb600', name: 'Screening', color: '#CB912F', + index: 1, type: 'ongoing', pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400', workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419', @@ -45,6 +47,7 @@ export const seedPipelines = async (prisma: PrismaClient) => { id: 'twenty-fe256b39-3ec3-4fe5-8998-b76aa0bfb600', name: 'Meeting', color: '#9065B0', + index: 2, type: 'ongoing', pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400', workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419', @@ -58,6 +61,7 @@ export const seedPipelines = async (prisma: PrismaClient) => { id: 'twenty-fe256b39-3ec3-4fe6-8998-b76aa0bfb600', name: 'Proposal', color: '#337EA9', + index: 3, type: 'ongoing', pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400', workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419', @@ -71,6 +75,7 @@ export const seedPipelines = async (prisma: PrismaClient) => { id: 'twenty-fe256b39-3ec3-4fe7-8998-b76aa0bfb600', name: 'Customer', color: '#079039', + index: 4, type: 'won', pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400', workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419', @@ -148,6 +153,7 @@ export const seedPipelines = async (prisma: PrismaClient) => { id: 'twenty-fe256b39-3ec3-4fe3-8998-a76aa0bfb600', name: 'New', color: '#B76796', + index: 1, type: 'open', pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b74aa0bfb400', workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419', @@ -186,6 +192,7 @@ export const seedPipelines = async (prisma: PrismaClient) => { id: 'twenty-dev-fe256b39-3ec3-4fe3-8998-b76aa0bfb600', name: 'New', color: '#B76796', + index: 0, type: 'open', pipelineId: 'twenty-dev-fe256b39-3ec3-4fe3-8997-b75aa0bfb400', workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420', @@ -199,6 +206,7 @@ export const seedPipelines = async (prisma: PrismaClient) => { id: 'twenty-dev-fe256b39-3ec3-4fe4-8998-b76aa0bfb600', name: 'Screening', color: '#CB912F', + index: 1, type: 'ongoing', pipelineId: 'twenty-dev-fe256b39-3ec3-4fe3-8997-b75aa0bfb400', workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420', @@ -212,6 +220,7 @@ export const seedPipelines = async (prisma: PrismaClient) => { id: 'twenty-dev-fe256b39-3ec3-4fe5-8998-b76aa0bfb600', name: 'Meeting', color: '#9065B0', + index: 2, type: 'ongoing', pipelineId: 'twenty-dev-fe256b39-3ec3-4fe3-8997-b75aa0bfb400', workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420', @@ -225,6 +234,7 @@ export const seedPipelines = async (prisma: PrismaClient) => { id: 'twenty-dev-fe256b39-3ec3-4fe6-8998-b76aa0bfb600', name: 'Proposal', color: '#337EA9', + index: 3, type: 'ongoing', pipelineId: 'twenty-dev-fe256b39-3ec3-4fe3-8997-b75aa0bfb400', workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420', @@ -238,6 +248,7 @@ export const seedPipelines = async (prisma: PrismaClient) => { id: 'twenty-dev-fe256b39-3ec3-4fe7-8998-b76aa0bfb600', name: 'Customer', color: '#079039', + index: 4, type: 'won', pipelineId: 'twenty-dev-fe256b39-3ec3-4fe3-8997-b75aa0bfb400', workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420',