The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Persist update on board drag and drop (#328)
Sammy Teilletc120903a4593
diff --git a/front/src/generated/graphql.tsx b/front/src/generated/graphql.tsxindex 27239f57fbf..10c220b5490 100644--- a/front/src/generated/graphql.tsx+++ b/front/src/generated/graphql.tsx@@ -975,6 +975,7 @@ export type Pipeline = {icon: Scalars['String'];id: Scalars['ID'];name: Scalars['String'];+ pipelineProgressableType: PipelineProgressableType;pipelineProgresses?: Maybe<Array<PipelineProgress>>;pipelineStages?: Maybe<Array<PipelineStage>>;updatedAt: Scalars['DateTime'];@@ -990,6 +991,7 @@ export type PipelineOrderByWithRelationInput = {icon?: InputMaybe<SortOrder>;id?: InputMaybe<SortOrder>;name?: InputMaybe<SortOrder>;+ pipelineProgressableType?: InputMaybe<SortOrder>;pipelineProgresses?: InputMaybe<PipelineProgressOrderByRelationAggregateInput>;pipelineStages?: InputMaybe<PipelineStageOrderByRelationAggregateInput>;updatedAt?: InputMaybe<SortOrder>;@@ -1102,6 +1104,7 @@ export enum PipelineScalarFieldEnum {Icon = 'icon',Id = 'id',Name = 'name',+ PipelineProgressableType = 'pipelineProgressableType',UpdatedAt = 'updatedAt',WorkspaceId = 'workspaceId'}@@ -1201,6 +1204,7 @@ export type PipelineWhereInput = {icon?: InputMaybe<StringFilter>;id?: InputMaybe<StringFilter>;name?: InputMaybe<StringFilter>;+ pipelineProgressableType?: InputMaybe<EnumPipelineProgressableTypeFilter>;pipelineProgresses?: InputMaybe<PipelineProgressListRelationFilter>;pipelineStages?: InputMaybe<PipelineStageListRelationFilter>;updatedAt?: InputMaybe<DateTimeFilter>;@@ -1625,7 +1629,15 @@ export type DeleteCompaniesMutation = { __typename?: 'Mutation', deleteManyCompaexport type GetPipelinesQueryVariables = Exact<{ [key: string]: never; }>;-export type GetPipelinesQuery = { __typename?: 'Query', findManyPipeline: Array<{ __typename?: 'Pipeline', id: string, name: string, pipelineStages?: Array<{ __typename?: 'PipelineStage', name: string, color: string, pipelineProgresses?: Array<{ __typename?: 'PipelineProgress', id: string, progressableType: PipelineProgressableType, progressableId: string }> | 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, pipelineProgresses?: Array<{ __typename?: 'PipelineProgress', id: string, progressableType: PipelineProgressableType, progressableId: string }> | null }> | null }> };++export type UpdateOnePipelineProgressMutationVariables = Exact<{+ id?: InputMaybe<Scalars['String']>;+ pipelineStageId?: InputMaybe<Scalars['String']>;+}>;+++export type UpdateOnePipelineProgressMutation = { __typename?: 'Mutation', updateOnePipelineProgress?: { __typename?: 'PipelineProgress', id: string } | null };export type GetPeopleQueryVariables = Exact<{orderBy?: InputMaybe<Array<PersonOrderByWithRelationInput> | PersonOrderByWithRelationInput>;@@ -2199,10 +2211,12 @@ export type DeleteCompaniesMutationResult = Apollo.MutationResult<DeleteCompanieexport type DeleteCompaniesMutationOptions = Apollo.BaseMutationOptions<DeleteCompaniesMutation, DeleteCompaniesMutationVariables>;export const GetPipelinesDocument = gql`query GetPipelines {- findManyPipeline(skip: 1) {+ findManyPipeline {idname+ pipelineProgressableTypepipelineStages {+ idnamecolorpipelineProgresses {@@ -2241,6 +2255,43 @@ export function useGetPipelinesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptioexport type GetPipelinesQueryHookResult = ReturnType<typeof useGetPipelinesQuery>;export type GetPipelinesLazyQueryHookResult = ReturnType<typeof useGetPipelinesLazyQuery>;export type GetPipelinesQueryResult = Apollo.QueryResult<GetPipelinesQuery, GetPipelinesQueryVariables>;+export const UpdateOnePipelineProgressDocument = gql`+ mutation UpdateOnePipelineProgress($id: String, $pipelineStageId: String) {+ updateOnePipelineProgress(+ where: {id: $id}+ data: {pipelineStage: {connect: {id: $pipelineStageId}}}+ ) {+ id+ }+}+ `;+export type UpdateOnePipelineProgressMutationFn = Apollo.MutationFunction<UpdateOnePipelineProgressMutation, UpdateOnePipelineProgressMutationVariables>;++/**+ * __useUpdateOnePipelineProgressMutation__+ *+ * To run a mutation, you first call `useUpdateOnePipelineProgressMutation` within a React component and pass it any options that fit your needs.+ * When your component renders, `useUpdateOnePipelineProgressMutation` 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 [updateOnePipelineProgressMutation, { data, loading, error }] = useUpdateOnePipelineProgressMutation({+ * variables: {+ * id: // value for 'id'+ * pipelineStageId: // value for 'pipelineStageId'+ * },+ * });+ */+export function useUpdateOnePipelineProgressMutation(baseOptions?: Apollo.MutationHookOptions<UpdateOnePipelineProgressMutation, UpdateOnePipelineProgressMutationVariables>) {+ const options = {...defaultOptions, ...baseOptions}+ return Apollo.useMutation<UpdateOnePipelineProgressMutation, UpdateOnePipelineProgressMutationVariables>(UpdateOnePipelineProgressDocument, options);+ }+export type UpdateOnePipelineProgressMutationHookResult = ReturnType<typeof useUpdateOnePipelineProgressMutation>;+export type UpdateOnePipelineProgressMutationResult = Apollo.MutationResult<UpdateOnePipelineProgressMutation>;+export type UpdateOnePipelineProgressMutationOptions = Apollo.BaseMutationOptions<UpdateOnePipelineProgressMutation, UpdateOnePipelineProgressMutationVariables>;export const GetPeopleDocument = gql`query GetPeople($orderBy: [PersonOrderByWithRelationInput!], $where: PersonWhereInput, $limit: Int) {people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) {diff --git a/front/src/modules/opportunities/components/Board.tsx b/front/src/modules/opportunities/components/Board.tsxindex 649e708e792..3088026adcd 100644--- a/front/src/modules/opportunities/components/Board.tsx+++ b/front/src/modules/opportunities/components/Board.tsx@@ -4,9 +4,10 @@ import {Draggable,Droppable,OnDragEndResponder,-} from '@hello-pangea/dnd';+} from '@hello-pangea/dnd'; // Atlassian dnd does not support StrictMode from RN 18, so we use a fork @hello-pangea/dnd https://github.com/atlassian/react-beautiful-dnd/issues/2350import {+ BoardItemKey,Column,getOptimisticlyUpdatedBoard,Items,@@ -17,8 +18,6 @@ import {StyledColumn,StyledColumnTitle,} from '../../ui/components/board/BoardColumn';-// Atlassian dnd does not support StrictMode from RN 18, so we use a fork @hello-pangea/dnd-// https://github.com/atlassian/react-beautiful-dnd/issues/2350import { BoardItem } from '../../ui/components/board/BoardItem';import { NewButton } from '../../ui/components/board/BoardNewButton';@@ -27,19 +26,29 @@ import { BoardCard } from './BoardCard';type BoardProps = {initialBoard: Column[];items: Items;+ onUpdate?: (itemKey: BoardItemKey, columnId: Column['id']) => Promise<void>;};-export const Board = ({ initialBoard, items }: BoardProps) => {+export const Board = ({ initialBoard, items, onUpdate }: BoardProps) => {const [board, setBoard] = useState<Column[]>(initialBoard);const onDragEnd: OnDragEndResponder = useCallback(- (result) => {+ async (result) => {const newBoard = getOptimisticlyUpdatedBoard(board, result);if (!newBoard) return;setBoard(newBoard);- // TODO implement update board mutation+ try {+ const draggedEntityId = items[result.draggableId]?.id;+ const destinationColumnId = result.destination?.droppableId;+ draggedEntityId &&+ destinationColumnId &&+ onUpdate &&+ (await onUpdate(draggedEntityId, destinationColumnId));+ } catch (e) {+ console.error(e);+ }},- [board],+ [board, onUpdate, items],);return (diff --git a/front/src/modules/opportunities/components/BoardCard.tsx b/front/src/modules/opportunities/components/BoardCard.tsxindex 0d92f2e0147..6e7f10b7da7 100644--- a/front/src/modules/opportunities/components/BoardCard.tsx+++ b/front/src/modules/opportunities/components/BoardCard.tsx@@ -50,8 +50,9 @@ const StyledBoardCardBody = styled.div``;export const BoardCard = ({ item }: { item: Person | Company }) => {- if (item.__typename === 'Person') return <PersonBoardCard person={item} />;- if (item.__typename === 'Company') return <CompanyBoardCard company={item} />;+ if (item?.__typename === 'Person') return <PersonBoardCard person={item} />;+ if (item?.__typename === 'Company')+ return <CompanyBoardCard company={item} />;// @todo return card skeletonreturn null;};diff --git a/front/src/modules/opportunities/hooks/useBoard.ts b/front/src/modules/opportunities/hooks/useBoard.tsindex 536ee94b8bf..081a0537fc9 100644--- a/front/src/modules/opportunities/hooks/useBoard.ts+++ b/front/src/modules/opportunities/hooks/useBoard.ts@@ -24,38 +24,49 @@ export const useBoard = () => {const pipelineStages = pipelines.data?.findManyPipeline[0].pipelineStages;const initialBoard: Column[] =pipelineStages?.map((pipelineStage) => ({- id: pipelineStage.name,+ id: pipelineStage.id,title: pipelineStage.name,colorCode: pipelineStage.color,itemKeys:pipelineStage.pipelineProgresses?.map(- (item) => `item-${item.progressableId}` as BoardItemKey,+ (item) => item.progressableId as BoardItemKey,) || [],})) || [];const pipelineEntityIds = pipelineStages?.reduce((acc, pipelineStage) => [...acc,- ...(pipelineStage.pipelineProgresses?.map(- (item) => item.progressableId,- ) || []),+ ...(pipelineStage.pipelineProgresses?.map((item) => ({+ entityId: item?.progressableId,+ pipelineProgressId: item?.id,+ })) || []),],- [] as string[],+ [] as { entityId: string; pipelineProgressId: string }[],);+ const pipelineEntityIdsMapper = (entityId: string) => {+ const pipelineProgressId = pipelineEntityIds?.find(+ (item) => item.entityId === entityId,+ )?.pipelineProgressId;++ return pipelineProgressId;+ };+const pipelineEntityType: 'Person' | 'Company' | undefined =- pipelineStages?.[0].pipelineProgresses?.[0].progressableType;+ pipelines.data?.findManyPipeline[0].pipelineProgressableType;const query =pipelineEntityType === 'Person' ? useGetPeopleQuery : useGetCompaniesQuery;const entitiesQueryResult = query({- variables: { where: { id: { in: pipelineEntityIds } } },+ variables: {+ where: { id: { in: pipelineEntityIds?.map((item) => item.entityId) } },+ },});const indexByIdReducer = (acc: Items, entity: { id: string }) => ({...acc,- [`item-${entity.id}`]: entity,+ [entity.id]: entity,});const items: Items | undefined = entitiesQueryResult.data@@ -71,5 +82,6 @@ export const useBoard = () => {items,loading: pipelines.loading || entitiesQueryResult.loading,error: pipelines.error || entitiesQueryResult.error,+ pipelineEntityIdsMapper,};};diff --git a/front/src/modules/opportunities/queries/index.ts b/front/src/modules/opportunities/queries/index.tsindex 48642df343b..17bc09d1e34 100644--- a/front/src/modules/opportunities/queries/index.ts+++ b/front/src/modules/opportunities/queries/index.ts@@ -2,10 +2,12 @@ import { gql } from '@apollo/client';export const GET_PIPELINES = gql`query GetPipelines {- findManyPipeline(skip: 1) {+ findManyPipeline {idname+ pipelineProgressableTypepipelineStages {+ idnamecolorpipelineProgresses {@@ -17,3 +19,14 @@ export const GET_PIPELINES = gql`}}`;++export const UPDATE_PIPELINE_STAGE = gql`+ mutation UpdateOnePipelineProgress($id: String, $pipelineStageId: String) {+ updateOnePipelineProgress(+ where: { id: $id }+ data: { pipelineStage: { connect: { id: $pipelineStageId } } }+ ) {+ id+ }+ }+`;diff --git a/front/src/modules/ui/components/board/Board.tsx b/front/src/modules/ui/components/board/Board.tsxindex 5222b5a59c8..e82072437f1 100644--- a/front/src/modules/ui/components/board/Board.tsx+++ b/front/src/modules/ui/components/board/Board.tsx@@ -1,5 +1,5 @@import styled from '@emotion/styled';-import { DropResult } from '@hello-pangea/dnd';+import { DropResult } from '@hello-pangea/dnd'; // Atlassian dnd does not support StrictMode from RN 18, so we use a fork @hello-pangea/dnd https://github.com/atlassian/react-beautiful-dnd/issues/2350export const StyledBoard = styled.div`display: flex;@@ -7,7 +7,7 @@ export const StyledBoard = styled.div`height: 100%;`;-export type BoardItemKey = `item-${number | string}`;+export type BoardItemKey = string;export type Item = any & { id: string };export interface Items {[key: string]: Item;diff --git a/front/src/modules/ui/components/board/BoardColumn.tsx b/front/src/modules/ui/components/board/BoardColumn.tsxindex 31ac86cb16b..5c77ad7d54e 100644--- a/front/src/modules/ui/components/board/BoardColumn.tsx+++ b/front/src/modules/ui/components/board/BoardColumn.tsx@@ -1,6 +1,6 @@import React from 'react';import styled from '@emotion/styled';-import { DroppableProvided } from '@hello-pangea/dnd';+import { DroppableProvided } from '@hello-pangea/dnd'; // Atlassian dnd does not support StrictMode from RN 18, so we use a fork @hello-pangea/dnd https://github.com/atlassian/react-beautiful-dnd/issues/2350export const StyledColumn = styled.div`background-color: ${({ theme }) => theme.primaryBackground};diff --git a/front/src/modules/ui/components/board/BoardItem.tsx b/front/src/modules/ui/components/board/BoardItem.tsxindex ec1bf5f3d48..a03249bf003 100644--- a/front/src/modules/ui/components/board/BoardItem.tsx+++ b/front/src/modules/ui/components/board/BoardItem.tsx@@ -1,5 +1,5 @@import styled from '@emotion/styled';-import { DraggableProvided } from '@hello-pangea/dnd';+import { DraggableProvided } from '@hello-pangea/dnd'; // Atlassian dnd does not support StrictMode from RN 18, so we use a fork @hello-pangea/dnd https://github.com/atlassian/react-beautiful-dnd/issues/2350const StyledCard = styled.div`background-color: ${({ theme }) => theme.secondaryBackground};diff --git a/front/src/pages/opportunities/Opportunities.tsx b/front/src/pages/opportunities/Opportunities.tsxindex 80f604b6ca8..3e842e90af5 100644--- a/front/src/pages/opportunities/Opportunities.tsx+++ b/front/src/pages/opportunities/Opportunities.tsx@@ -1,11 +1,33 @@+import { useCallback } from 'react';+import { IconTargetArrow } from '@/ui/icons/index';import { WithTopBarContainer } from '@/ui/layout/containers/WithTopBarContainer';+import {+ PipelineProgress,+ PipelineStage,+ useUpdateOnePipelineProgressMutation,+} from '../../generated/graphql';import { Board } from '../../modules/opportunities/components/Board';import { useBoard } from '../../modules/opportunities/hooks/useBoard';export function Opportunities() {- const { initialBoard, items, loading, error } = useBoard();+ const { initialBoard, items, loading, error, pipelineEntityIdsMapper } =+ useBoard();+ const [updatePipelineProgress] = useUpdateOnePipelineProgressMutation();++ const onUpdate = useCallback(+ async (+ entityId: NonNullable<PipelineProgress['progressableId']>,+ pipelineStageId: NonNullable<PipelineStage['id']>,+ ) => {+ const pipelineProgressId = pipelineEntityIdsMapper(entityId);+ updatePipelineProgress({+ variables: { id: pipelineProgressId, pipelineStageId },+ });+ },+ [updatePipelineProgress, pipelineEntityIdsMapper],+ );if (loading) return <div>Loading...</div>;if (error) return <div>Error...</div>;@@ -13,7 +35,7 @@ export function Opportunities() {return <div>Initial board or items not found</div>;return (<WithTopBarContainer title="Opportunities" icon={<IconTargetArrow />}>- <Board initialBoard={initialBoard} items={items} />+ <Board initialBoard={initialBoard} items={items} onUpdate={onUpdate} /></WithTopBarContainer>);}diff --git a/server/src/core/@generated/pipeline/pipeline-count-aggregate.input.ts b/server/src/core/@generated/pipeline/pipeline-count-aggregate.input.tsindex 5df638b2707..668dac3fab6 100644--- a/server/src/core/@generated/pipeline/pipeline-count-aggregate.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-count-aggregate.input.ts@@ -22,6 +22,9 @@ export class PipelineCountAggregateInput {@Field(() => Boolean, { nullable: true })icon?: true;+ @Field(() => Boolean, { nullable: true })+ pipelineProgressableType?: true;+@HideField()workspaceId?: true;diff --git a/server/src/core/@generated/pipeline/pipeline-count-aggregate.output.ts b/server/src/core/@generated/pipeline/pipeline-count-aggregate.output.tsindex d1c04a26833..807b483781d 100644--- a/server/src/core/@generated/pipeline/pipeline-count-aggregate.output.ts+++ b/server/src/core/@generated/pipeline/pipeline-count-aggregate.output.ts@@ -23,6 +23,9 @@ export class PipelineCountAggregate {@Field(() => Int, { nullable: false })icon!: number;+ @Field(() => Int, { nullable: false })+ pipelineProgressableType!: number;+@HideField()workspaceId!: number;diff --git a/server/src/core/@generated/pipeline/pipeline-count-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline/pipeline-count-order-by-aggregate.input.tsindex bdb1bfac91f..d5b5a8c52e0 100644--- a/server/src/core/@generated/pipeline/pipeline-count-order-by-aggregate.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-count-order-by-aggregate.input.ts@@ -23,6 +23,9 @@ export class PipelineCountOrderByAggregateInput {@Field(() => SortOrder, { nullable: true })icon?: keyof typeof SortOrder;+ @Field(() => SortOrder, { nullable: true })+ pipelineProgressableType?: keyof typeof SortOrder;+@HideField()workspaceId?: keyof typeof SortOrder;}diff --git a/server/src/core/@generated/pipeline/pipeline-create-many-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-create-many-workspace.input.tsindex e8a2e6c5547..976a7bc3e6f 100644--- a/server/src/core/@generated/pipeline/pipeline-create-many-workspace.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-create-many-workspace.input.ts@@ -1,5 +1,6 @@import { Field } from '@nestjs/graphql';import { InputType } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';@InputType()export class PipelineCreateManyWorkspaceInput {@@ -20,4 +21,7 @@ export class PipelineCreateManyWorkspaceInput {@Field(() => String, { nullable: false })icon!: string;++ @Field(() => PipelineProgressableType, { nullable: true })+ pipelineProgressableType?: keyof typeof PipelineProgressableType;}diff --git a/server/src/core/@generated/pipeline/pipeline-create-many.input.ts b/server/src/core/@generated/pipeline/pipeline-create-many.input.tsindex 86d4a9fde3a..d7d53d51a4c 100644--- a/server/src/core/@generated/pipeline/pipeline-create-many.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-create-many.input.ts@@ -1,5 +1,6 @@import { Field } from '@nestjs/graphql';import { InputType } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';import { HideField } from '@nestjs/graphql';@InputType()@@ -22,6 +23,9 @@ export class PipelineCreateManyInput {@Field(() => String, { nullable: false })icon!: string;+ @Field(() => PipelineProgressableType, { nullable: true })+ pipelineProgressableType?: keyof typeof PipelineProgressableType;+@HideField()workspaceId!: string;}diff --git a/server/src/core/@generated/pipeline/pipeline-create-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline/pipeline-create-without-pipeline-progresses.input.tsindex afdd036b8cd..1df76dc87f0 100644--- a/server/src/core/@generated/pipeline/pipeline-create-without-pipeline-progresses.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-create-without-pipeline-progresses.input.ts@@ -1,5 +1,6 @@import { Field } from '@nestjs/graphql';import { InputType } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';import { PipelineStageCreateNestedManyWithoutPipelineInput } from '../pipeline-stage/pipeline-stage-create-nested-many-without-pipeline.input';import { WorkspaceCreateNestedOneWithoutPipelinesInput } from '../workspace/workspace-create-nested-one-without-pipelines.input';import { HideField } from '@nestjs/graphql';@@ -24,6 +25,9 @@ export class PipelineCreateWithoutPipelineProgressesInput {@Field(() => String, { nullable: false })icon!: string;+ @Field(() => PipelineProgressableType, { nullable: true })+ pipelineProgressableType?: keyof typeof PipelineProgressableType;+@Field(() => PipelineStageCreateNestedManyWithoutPipelineInput, {nullable: true,})diff --git a/server/src/core/@generated/pipeline/pipeline-create-without-pipeline-stages.input.ts b/server/src/core/@generated/pipeline/pipeline-create-without-pipeline-stages.input.tsindex aa06c3de222..989a0994e18 100644--- a/server/src/core/@generated/pipeline/pipeline-create-without-pipeline-stages.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-create-without-pipeline-stages.input.ts@@ -1,5 +1,6 @@import { Field } from '@nestjs/graphql';import { InputType } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';import { PipelineProgressCreateNestedManyWithoutPipelineInput } from '../pipeline-progress/pipeline-progress-create-nested-many-without-pipeline.input';import { WorkspaceCreateNestedOneWithoutPipelinesInput } from '../workspace/workspace-create-nested-one-without-pipelines.input';import { HideField } from '@nestjs/graphql';@@ -24,6 +25,9 @@ export class PipelineCreateWithoutPipelineStagesInput {@Field(() => String, { nullable: false })icon!: string;+ @Field(() => PipelineProgressableType, { nullable: true })+ pipelineProgressableType?: keyof typeof PipelineProgressableType;+@Field(() => PipelineProgressCreateNestedManyWithoutPipelineInput, {nullable: true,})diff --git a/server/src/core/@generated/pipeline/pipeline-create-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-create-without-workspace.input.tsindex 2d38f21f6a6..722aca336cd 100644--- a/server/src/core/@generated/pipeline/pipeline-create-without-workspace.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-create-without-workspace.input.ts@@ -1,5 +1,6 @@import { Field } from '@nestjs/graphql';import { InputType } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';import { PipelineStageCreateNestedManyWithoutPipelineInput } from '../pipeline-stage/pipeline-stage-create-nested-many-without-pipeline.input';import { PipelineProgressCreateNestedManyWithoutPipelineInput } from '../pipeline-progress/pipeline-progress-create-nested-many-without-pipeline.input';@@ -23,6 +24,9 @@ export class PipelineCreateWithoutWorkspaceInput {@Field(() => String, { nullable: false })icon!: string;+ @Field(() => PipelineProgressableType, { nullable: true })+ pipelineProgressableType?: keyof typeof PipelineProgressableType;+@Field(() => PipelineStageCreateNestedManyWithoutPipelineInput, {nullable: true,})diff --git a/server/src/core/@generated/pipeline/pipeline-create.input.ts b/server/src/core/@generated/pipeline/pipeline-create.input.tsindex c1cae497d60..44d91dfd250 100644--- a/server/src/core/@generated/pipeline/pipeline-create.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-create.input.ts@@ -1,5 +1,6 @@import { Field } from '@nestjs/graphql';import { InputType } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';import { PipelineStageCreateNestedManyWithoutPipelineInput } from '../pipeline-stage/pipeline-stage-create-nested-many-without-pipeline.input';import { PipelineProgressCreateNestedManyWithoutPipelineInput } from '../pipeline-progress/pipeline-progress-create-nested-many-without-pipeline.input';import { WorkspaceCreateNestedOneWithoutPipelinesInput } from '../workspace/workspace-create-nested-one-without-pipelines.input';@@ -25,6 +26,9 @@ export class PipelineCreateInput {@Field(() => String, { nullable: false })icon!: string;+ @Field(() => PipelineProgressableType, { nullable: true })+ pipelineProgressableType?: keyof typeof PipelineProgressableType;+@Field(() => PipelineStageCreateNestedManyWithoutPipelineInput, {nullable: true,})diff --git a/server/src/core/@generated/pipeline/pipeline-group-by.output.ts b/server/src/core/@generated/pipeline/pipeline-group-by.output.tsindex 7ba784a69db..53f4dc6342a 100644--- a/server/src/core/@generated/pipeline/pipeline-group-by.output.ts+++ b/server/src/core/@generated/pipeline/pipeline-group-by.output.ts@@ -1,5 +1,6 @@import { Field } from '@nestjs/graphql';import { ObjectType } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';import { HideField } from '@nestjs/graphql';import { PipelineCountAggregate } from './pipeline-count-aggregate.output';import { PipelineMinAggregate } from './pipeline-min-aggregate.output';@@ -25,6 +26,9 @@ export class PipelineGroupBy {@Field(() => String, { nullable: false })icon!: string;+ @Field(() => PipelineProgressableType, { nullable: false })+ pipelineProgressableType!: keyof typeof PipelineProgressableType;+@HideField()workspaceId!: string;diff --git a/server/src/core/@generated/pipeline/pipeline-max-aggregate.input.ts b/server/src/core/@generated/pipeline/pipeline-max-aggregate.input.tsindex a7231f7b9cc..03f82f570b8 100644--- a/server/src/core/@generated/pipeline/pipeline-max-aggregate.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-max-aggregate.input.ts@@ -22,6 +22,9 @@ export class PipelineMaxAggregateInput {@Field(() => Boolean, { nullable: true })icon?: true;+ @Field(() => Boolean, { nullable: true })+ pipelineProgressableType?: true;+@HideField()workspaceId?: true;}diff --git a/server/src/core/@generated/pipeline/pipeline-max-aggregate.output.ts b/server/src/core/@generated/pipeline/pipeline-max-aggregate.output.tsindex 2045de896fa..3805e0e6dc7 100644--- a/server/src/core/@generated/pipeline/pipeline-max-aggregate.output.ts+++ b/server/src/core/@generated/pipeline/pipeline-max-aggregate.output.ts@@ -1,5 +1,6 @@import { Field } from '@nestjs/graphql';import { ObjectType } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';import { HideField } from '@nestjs/graphql';@ObjectType()@@ -22,6 +23,9 @@ export class PipelineMaxAggregate {@Field(() => String, { nullable: true })icon?: string;+ @Field(() => PipelineProgressableType, { nullable: true })+ pipelineProgressableType?: keyof typeof PipelineProgressableType;+@HideField()workspaceId?: string;}diff --git a/server/src/core/@generated/pipeline/pipeline-max-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline/pipeline-max-order-by-aggregate.input.tsindex b4756bb6ce8..34fb29fa839 100644--- a/server/src/core/@generated/pipeline/pipeline-max-order-by-aggregate.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-max-order-by-aggregate.input.ts@@ -23,6 +23,9 @@ export class PipelineMaxOrderByAggregateInput {@Field(() => SortOrder, { nullable: true })icon?: keyof typeof SortOrder;+ @Field(() => SortOrder, { nullable: true })+ pipelineProgressableType?: keyof typeof SortOrder;+@HideField()workspaceId?: keyof typeof SortOrder;}diff --git a/server/src/core/@generated/pipeline/pipeline-min-aggregate.input.ts b/server/src/core/@generated/pipeline/pipeline-min-aggregate.input.tsindex f703c06c887..29dbf553527 100644--- a/server/src/core/@generated/pipeline/pipeline-min-aggregate.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-min-aggregate.input.ts@@ -22,6 +22,9 @@ export class PipelineMinAggregateInput {@Field(() => Boolean, { nullable: true })icon?: true;+ @Field(() => Boolean, { nullable: true })+ pipelineProgressableType?: true;+@HideField()workspaceId?: true;}diff --git a/server/src/core/@generated/pipeline/pipeline-min-aggregate.output.ts b/server/src/core/@generated/pipeline/pipeline-min-aggregate.output.tsindex 0d29da7eaed..501d1b832f1 100644--- a/server/src/core/@generated/pipeline/pipeline-min-aggregate.output.ts+++ b/server/src/core/@generated/pipeline/pipeline-min-aggregate.output.ts@@ -1,5 +1,6 @@import { Field } from '@nestjs/graphql';import { ObjectType } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';import { HideField } from '@nestjs/graphql';@ObjectType()@@ -22,6 +23,9 @@ export class PipelineMinAggregate {@Field(() => String, { nullable: true })icon?: string;+ @Field(() => PipelineProgressableType, { nullable: true })+ pipelineProgressableType?: keyof typeof PipelineProgressableType;+@HideField()workspaceId?: string;}diff --git a/server/src/core/@generated/pipeline/pipeline-min-order-by-aggregate.input.ts b/server/src/core/@generated/pipeline/pipeline-min-order-by-aggregate.input.tsindex 5104ae2fe25..d018092f3f0 100644--- a/server/src/core/@generated/pipeline/pipeline-min-order-by-aggregate.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-min-order-by-aggregate.input.ts@@ -23,6 +23,9 @@ export class PipelineMinOrderByAggregateInput {@Field(() => SortOrder, { nullable: true })icon?: keyof typeof SortOrder;+ @Field(() => SortOrder, { nullable: true })+ pipelineProgressableType?: keyof typeof SortOrder;+@HideField()workspaceId?: keyof typeof SortOrder;}diff --git a/server/src/core/@generated/pipeline/pipeline-order-by-with-aggregation.input.ts b/server/src/core/@generated/pipeline/pipeline-order-by-with-aggregation.input.tsindex 99dfe6d08b9..c5485b161db 100644--- a/server/src/core/@generated/pipeline/pipeline-order-by-with-aggregation.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-order-by-with-aggregation.input.ts@@ -26,6 +26,9 @@ export class PipelineOrderByWithAggregationInput {@Field(() => SortOrder, { nullable: true })icon?: keyof typeof SortOrder;+ @Field(() => SortOrder, { nullable: true })+ pipelineProgressableType?: keyof typeof SortOrder;+@HideField()workspaceId?: keyof typeof SortOrder;diff --git a/server/src/core/@generated/pipeline/pipeline-order-by-with-relation.input.ts b/server/src/core/@generated/pipeline/pipeline-order-by-with-relation.input.tsindex 40f7cfc86d1..9b0febeed75 100644--- a/server/src/core/@generated/pipeline/pipeline-order-by-with-relation.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-order-by-with-relation.input.ts@@ -26,6 +26,9 @@ export class PipelineOrderByWithRelationInput {@Field(() => SortOrder, { nullable: true })icon?: keyof typeof SortOrder;+ @Field(() => SortOrder, { nullable: true })+ pipelineProgressableType?: keyof typeof SortOrder;+@HideField()workspaceId?: keyof typeof SortOrder;diff --git a/server/src/core/@generated/pipeline/pipeline-scalar-field.enum.ts b/server/src/core/@generated/pipeline/pipeline-scalar-field.enum.tsindex 06fe58077cd..4a28574b671 100644--- a/server/src/core/@generated/pipeline/pipeline-scalar-field.enum.ts+++ b/server/src/core/@generated/pipeline/pipeline-scalar-field.enum.ts@@ -7,6 +7,7 @@ export enum PipelineScalarFieldEnum {deletedAt = 'deletedAt',name = 'name',icon = 'icon',+ pipelineProgressableType = 'pipelineProgressableType',workspaceId = 'workspaceId',}diff --git a/server/src/core/@generated/pipeline/pipeline-scalar-where-with-aggregates.input.ts b/server/src/core/@generated/pipeline/pipeline-scalar-where-with-aggregates.input.tsindex 714ee58a31e..7091c6a2a85 100644--- a/server/src/core/@generated/pipeline/pipeline-scalar-where-with-aggregates.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-scalar-where-with-aggregates.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringWithAggregatesFilter } from '../prisma/string-with-aggregates-filter.input';import { DateTimeWithAggregatesFilter } from '../prisma/date-time-with-aggregates-filter.input';import { DateTimeNullableWithAggregatesFilter } from '../prisma/date-time-nullable-with-aggregates-filter.input';+import { EnumPipelineProgressableTypeWithAggregatesFilter } from '../prisma/enum-pipeline-progressable-type-with-aggregates-filter.input';import { HideField } from '@nestjs/graphql';@InputType()@@ -34,6 +35,11 @@ export class PipelineScalarWhereWithAggregatesInput {@Field(() => StringWithAggregatesFilter, { nullable: true })icon?: StringWithAggregatesFilter;+ @Field(() => EnumPipelineProgressableTypeWithAggregatesFilter, {+ nullable: true,+ })+ pipelineProgressableType?: EnumPipelineProgressableTypeWithAggregatesFilter;+@HideField()workspaceId?: StringWithAggregatesFilter;}diff --git a/server/src/core/@generated/pipeline/pipeline-scalar-where.input.ts b/server/src/core/@generated/pipeline/pipeline-scalar-where.input.tsindex 17368b5d221..c868d6bda1f 100644--- a/server/src/core/@generated/pipeline/pipeline-scalar-where.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-scalar-where.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringFilter } from '../prisma/string-filter.input';import { DateTimeFilter } from '../prisma/date-time-filter.input';import { DateTimeNullableFilter } from '../prisma/date-time-nullable-filter.input';+import { EnumPipelineProgressableTypeFilter } from '../prisma/enum-pipeline-progressable-type-filter.input';import { HideField } from '@nestjs/graphql';@InputType()@@ -34,6 +35,9 @@ export class PipelineScalarWhereInput {@Field(() => StringFilter, { nullable: true })icon?: StringFilter;+ @Field(() => EnumPipelineProgressableTypeFilter, { nullable: true })+ pipelineProgressableType?: EnumPipelineProgressableTypeFilter;+@HideField()workspaceId?: StringFilter;}diff --git a/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-pipeline-progresses.input.tsindex de88f081c30..70aa0042597 100644--- a/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-pipeline-progresses.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-pipeline-progresses.input.ts@@ -1,5 +1,6 @@import { Field } from '@nestjs/graphql';import { InputType } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';import { HideField } from '@nestjs/graphql';import { PipelineStageUncheckedCreateNestedManyWithoutPipelineInput } from '../pipeline-stage/pipeline-stage-unchecked-create-nested-many-without-pipeline.input';@@ -23,6 +24,9 @@ export class PipelineUncheckedCreateWithoutPipelineProgressesInput {@Field(() => String, { nullable: false })icon!: string;+ @Field(() => PipelineProgressableType, { nullable: true })+ pipelineProgressableType?: keyof typeof PipelineProgressableType;+@HideField()workspaceId!: string;diff --git a/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-pipeline-stages.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-pipeline-stages.input.tsindex 3ebcea2368a..70865a129d9 100644--- a/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-pipeline-stages.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-pipeline-stages.input.ts@@ -1,5 +1,6 @@import { Field } from '@nestjs/graphql';import { InputType } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';import { HideField } from '@nestjs/graphql';import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineInput } from '../pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline.input';@@ -23,6 +24,9 @@ export class PipelineUncheckedCreateWithoutPipelineStagesInput {@Field(() => String, { nullable: false })icon!: string;+ @Field(() => PipelineProgressableType, { nullable: true })+ pipelineProgressableType?: keyof typeof PipelineProgressableType;+@HideField()workspaceId!: string;diff --git a/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-workspace.input.tsindex 38aa90de0be..6abce866e23 100644--- a/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-workspace.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-unchecked-create-without-workspace.input.ts@@ -1,5 +1,6 @@import { Field } from '@nestjs/graphql';import { InputType } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';import { PipelineStageUncheckedCreateNestedManyWithoutPipelineInput } from '../pipeline-stage/pipeline-stage-unchecked-create-nested-many-without-pipeline.input';import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineInput } from '../pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline.input';@@ -23,6 +24,9 @@ export class PipelineUncheckedCreateWithoutWorkspaceInput {@Field(() => String, { nullable: false })icon!: string;+ @Field(() => PipelineProgressableType, { nullable: true })+ pipelineProgressableType?: keyof typeof PipelineProgressableType;+@Field(() => PipelineStageUncheckedCreateNestedManyWithoutPipelineInput, {nullable: true,})diff --git a/server/src/core/@generated/pipeline/pipeline-unchecked-create.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-create.input.tsindex 6f966e72d5f..785c8087fe2 100644--- a/server/src/core/@generated/pipeline/pipeline-unchecked-create.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-unchecked-create.input.ts@@ -1,5 +1,6 @@import { Field } from '@nestjs/graphql';import { InputType } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';import { HideField } from '@nestjs/graphql';import { PipelineStageUncheckedCreateNestedManyWithoutPipelineInput } from '../pipeline-stage/pipeline-stage-unchecked-create-nested-many-without-pipeline.input';import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineInput } from '../pipeline-progress/pipeline-progress-unchecked-create-nested-many-without-pipeline.input';@@ -24,6 +25,9 @@ export class PipelineUncheckedCreateInput {@Field(() => String, { nullable: false })icon!: string;+ @Field(() => PipelineProgressableType, { nullable: true })+ pipelineProgressableType?: keyof typeof PipelineProgressableType;+@HideField()workspaceId!: string;diff --git a/server/src/core/@generated/pipeline/pipeline-unchecked-update-many-without-pipelines.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-update-many-without-pipelines.input.tsindex ce660318fac..e194471e3fc 100644--- a/server/src/core/@generated/pipeline/pipeline-unchecked-update-many-without-pipelines.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-unchecked-update-many-without-pipelines.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';+import { EnumPipelineProgressableTypeFieldUpdateOperationsInput } from '../prisma/enum-pipeline-progressable-type-field-update-operations.input';@InputType()export class PipelineUncheckedUpdateManyWithoutPipelinesInput {@@ -23,4 +24,9 @@ export class PipelineUncheckedUpdateManyWithoutPipelinesInput {@Field(() => StringFieldUpdateOperationsInput, { nullable: true })icon?: StringFieldUpdateOperationsInput;++ @Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {+ nullable: true,+ })+ pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;}diff --git a/server/src/core/@generated/pipeline/pipeline-unchecked-update-many.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-update-many.input.tsindex 151506864fe..b2cedcfd340 100644--- a/server/src/core/@generated/pipeline/pipeline-unchecked-update-many.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-unchecked-update-many.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';+import { EnumPipelineProgressableTypeFieldUpdateOperationsInput } from '../prisma/enum-pipeline-progressable-type-field-update-operations.input';import { HideField } from '@nestjs/graphql';@InputType()@@ -25,6 +26,11 @@ export class PipelineUncheckedUpdateManyInput {@Field(() => StringFieldUpdateOperationsInput, { nullable: true })icon?: StringFieldUpdateOperationsInput;+ @Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {+ nullable: true,+ })+ pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;+@HideField()workspaceId?: StringFieldUpdateOperationsInput;}diff --git a/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-pipeline-progresses.input.tsindex 7fbe813f9b4..42f4bbecc8e 100644--- a/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-pipeline-progresses.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-pipeline-progresses.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';+import { EnumPipelineProgressableTypeFieldUpdateOperationsInput } from '../prisma/enum-pipeline-progressable-type-field-update-operations.input';import { HideField } from '@nestjs/graphql';import { PipelineStageUncheckedUpdateManyWithoutPipelineNestedInput } from '../pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-nested.input';@@ -26,6 +27,11 @@ export class PipelineUncheckedUpdateWithoutPipelineProgressesInput {@Field(() => StringFieldUpdateOperationsInput, { nullable: true })icon?: StringFieldUpdateOperationsInput;+ @Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {+ nullable: true,+ })+ pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;+@HideField()workspaceId?: StringFieldUpdateOperationsInput;diff --git a/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-pipeline-stages.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-pipeline-stages.input.tsindex 43e67789d32..9d7859fb082 100644--- a/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-pipeline-stages.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-pipeline-stages.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';+import { EnumPipelineProgressableTypeFieldUpdateOperationsInput } from '../prisma/enum-pipeline-progressable-type-field-update-operations.input';import { HideField } from '@nestjs/graphql';import { PipelineProgressUncheckedUpdateManyWithoutPipelineNestedInput } from '../pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-nested.input';@@ -26,6 +27,11 @@ export class PipelineUncheckedUpdateWithoutPipelineStagesInput {@Field(() => StringFieldUpdateOperationsInput, { nullable: true })icon?: StringFieldUpdateOperationsInput;+ @Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {+ nullable: true,+ })+ pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;+@HideField()workspaceId?: StringFieldUpdateOperationsInput;diff --git a/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-workspace.input.tsindex 321a096c166..c6e69123135 100644--- a/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-workspace.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-unchecked-update-without-workspace.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';+import { EnumPipelineProgressableTypeFieldUpdateOperationsInput } from '../prisma/enum-pipeline-progressable-type-field-update-operations.input';import { PipelineStageUncheckedUpdateManyWithoutPipelineNestedInput } from '../pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-nested.input';import { PipelineProgressUncheckedUpdateManyWithoutPipelineNestedInput } from '../pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-nested.input';@@ -26,6 +27,11 @@ export class PipelineUncheckedUpdateWithoutWorkspaceInput {@Field(() => StringFieldUpdateOperationsInput, { nullable: true })icon?: StringFieldUpdateOperationsInput;+ @Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {+ nullable: true,+ })+ pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;+@Field(() => PipelineStageUncheckedUpdateManyWithoutPipelineNestedInput, {nullable: true,})diff --git a/server/src/core/@generated/pipeline/pipeline-unchecked-update.input.ts b/server/src/core/@generated/pipeline/pipeline-unchecked-update.input.tsindex cf77fa22711..1c969128680 100644--- a/server/src/core/@generated/pipeline/pipeline-unchecked-update.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-unchecked-update.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';+import { EnumPipelineProgressableTypeFieldUpdateOperationsInput } from '../prisma/enum-pipeline-progressable-type-field-update-operations.input';import { HideField } from '@nestjs/graphql';import { PipelineStageUncheckedUpdateManyWithoutPipelineNestedInput } from '../pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-nested.input';import { PipelineProgressUncheckedUpdateManyWithoutPipelineNestedInput } from '../pipeline-progress/pipeline-progress-unchecked-update-many-without-pipeline-nested.input';@@ -27,6 +28,11 @@ export class PipelineUncheckedUpdateInput {@Field(() => StringFieldUpdateOperationsInput, { nullable: true })icon?: StringFieldUpdateOperationsInput;+ @Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {+ nullable: true,+ })+ pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;+@HideField()workspaceId?: StringFieldUpdateOperationsInput;diff --git a/server/src/core/@generated/pipeline/pipeline-update-many-mutation.input.ts b/server/src/core/@generated/pipeline/pipeline-update-many-mutation.input.tsindex 8d0a6a13ee1..81b59f93d41 100644--- a/server/src/core/@generated/pipeline/pipeline-update-many-mutation.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-update-many-mutation.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';+import { EnumPipelineProgressableTypeFieldUpdateOperationsInput } from '../prisma/enum-pipeline-progressable-type-field-update-operations.input';@InputType()export class PipelineUpdateManyMutationInput {@@ -23,4 +24,9 @@ export class PipelineUpdateManyMutationInput {@Field(() => StringFieldUpdateOperationsInput, { nullable: true })icon?: StringFieldUpdateOperationsInput;++ @Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {+ nullable: true,+ })+ pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;}diff --git a/server/src/core/@generated/pipeline/pipeline-update-without-pipeline-progresses.input.ts b/server/src/core/@generated/pipeline/pipeline-update-without-pipeline-progresses.input.tsindex 42a8cdfe68e..1c50efc2aab 100644--- a/server/src/core/@generated/pipeline/pipeline-update-without-pipeline-progresses.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-update-without-pipeline-progresses.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';+import { EnumPipelineProgressableTypeFieldUpdateOperationsInput } from '../prisma/enum-pipeline-progressable-type-field-update-operations.input';import { PipelineStageUpdateManyWithoutPipelineNestedInput } from '../pipeline-stage/pipeline-stage-update-many-without-pipeline-nested.input';import { WorkspaceUpdateOneRequiredWithoutPipelinesNestedInput } from '../workspace/workspace-update-one-required-without-pipelines-nested.input';import { HideField } from '@nestjs/graphql';@@ -27,6 +28,11 @@ export class PipelineUpdateWithoutPipelineProgressesInput {@Field(() => StringFieldUpdateOperationsInput, { nullable: true })icon?: StringFieldUpdateOperationsInput;+ @Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {+ nullable: true,+ })+ pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;+@Field(() => PipelineStageUpdateManyWithoutPipelineNestedInput, {nullable: true,})diff --git a/server/src/core/@generated/pipeline/pipeline-update-without-pipeline-stages.input.ts b/server/src/core/@generated/pipeline/pipeline-update-without-pipeline-stages.input.tsindex cd70596b3a6..47b85f7c703 100644--- a/server/src/core/@generated/pipeline/pipeline-update-without-pipeline-stages.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-update-without-pipeline-stages.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';+import { EnumPipelineProgressableTypeFieldUpdateOperationsInput } from '../prisma/enum-pipeline-progressable-type-field-update-operations.input';import { PipelineProgressUpdateManyWithoutPipelineNestedInput } from '../pipeline-progress/pipeline-progress-update-many-without-pipeline-nested.input';import { WorkspaceUpdateOneRequiredWithoutPipelinesNestedInput } from '../workspace/workspace-update-one-required-without-pipelines-nested.input';import { HideField } from '@nestjs/graphql';@@ -27,6 +28,11 @@ export class PipelineUpdateWithoutPipelineStagesInput {@Field(() => StringFieldUpdateOperationsInput, { nullable: true })icon?: StringFieldUpdateOperationsInput;+ @Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {+ nullable: true,+ })+ pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;+@Field(() => PipelineProgressUpdateManyWithoutPipelineNestedInput, {nullable: true,})diff --git a/server/src/core/@generated/pipeline/pipeline-update-without-workspace.input.ts b/server/src/core/@generated/pipeline/pipeline-update-without-workspace.input.tsindex 925e10e344a..b44919de088 100644--- a/server/src/core/@generated/pipeline/pipeline-update-without-workspace.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-update-without-workspace.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';+import { EnumPipelineProgressableTypeFieldUpdateOperationsInput } from '../prisma/enum-pipeline-progressable-type-field-update-operations.input';import { PipelineStageUpdateManyWithoutPipelineNestedInput } from '../pipeline-stage/pipeline-stage-update-many-without-pipeline-nested.input';import { PipelineProgressUpdateManyWithoutPipelineNestedInput } from '../pipeline-progress/pipeline-progress-update-many-without-pipeline-nested.input';@@ -26,6 +27,11 @@ export class PipelineUpdateWithoutWorkspaceInput {@Field(() => StringFieldUpdateOperationsInput, { nullable: true })icon?: StringFieldUpdateOperationsInput;+ @Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {+ nullable: true,+ })+ pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;+@Field(() => PipelineStageUpdateManyWithoutPipelineNestedInput, {nullable: true,})diff --git a/server/src/core/@generated/pipeline/pipeline-update.input.ts b/server/src/core/@generated/pipeline/pipeline-update.input.tsindex f0114fd2dcf..16ad842905f 100644--- a/server/src/core/@generated/pipeline/pipeline-update.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-update.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';+import { EnumPipelineProgressableTypeFieldUpdateOperationsInput } from '../prisma/enum-pipeline-progressable-type-field-update-operations.input';import { PipelineStageUpdateManyWithoutPipelineNestedInput } from '../pipeline-stage/pipeline-stage-update-many-without-pipeline-nested.input';import { PipelineProgressUpdateManyWithoutPipelineNestedInput } from '../pipeline-progress/pipeline-progress-update-many-without-pipeline-nested.input';import { WorkspaceUpdateOneRequiredWithoutPipelinesNestedInput } from '../workspace/workspace-update-one-required-without-pipelines-nested.input';@@ -28,6 +29,11 @@ export class PipelineUpdateInput {@Field(() => StringFieldUpdateOperationsInput, { nullable: true })icon?: StringFieldUpdateOperationsInput;+ @Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {+ nullable: true,+ })+ pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;+@Field(() => PipelineStageUpdateManyWithoutPipelineNestedInput, {nullable: true,})diff --git a/server/src/core/@generated/pipeline/pipeline-where.input.ts b/server/src/core/@generated/pipeline/pipeline-where.input.tsindex a3e5b4cdf13..335e0425ff2 100644--- a/server/src/core/@generated/pipeline/pipeline-where.input.ts+++ b/server/src/core/@generated/pipeline/pipeline-where.input.ts@@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';import { StringFilter } from '../prisma/string-filter.input';import { DateTimeFilter } from '../prisma/date-time-filter.input';import { DateTimeNullableFilter } from '../prisma/date-time-nullable-filter.input';+import { EnumPipelineProgressableTypeFilter } from '../prisma/enum-pipeline-progressable-type-filter.input';import { HideField } from '@nestjs/graphql';import { PipelineStageListRelationFilter } from '../pipeline-stage/pipeline-stage-list-relation-filter.input';import { PipelineProgressListRelationFilter } from '../pipeline-progress/pipeline-progress-list-relation-filter.input';@@ -37,6 +38,9 @@ export class PipelineWhereInput {@Field(() => StringFilter, { nullable: true })icon?: StringFilter;+ @Field(() => EnumPipelineProgressableTypeFilter, { nullable: true })+ pipelineProgressableType?: EnumPipelineProgressableTypeFilter;+@HideField()workspaceId?: StringFilter;diff --git a/server/src/core/@generated/pipeline/pipeline.model.ts b/server/src/core/@generated/pipeline/pipeline.model.tsindex a56ba1d9144..3f5caa8254b 100644--- a/server/src/core/@generated/pipeline/pipeline.model.ts+++ b/server/src/core/@generated/pipeline/pipeline.model.ts@@ -1,6 +1,7 @@import { Field } from '@nestjs/graphql';import { ObjectType } from '@nestjs/graphql';import { ID } from '@nestjs/graphql';+import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';import { HideField } from '@nestjs/graphql';import { PipelineStage } from '../pipeline-stage/pipeline-stage.model';import { PipelineProgress } from '../pipeline-progress/pipeline-progress.model';@@ -27,6 +28,12 @@ export class Pipeline {@Field(() => String, { nullable: false })icon!: string;+ @Field(() => PipelineProgressableType, {+ nullable: false,+ defaultValue: 'Company',+ })+ pipelineProgressableType!: keyof typeof PipelineProgressableType;+@HideField()workspaceId!: string;diff --git a/server/src/database/migrations/20230619143949_add_progressable_type_on_pipeline/migration.sql b/server/src/database/migrations/20230619143949_add_progressable_type_on_pipeline/migration.sqlnew file mode 100644index 00000000000..31dddc6af5f--- /dev/null+++ b/server/src/database/migrations/20230619143949_add_progressable_type_on_pipeline/migration.sql@@ -0,0 +1,2 @@+-- AlterTable+ALTER TABLE "pipelines" ADD COLUMN "pipelineProgressableType" "PipelineProgressableType" NOT NULL DEFAULT 'Company';diff --git a/server/src/database/schema.prisma b/server/src/database/schema.prismaindex 80d208c1657..ee7b35d3fe0 100644--- a/server/src/database/schema.prisma+++ b/server/src/database/schema.prisma@@ -293,6 +293,7 @@ model Pipeline {icon StringpipelineStages PipelineStage[]pipelineProgresses PipelineProgress[]+ pipelineProgressableType PipelineProgressableType @default(Company)/// @TypeGraphQL.omit(input: true, output: true)workspaceId String/// @TypeGraphQL.omit(input: true, output: true)diff --git a/server/src/database/seeds/pipelines.ts b/server/src/database/seeds/pipelines.tsindex b5985cdd036..c27b19333c7 100644--- a/server/src/database/seeds/pipelines.ts+++ b/server/src/database/seeds/pipelines.ts@@ -8,6 +8,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {name: 'Sales pipeline',icon: '💰',workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',+ pipelineProgressableType: 'Person',},});@@ -97,6 +98,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {name: 'Customer support pipeline',icon: '📔',workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',+ pipelineProgressableType: 'Person',},});@@ -134,6 +136,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {name: 'Sales pipeline',icon: '💰',workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420',+ pipelineProgressableType: 'Person',},});@@ -201,17 +204,4 @@ export const seedPipelines = async (prisma: PrismaClient) => {workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420',},});-- await prisma.pipelineProgress.upsert({- where: { id: 'twenty-dev-fe256b39-3ec3-4fe7-8998-b76aa0bfb600' },- update: {},- create: {- id: 'twenty-dev-fe256b39-3ec3-4fe7-8998-b76aa0bfb600',- pipelineId: 'twenty-dev-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',- pipelineStageId: 'twenty-dev-fe256b39-3ec3-4fe3-8998-b76aa0bfb600',- progressableType: 'Company',- progressableId: 'twenty-dev-a674fa6c-1455-4c57-afaf-dd5dc086361e',- workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420',- },- });};