Persist update on board drag and drop (#328)
* chore: move dnd lib comment aligned with import * feature: add onUpdate on board * chore: remove multi entity pipelines * feature: add pipelineProgressableType field * feature: fetch progressableType in board * feature: implement on update to persist progress change
This commit is contained in:
@ -975,6 +975,7 @@ export type Pipeline = {
|
|||||||
icon: Scalars['String'];
|
icon: Scalars['String'];
|
||||||
id: Scalars['ID'];
|
id: Scalars['ID'];
|
||||||
name: Scalars['String'];
|
name: Scalars['String'];
|
||||||
|
pipelineProgressableType: PipelineProgressableType;
|
||||||
pipelineProgresses?: Maybe<Array<PipelineProgress>>;
|
pipelineProgresses?: Maybe<Array<PipelineProgress>>;
|
||||||
pipelineStages?: Maybe<Array<PipelineStage>>;
|
pipelineStages?: Maybe<Array<PipelineStage>>;
|
||||||
updatedAt: Scalars['DateTime'];
|
updatedAt: Scalars['DateTime'];
|
||||||
@ -990,6 +991,7 @@ export type PipelineOrderByWithRelationInput = {
|
|||||||
icon?: InputMaybe<SortOrder>;
|
icon?: InputMaybe<SortOrder>;
|
||||||
id?: InputMaybe<SortOrder>;
|
id?: InputMaybe<SortOrder>;
|
||||||
name?: InputMaybe<SortOrder>;
|
name?: InputMaybe<SortOrder>;
|
||||||
|
pipelineProgressableType?: InputMaybe<SortOrder>;
|
||||||
pipelineProgresses?: InputMaybe<PipelineProgressOrderByRelationAggregateInput>;
|
pipelineProgresses?: InputMaybe<PipelineProgressOrderByRelationAggregateInput>;
|
||||||
pipelineStages?: InputMaybe<PipelineStageOrderByRelationAggregateInput>;
|
pipelineStages?: InputMaybe<PipelineStageOrderByRelationAggregateInput>;
|
||||||
updatedAt?: InputMaybe<SortOrder>;
|
updatedAt?: InputMaybe<SortOrder>;
|
||||||
@ -1102,6 +1104,7 @@ export enum PipelineScalarFieldEnum {
|
|||||||
Icon = 'icon',
|
Icon = 'icon',
|
||||||
Id = 'id',
|
Id = 'id',
|
||||||
Name = 'name',
|
Name = 'name',
|
||||||
|
PipelineProgressableType = 'pipelineProgressableType',
|
||||||
UpdatedAt = 'updatedAt',
|
UpdatedAt = 'updatedAt',
|
||||||
WorkspaceId = 'workspaceId'
|
WorkspaceId = 'workspaceId'
|
||||||
}
|
}
|
||||||
@ -1201,6 +1204,7 @@ export type PipelineWhereInput = {
|
|||||||
icon?: InputMaybe<StringFilter>;
|
icon?: InputMaybe<StringFilter>;
|
||||||
id?: InputMaybe<StringFilter>;
|
id?: InputMaybe<StringFilter>;
|
||||||
name?: InputMaybe<StringFilter>;
|
name?: InputMaybe<StringFilter>;
|
||||||
|
pipelineProgressableType?: InputMaybe<EnumPipelineProgressableTypeFilter>;
|
||||||
pipelineProgresses?: InputMaybe<PipelineProgressListRelationFilter>;
|
pipelineProgresses?: InputMaybe<PipelineProgressListRelationFilter>;
|
||||||
pipelineStages?: InputMaybe<PipelineStageListRelationFilter>;
|
pipelineStages?: InputMaybe<PipelineStageListRelationFilter>;
|
||||||
updatedAt?: InputMaybe<DateTimeFilter>;
|
updatedAt?: InputMaybe<DateTimeFilter>;
|
||||||
@ -1625,7 +1629,15 @@ export type DeleteCompaniesMutation = { __typename?: 'Mutation', deleteManyCompa
|
|||||||
export type GetPipelinesQueryVariables = Exact<{ [key: string]: never; }>;
|
export 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<{
|
export type GetPeopleQueryVariables = Exact<{
|
||||||
orderBy?: InputMaybe<Array<PersonOrderByWithRelationInput> | PersonOrderByWithRelationInput>;
|
orderBy?: InputMaybe<Array<PersonOrderByWithRelationInput> | PersonOrderByWithRelationInput>;
|
||||||
@ -2199,10 +2211,12 @@ export type DeleteCompaniesMutationResult = Apollo.MutationResult<DeleteCompanie
|
|||||||
export type DeleteCompaniesMutationOptions = Apollo.BaseMutationOptions<DeleteCompaniesMutation, DeleteCompaniesMutationVariables>;
|
export type DeleteCompaniesMutationOptions = Apollo.BaseMutationOptions<DeleteCompaniesMutation, DeleteCompaniesMutationVariables>;
|
||||||
export const GetPipelinesDocument = gql`
|
export const GetPipelinesDocument = gql`
|
||||||
query GetPipelines {
|
query GetPipelines {
|
||||||
findManyPipeline(skip: 1) {
|
findManyPipeline {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
pipelineProgressableType
|
||||||
pipelineStages {
|
pipelineStages {
|
||||||
|
id
|
||||||
name
|
name
|
||||||
color
|
color
|
||||||
pipelineProgresses {
|
pipelineProgresses {
|
||||||
@ -2241,6 +2255,43 @@ export function useGetPipelinesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptio
|
|||||||
export type GetPipelinesQueryHookResult = ReturnType<typeof useGetPipelinesQuery>;
|
export type GetPipelinesQueryHookResult = ReturnType<typeof useGetPipelinesQuery>;
|
||||||
export type GetPipelinesLazyQueryHookResult = ReturnType<typeof useGetPipelinesLazyQuery>;
|
export type GetPipelinesLazyQueryHookResult = ReturnType<typeof useGetPipelinesLazyQuery>;
|
||||||
export type GetPipelinesQueryResult = Apollo.QueryResult<GetPipelinesQuery, GetPipelinesQueryVariables>;
|
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`
|
export const GetPeopleDocument = gql`
|
||||||
query GetPeople($orderBy: [PersonOrderByWithRelationInput!], $where: PersonWhereInput, $limit: Int) {
|
query GetPeople($orderBy: [PersonOrderByWithRelationInput!], $where: PersonWhereInput, $limit: Int) {
|
||||||
people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) {
|
people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) {
|
||||||
|
|||||||
@ -4,9 +4,10 @@ import {
|
|||||||
Draggable,
|
Draggable,
|
||||||
Droppable,
|
Droppable,
|
||||||
OnDragEndResponder,
|
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/2350
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
BoardItemKey,
|
||||||
Column,
|
Column,
|
||||||
getOptimisticlyUpdatedBoard,
|
getOptimisticlyUpdatedBoard,
|
||||||
Items,
|
Items,
|
||||||
@ -17,8 +18,6 @@ import {
|
|||||||
StyledColumn,
|
StyledColumn,
|
||||||
StyledColumnTitle,
|
StyledColumnTitle,
|
||||||
} from '../../ui/components/board/BoardColumn';
|
} 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/2350
|
|
||||||
import { BoardItem } from '../../ui/components/board/BoardItem';
|
import { BoardItem } from '../../ui/components/board/BoardItem';
|
||||||
import { NewButton } from '../../ui/components/board/BoardNewButton';
|
import { NewButton } from '../../ui/components/board/BoardNewButton';
|
||||||
|
|
||||||
@ -27,19 +26,29 @@ import { BoardCard } from './BoardCard';
|
|||||||
type BoardProps = {
|
type BoardProps = {
|
||||||
initialBoard: Column[];
|
initialBoard: Column[];
|
||||||
items: Items;
|
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 [board, setBoard] = useState<Column[]>(initialBoard);
|
||||||
|
|
||||||
const onDragEnd: OnDragEndResponder = useCallback(
|
const onDragEnd: OnDragEndResponder = useCallback(
|
||||||
(result) => {
|
async (result) => {
|
||||||
const newBoard = getOptimisticlyUpdatedBoard(board, result);
|
const newBoard = getOptimisticlyUpdatedBoard(board, result);
|
||||||
if (!newBoard) return;
|
if (!newBoard) return;
|
||||||
setBoard(newBoard);
|
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 (
|
return (
|
||||||
|
|||||||
@ -50,8 +50,9 @@ const StyledBoardCardBody = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const BoardCard = ({ item }: { item: Person | Company }) => {
|
export const BoardCard = ({ item }: { item: Person | Company }) => {
|
||||||
if (item.__typename === 'Person') return <PersonBoardCard person={item} />;
|
if (item?.__typename === 'Person') return <PersonBoardCard person={item} />;
|
||||||
if (item.__typename === 'Company') return <CompanyBoardCard company={item} />;
|
if (item?.__typename === 'Company')
|
||||||
|
return <CompanyBoardCard company={item} />;
|
||||||
// @todo return card skeleton
|
// @todo return card skeleton
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -24,38 +24,49 @@ export const useBoard = () => {
|
|||||||
const pipelineStages = pipelines.data?.findManyPipeline[0].pipelineStages;
|
const pipelineStages = pipelines.data?.findManyPipeline[0].pipelineStages;
|
||||||
const initialBoard: Column[] =
|
const initialBoard: Column[] =
|
||||||
pipelineStages?.map((pipelineStage) => ({
|
pipelineStages?.map((pipelineStage) => ({
|
||||||
id: pipelineStage.name,
|
id: pipelineStage.id,
|
||||||
title: pipelineStage.name,
|
title: pipelineStage.name,
|
||||||
colorCode: pipelineStage.color,
|
colorCode: pipelineStage.color,
|
||||||
itemKeys:
|
itemKeys:
|
||||||
pipelineStage.pipelineProgresses?.map(
|
pipelineStage.pipelineProgresses?.map(
|
||||||
(item) => `item-${item.progressableId}` as BoardItemKey,
|
(item) => item.progressableId as BoardItemKey,
|
||||||
) || [],
|
) || [],
|
||||||
})) || [];
|
})) || [];
|
||||||
|
|
||||||
const pipelineEntityIds = pipelineStages?.reduce(
|
const pipelineEntityIds = pipelineStages?.reduce(
|
||||||
(acc, pipelineStage) => [
|
(acc, pipelineStage) => [
|
||||||
...acc,
|
...acc,
|
||||||
...(pipelineStage.pipelineProgresses?.map(
|
...(pipelineStage.pipelineProgresses?.map((item) => ({
|
||||||
(item) => item.progressableId,
|
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 =
|
const pipelineEntityType: 'Person' | 'Company' | undefined =
|
||||||
pipelineStages?.[0].pipelineProgresses?.[0].progressableType;
|
pipelines.data?.findManyPipeline[0].pipelineProgressableType;
|
||||||
|
|
||||||
const query =
|
const query =
|
||||||
pipelineEntityType === 'Person' ? useGetPeopleQuery : useGetCompaniesQuery;
|
pipelineEntityType === 'Person' ? useGetPeopleQuery : useGetCompaniesQuery;
|
||||||
|
|
||||||
const entitiesQueryResult = query({
|
const entitiesQueryResult = query({
|
||||||
variables: { where: { id: { in: pipelineEntityIds } } },
|
variables: {
|
||||||
|
where: { id: { in: pipelineEntityIds?.map((item) => item.entityId) } },
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const indexByIdReducer = (acc: Items, entity: { id: string }) => ({
|
const indexByIdReducer = (acc: Items, entity: { id: string }) => ({
|
||||||
...acc,
|
...acc,
|
||||||
[`item-${entity.id}`]: entity,
|
[entity.id]: entity,
|
||||||
});
|
});
|
||||||
|
|
||||||
const items: Items | undefined = entitiesQueryResult.data
|
const items: Items | undefined = entitiesQueryResult.data
|
||||||
@ -71,5 +82,6 @@ export const useBoard = () => {
|
|||||||
items,
|
items,
|
||||||
loading: pipelines.loading || entitiesQueryResult.loading,
|
loading: pipelines.loading || entitiesQueryResult.loading,
|
||||||
error: pipelines.error || entitiesQueryResult.error,
|
error: pipelines.error || entitiesQueryResult.error,
|
||||||
|
pipelineEntityIdsMapper,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,10 +2,12 @@ import { gql } from '@apollo/client';
|
|||||||
|
|
||||||
export const GET_PIPELINES = gql`
|
export const GET_PIPELINES = gql`
|
||||||
query GetPipelines {
|
query GetPipelines {
|
||||||
findManyPipeline(skip: 1) {
|
findManyPipeline {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
pipelineProgressableType
|
||||||
pipelineStages {
|
pipelineStages {
|
||||||
|
id
|
||||||
name
|
name
|
||||||
color
|
color
|
||||||
pipelineProgresses {
|
pipelineProgresses {
|
||||||
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import styled from '@emotion/styled';
|
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/2350
|
||||||
|
|
||||||
export const StyledBoard = styled.div`
|
export const StyledBoard = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -7,7 +7,7 @@ export const StyledBoard = styled.div`
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export type BoardItemKey = `item-${number | string}`;
|
export type BoardItemKey = string;
|
||||||
export type Item = any & { id: string };
|
export type Item = any & { id: string };
|
||||||
export interface Items {
|
export interface Items {
|
||||||
[key: string]: Item;
|
[key: string]: Item;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from '@emotion/styled';
|
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/2350
|
||||||
|
|
||||||
export const StyledColumn = styled.div`
|
export const StyledColumn = styled.div`
|
||||||
background-color: ${({ theme }) => theme.primaryBackground};
|
background-color: ${({ theme }) => theme.primaryBackground};
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import styled from '@emotion/styled';
|
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/2350
|
||||||
|
|
||||||
const StyledCard = styled.div`
|
const StyledCard = styled.div`
|
||||||
background-color: ${({ theme }) => theme.secondaryBackground};
|
background-color: ${({ theme }) => theme.secondaryBackground};
|
||||||
|
|||||||
@ -1,11 +1,33 @@
|
|||||||
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import { IconTargetArrow } from '@/ui/icons/index';
|
import { IconTargetArrow } from '@/ui/icons/index';
|
||||||
import { WithTopBarContainer } from '@/ui/layout/containers/WithTopBarContainer';
|
import { WithTopBarContainer } from '@/ui/layout/containers/WithTopBarContainer';
|
||||||
|
|
||||||
|
import {
|
||||||
|
PipelineProgress,
|
||||||
|
PipelineStage,
|
||||||
|
useUpdateOnePipelineProgressMutation,
|
||||||
|
} from '../../generated/graphql';
|
||||||
import { Board } from '../../modules/opportunities/components/Board';
|
import { Board } from '../../modules/opportunities/components/Board';
|
||||||
import { useBoard } from '../../modules/opportunities/hooks/useBoard';
|
import { useBoard } from '../../modules/opportunities/hooks/useBoard';
|
||||||
|
|
||||||
export function Opportunities() {
|
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 (loading) return <div>Loading...</div>;
|
||||||
if (error) return <div>Error...</div>;
|
if (error) return <div>Error...</div>;
|
||||||
@ -13,7 +35,7 @@ export function Opportunities() {
|
|||||||
return <div>Initial board or items not found</div>;
|
return <div>Initial board or items not found</div>;
|
||||||
return (
|
return (
|
||||||
<WithTopBarContainer title="Opportunities" icon={<IconTargetArrow />}>
|
<WithTopBarContainer title="Opportunities" icon={<IconTargetArrow />}>
|
||||||
<Board initialBoard={initialBoard} items={items} />
|
<Board initialBoard={initialBoard} items={items} onUpdate={onUpdate} />
|
||||||
</WithTopBarContainer>
|
</WithTopBarContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,6 +22,9 @@ export class PipelineCountAggregateInput {
|
|||||||
@Field(() => Boolean, { nullable: true })
|
@Field(() => Boolean, { nullable: true })
|
||||||
icon?: true;
|
icon?: true;
|
||||||
|
|
||||||
|
@Field(() => Boolean, { nullable: true })
|
||||||
|
pipelineProgressableType?: true;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: true;
|
workspaceId?: true;
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,9 @@ export class PipelineCountAggregate {
|
|||||||
@Field(() => Int, { nullable: false })
|
@Field(() => Int, { nullable: false })
|
||||||
icon!: number;
|
icon!: number;
|
||||||
|
|
||||||
|
@Field(() => Int, { nullable: false })
|
||||||
|
pipelineProgressableType!: number;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId!: number;
|
workspaceId!: number;
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,9 @@ export class PipelineCountOrderByAggregateInput {
|
|||||||
@Field(() => SortOrder, { nullable: true })
|
@Field(() => SortOrder, { nullable: true })
|
||||||
icon?: keyof typeof SortOrder;
|
icon?: keyof typeof SortOrder;
|
||||||
|
|
||||||
|
@Field(() => SortOrder, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof SortOrder;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: keyof typeof SortOrder;
|
workspaceId?: keyof typeof SortOrder;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { InputType } from '@nestjs/graphql';
|
import { InputType } from '@nestjs/graphql';
|
||||||
|
import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';
|
||||||
|
|
||||||
@InputType()
|
@InputType()
|
||||||
export class PipelineCreateManyWorkspaceInput {
|
export class PipelineCreateManyWorkspaceInput {
|
||||||
@ -20,4 +21,7 @@ export class PipelineCreateManyWorkspaceInput {
|
|||||||
|
|
||||||
@Field(() => String, { nullable: false })
|
@Field(() => String, { nullable: false })
|
||||||
icon!: string;
|
icon!: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof PipelineProgressableType;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { InputType } from '@nestjs/graphql';
|
import { InputType } from '@nestjs/graphql';
|
||||||
|
import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';
|
||||||
import { HideField } from '@nestjs/graphql';
|
import { HideField } from '@nestjs/graphql';
|
||||||
|
|
||||||
@InputType()
|
@InputType()
|
||||||
@ -22,6 +23,9 @@ export class PipelineCreateManyInput {
|
|||||||
@Field(() => String, { nullable: false })
|
@Field(() => String, { nullable: false })
|
||||||
icon!: string;
|
icon!: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof PipelineProgressableType;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId!: string;
|
workspaceId!: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { InputType } 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 { PipelineStageCreateNestedManyWithoutPipelineInput } from '../pipeline-stage/pipeline-stage-create-nested-many-without-pipeline.input';
|
||||||
import { WorkspaceCreateNestedOneWithoutPipelinesInput } from '../workspace/workspace-create-nested-one-without-pipelines.input';
|
import { WorkspaceCreateNestedOneWithoutPipelinesInput } from '../workspace/workspace-create-nested-one-without-pipelines.input';
|
||||||
import { HideField } from '@nestjs/graphql';
|
import { HideField } from '@nestjs/graphql';
|
||||||
@ -24,6 +25,9 @@ export class PipelineCreateWithoutPipelineProgressesInput {
|
|||||||
@Field(() => String, { nullable: false })
|
@Field(() => String, { nullable: false })
|
||||||
icon!: string;
|
icon!: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof PipelineProgressableType;
|
||||||
|
|
||||||
@Field(() => PipelineStageCreateNestedManyWithoutPipelineInput, {
|
@Field(() => PipelineStageCreateNestedManyWithoutPipelineInput, {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { InputType } 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 { PipelineProgressCreateNestedManyWithoutPipelineInput } from '../pipeline-progress/pipeline-progress-create-nested-many-without-pipeline.input';
|
||||||
import { WorkspaceCreateNestedOneWithoutPipelinesInput } from '../workspace/workspace-create-nested-one-without-pipelines.input';
|
import { WorkspaceCreateNestedOneWithoutPipelinesInput } from '../workspace/workspace-create-nested-one-without-pipelines.input';
|
||||||
import { HideField } from '@nestjs/graphql';
|
import { HideField } from '@nestjs/graphql';
|
||||||
@ -24,6 +25,9 @@ export class PipelineCreateWithoutPipelineStagesInput {
|
|||||||
@Field(() => String, { nullable: false })
|
@Field(() => String, { nullable: false })
|
||||||
icon!: string;
|
icon!: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof PipelineProgressableType;
|
||||||
|
|
||||||
@Field(() => PipelineProgressCreateNestedManyWithoutPipelineInput, {
|
@Field(() => PipelineProgressCreateNestedManyWithoutPipelineInput, {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { InputType } 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 { 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 { PipelineProgressCreateNestedManyWithoutPipelineInput } from '../pipeline-progress/pipeline-progress-create-nested-many-without-pipeline.input';
|
||||||
|
|
||||||
@ -23,6 +24,9 @@ export class PipelineCreateWithoutWorkspaceInput {
|
|||||||
@Field(() => String, { nullable: false })
|
@Field(() => String, { nullable: false })
|
||||||
icon!: string;
|
icon!: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof PipelineProgressableType;
|
||||||
|
|
||||||
@Field(() => PipelineStageCreateNestedManyWithoutPipelineInput, {
|
@Field(() => PipelineStageCreateNestedManyWithoutPipelineInput, {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { InputType } 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 { 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 { PipelineProgressCreateNestedManyWithoutPipelineInput } from '../pipeline-progress/pipeline-progress-create-nested-many-without-pipeline.input';
|
||||||
import { WorkspaceCreateNestedOneWithoutPipelinesInput } from '../workspace/workspace-create-nested-one-without-pipelines.input';
|
import { WorkspaceCreateNestedOneWithoutPipelinesInput } from '../workspace/workspace-create-nested-one-without-pipelines.input';
|
||||||
@ -25,6 +26,9 @@ export class PipelineCreateInput {
|
|||||||
@Field(() => String, { nullable: false })
|
@Field(() => String, { nullable: false })
|
||||||
icon!: string;
|
icon!: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof PipelineProgressableType;
|
||||||
|
|
||||||
@Field(() => PipelineStageCreateNestedManyWithoutPipelineInput, {
|
@Field(() => PipelineStageCreateNestedManyWithoutPipelineInput, {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { ObjectType } from '@nestjs/graphql';
|
import { ObjectType } from '@nestjs/graphql';
|
||||||
|
import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';
|
||||||
import { HideField } from '@nestjs/graphql';
|
import { HideField } from '@nestjs/graphql';
|
||||||
import { PipelineCountAggregate } from './pipeline-count-aggregate.output';
|
import { PipelineCountAggregate } from './pipeline-count-aggregate.output';
|
||||||
import { PipelineMinAggregate } from './pipeline-min-aggregate.output';
|
import { PipelineMinAggregate } from './pipeline-min-aggregate.output';
|
||||||
@ -25,6 +26,9 @@ export class PipelineGroupBy {
|
|||||||
@Field(() => String, { nullable: false })
|
@Field(() => String, { nullable: false })
|
||||||
icon!: string;
|
icon!: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, { nullable: false })
|
||||||
|
pipelineProgressableType!: keyof typeof PipelineProgressableType;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId!: string;
|
workspaceId!: string;
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,9 @@ export class PipelineMaxAggregateInput {
|
|||||||
@Field(() => Boolean, { nullable: true })
|
@Field(() => Boolean, { nullable: true })
|
||||||
icon?: true;
|
icon?: true;
|
||||||
|
|
||||||
|
@Field(() => Boolean, { nullable: true })
|
||||||
|
pipelineProgressableType?: true;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: true;
|
workspaceId?: true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { ObjectType } from '@nestjs/graphql';
|
import { ObjectType } from '@nestjs/graphql';
|
||||||
|
import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';
|
||||||
import { HideField } from '@nestjs/graphql';
|
import { HideField } from '@nestjs/graphql';
|
||||||
|
|
||||||
@ObjectType()
|
@ObjectType()
|
||||||
@ -22,6 +23,9 @@ export class PipelineMaxAggregate {
|
|||||||
@Field(() => String, { nullable: true })
|
@Field(() => String, { nullable: true })
|
||||||
icon?: string;
|
icon?: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof PipelineProgressableType;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: string;
|
workspaceId?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,9 @@ export class PipelineMaxOrderByAggregateInput {
|
|||||||
@Field(() => SortOrder, { nullable: true })
|
@Field(() => SortOrder, { nullable: true })
|
||||||
icon?: keyof typeof SortOrder;
|
icon?: keyof typeof SortOrder;
|
||||||
|
|
||||||
|
@Field(() => SortOrder, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof SortOrder;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: keyof typeof SortOrder;
|
workspaceId?: keyof typeof SortOrder;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,6 +22,9 @@ export class PipelineMinAggregateInput {
|
|||||||
@Field(() => Boolean, { nullable: true })
|
@Field(() => Boolean, { nullable: true })
|
||||||
icon?: true;
|
icon?: true;
|
||||||
|
|
||||||
|
@Field(() => Boolean, { nullable: true })
|
||||||
|
pipelineProgressableType?: true;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: true;
|
workspaceId?: true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { ObjectType } from '@nestjs/graphql';
|
import { ObjectType } from '@nestjs/graphql';
|
||||||
|
import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';
|
||||||
import { HideField } from '@nestjs/graphql';
|
import { HideField } from '@nestjs/graphql';
|
||||||
|
|
||||||
@ObjectType()
|
@ObjectType()
|
||||||
@ -22,6 +23,9 @@ export class PipelineMinAggregate {
|
|||||||
@Field(() => String, { nullable: true })
|
@Field(() => String, { nullable: true })
|
||||||
icon?: string;
|
icon?: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof PipelineProgressableType;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: string;
|
workspaceId?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,9 @@ export class PipelineMinOrderByAggregateInput {
|
|||||||
@Field(() => SortOrder, { nullable: true })
|
@Field(() => SortOrder, { nullable: true })
|
||||||
icon?: keyof typeof SortOrder;
|
icon?: keyof typeof SortOrder;
|
||||||
|
|
||||||
|
@Field(() => SortOrder, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof SortOrder;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: keyof typeof SortOrder;
|
workspaceId?: keyof typeof SortOrder;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,9 @@ export class PipelineOrderByWithAggregationInput {
|
|||||||
@Field(() => SortOrder, { nullable: true })
|
@Field(() => SortOrder, { nullable: true })
|
||||||
icon?: keyof typeof SortOrder;
|
icon?: keyof typeof SortOrder;
|
||||||
|
|
||||||
|
@Field(() => SortOrder, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof SortOrder;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: keyof typeof SortOrder;
|
workspaceId?: keyof typeof SortOrder;
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,9 @@ export class PipelineOrderByWithRelationInput {
|
|||||||
@Field(() => SortOrder, { nullable: true })
|
@Field(() => SortOrder, { nullable: true })
|
||||||
icon?: keyof typeof SortOrder;
|
icon?: keyof typeof SortOrder;
|
||||||
|
|
||||||
|
@Field(() => SortOrder, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof SortOrder;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: keyof typeof SortOrder;
|
workspaceId?: keyof typeof SortOrder;
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ export enum PipelineScalarFieldEnum {
|
|||||||
deletedAt = 'deletedAt',
|
deletedAt = 'deletedAt',
|
||||||
name = 'name',
|
name = 'name',
|
||||||
icon = 'icon',
|
icon = 'icon',
|
||||||
|
pipelineProgressableType = 'pipelineProgressableType',
|
||||||
workspaceId = 'workspaceId',
|
workspaceId = 'workspaceId',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringWithAggregatesFilter } from '../prisma/string-with-aggregates-filter.input';
|
import { StringWithAggregatesFilter } from '../prisma/string-with-aggregates-filter.input';
|
||||||
import { DateTimeWithAggregatesFilter } from '../prisma/date-time-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 { 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';
|
import { HideField } from '@nestjs/graphql';
|
||||||
|
|
||||||
@InputType()
|
@InputType()
|
||||||
@ -34,6 +35,11 @@ export class PipelineScalarWhereWithAggregatesInput {
|
|||||||
@Field(() => StringWithAggregatesFilter, { nullable: true })
|
@Field(() => StringWithAggregatesFilter, { nullable: true })
|
||||||
icon?: StringWithAggregatesFilter;
|
icon?: StringWithAggregatesFilter;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeWithAggregatesFilter, {
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeWithAggregatesFilter;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: StringWithAggregatesFilter;
|
workspaceId?: StringWithAggregatesFilter;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringFilter } from '../prisma/string-filter.input';
|
import { StringFilter } from '../prisma/string-filter.input';
|
||||||
import { DateTimeFilter } from '../prisma/date-time-filter.input';
|
import { DateTimeFilter } from '../prisma/date-time-filter.input';
|
||||||
import { DateTimeNullableFilter } from '../prisma/date-time-nullable-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 { HideField } from '@nestjs/graphql';
|
||||||
|
|
||||||
@InputType()
|
@InputType()
|
||||||
@ -34,6 +35,9 @@ export class PipelineScalarWhereInput {
|
|||||||
@Field(() => StringFilter, { nullable: true })
|
@Field(() => StringFilter, { nullable: true })
|
||||||
icon?: StringFilter;
|
icon?: StringFilter;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeFilter, { nullable: true })
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeFilter;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: StringFilter;
|
workspaceId?: StringFilter;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { InputType } from '@nestjs/graphql';
|
import { InputType } from '@nestjs/graphql';
|
||||||
|
import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';
|
||||||
import { HideField } from '@nestjs/graphql';
|
import { HideField } from '@nestjs/graphql';
|
||||||
import { PipelineStageUncheckedCreateNestedManyWithoutPipelineInput } from '../pipeline-stage/pipeline-stage-unchecked-create-nested-many-without-pipeline.input';
|
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 })
|
@Field(() => String, { nullable: false })
|
||||||
icon!: string;
|
icon!: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof PipelineProgressableType;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId!: string;
|
workspaceId!: string;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { InputType } from '@nestjs/graphql';
|
import { InputType } from '@nestjs/graphql';
|
||||||
|
import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';
|
||||||
import { HideField } from '@nestjs/graphql';
|
import { HideField } from '@nestjs/graphql';
|
||||||
import { PipelineProgressUncheckedCreateNestedManyWithoutPipelineInput } from '../pipeline-progress/pipeline-progress-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 PipelineUncheckedCreateWithoutPipelineStagesInput {
|
|||||||
@Field(() => String, { nullable: false })
|
@Field(() => String, { nullable: false })
|
||||||
icon!: string;
|
icon!: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof PipelineProgressableType;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId!: string;
|
workspaceId!: string;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { InputType } 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 { 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';
|
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 })
|
@Field(() => String, { nullable: false })
|
||||||
icon!: string;
|
icon!: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof PipelineProgressableType;
|
||||||
|
|
||||||
@Field(() => PipelineStageUncheckedCreateNestedManyWithoutPipelineInput, {
|
@Field(() => PipelineStageUncheckedCreateNestedManyWithoutPipelineInput, {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { InputType } from '@nestjs/graphql';
|
import { InputType } from '@nestjs/graphql';
|
||||||
|
import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';
|
||||||
import { HideField } from '@nestjs/graphql';
|
import { HideField } from '@nestjs/graphql';
|
||||||
import { PipelineStageUncheckedCreateNestedManyWithoutPipelineInput } from '../pipeline-stage/pipeline-stage-unchecked-create-nested-many-without-pipeline.input';
|
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';
|
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 })
|
@Field(() => String, { nullable: false })
|
||||||
icon!: string;
|
icon!: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, { nullable: true })
|
||||||
|
pipelineProgressableType?: keyof typeof PipelineProgressableType;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId!: string;
|
workspaceId!: string;
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-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 { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
|
||||||
|
import { EnumPipelineProgressableTypeFieldUpdateOperationsInput } from '../prisma/enum-pipeline-progressable-type-field-update-operations.input';
|
||||||
|
|
||||||
@InputType()
|
@InputType()
|
||||||
export class PipelineUncheckedUpdateManyWithoutPipelinesInput {
|
export class PipelineUncheckedUpdateManyWithoutPipelinesInput {
|
||||||
@ -23,4 +24,9 @@ export class PipelineUncheckedUpdateManyWithoutPipelinesInput {
|
|||||||
|
|
||||||
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
||||||
icon?: StringFieldUpdateOperationsInput;
|
icon?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-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 { 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 { HideField } from '@nestjs/graphql';
|
||||||
|
|
||||||
@InputType()
|
@InputType()
|
||||||
@ -25,6 +26,11 @@ export class PipelineUncheckedUpdateManyInput {
|
|||||||
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
||||||
icon?: StringFieldUpdateOperationsInput;
|
icon?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: StringFieldUpdateOperationsInput;
|
workspaceId?: StringFieldUpdateOperationsInput;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-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 { 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 { HideField } from '@nestjs/graphql';
|
||||||
import { PipelineStageUncheckedUpdateManyWithoutPipelineNestedInput } from '../pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-nested.input';
|
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 })
|
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
||||||
icon?: StringFieldUpdateOperationsInput;
|
icon?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: StringFieldUpdateOperationsInput;
|
workspaceId?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-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 { 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 { HideField } from '@nestjs/graphql';
|
||||||
import { PipelineProgressUncheckedUpdateManyWithoutPipelineNestedInput } from '../pipeline-progress/pipeline-progress-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 PipelineUncheckedUpdateWithoutPipelineStagesInput {
|
|||||||
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
||||||
icon?: StringFieldUpdateOperationsInput;
|
icon?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: StringFieldUpdateOperationsInput;
|
workspaceId?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-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 { 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 { 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';
|
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 })
|
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
||||||
icon?: StringFieldUpdateOperationsInput;
|
icon?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;
|
||||||
|
|
||||||
@Field(() => PipelineStageUncheckedUpdateManyWithoutPipelineNestedInput, {
|
@Field(() => PipelineStageUncheckedUpdateManyWithoutPipelineNestedInput, {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-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 { 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 { HideField } from '@nestjs/graphql';
|
||||||
import { PipelineStageUncheckedUpdateManyWithoutPipelineNestedInput } from '../pipeline-stage/pipeline-stage-unchecked-update-many-without-pipeline-nested.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';
|
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 })
|
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
||||||
icon?: StringFieldUpdateOperationsInput;
|
icon?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: StringFieldUpdateOperationsInput;
|
workspaceId?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-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 { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
|
||||||
|
import { EnumPipelineProgressableTypeFieldUpdateOperationsInput } from '../prisma/enum-pipeline-progressable-type-field-update-operations.input';
|
||||||
|
|
||||||
@InputType()
|
@InputType()
|
||||||
export class PipelineUpdateManyMutationInput {
|
export class PipelineUpdateManyMutationInput {
|
||||||
@ -23,4 +24,9 @@ export class PipelineUpdateManyMutationInput {
|
|||||||
|
|
||||||
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
||||||
icon?: StringFieldUpdateOperationsInput;
|
icon?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-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 { 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 { 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 { WorkspaceUpdateOneRequiredWithoutPipelinesNestedInput } from '../workspace/workspace-update-one-required-without-pipelines-nested.input';
|
||||||
import { HideField } from '@nestjs/graphql';
|
import { HideField } from '@nestjs/graphql';
|
||||||
@ -27,6 +28,11 @@ export class PipelineUpdateWithoutPipelineProgressesInput {
|
|||||||
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
||||||
icon?: StringFieldUpdateOperationsInput;
|
icon?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;
|
||||||
|
|
||||||
@Field(() => PipelineStageUpdateManyWithoutPipelineNestedInput, {
|
@Field(() => PipelineStageUpdateManyWithoutPipelineNestedInput, {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-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 { 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 { 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 { WorkspaceUpdateOneRequiredWithoutPipelinesNestedInput } from '../workspace/workspace-update-one-required-without-pipelines-nested.input';
|
||||||
import { HideField } from '@nestjs/graphql';
|
import { HideField } from '@nestjs/graphql';
|
||||||
@ -27,6 +28,11 @@ export class PipelineUpdateWithoutPipelineStagesInput {
|
|||||||
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
||||||
icon?: StringFieldUpdateOperationsInput;
|
icon?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;
|
||||||
|
|
||||||
@Field(() => PipelineProgressUpdateManyWithoutPipelineNestedInput, {
|
@Field(() => PipelineProgressUpdateManyWithoutPipelineNestedInput, {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-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 { 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 { 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 { PipelineProgressUpdateManyWithoutPipelineNestedInput } from '../pipeline-progress/pipeline-progress-update-many-without-pipeline-nested.input';
|
||||||
|
|
||||||
@ -26,6 +27,11 @@ export class PipelineUpdateWithoutWorkspaceInput {
|
|||||||
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
||||||
icon?: StringFieldUpdateOperationsInput;
|
icon?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;
|
||||||
|
|
||||||
@Field(() => PipelineStageUpdateManyWithoutPipelineNestedInput, {
|
@Field(() => PipelineStageUpdateManyWithoutPipelineNestedInput, {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
|
||||||
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-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 { 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 { 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 { 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 { WorkspaceUpdateOneRequiredWithoutPipelinesNestedInput } from '../workspace/workspace-update-one-required-without-pipelines-nested.input';
|
||||||
@ -28,6 +29,11 @@ export class PipelineUpdateInput {
|
|||||||
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
|
||||||
icon?: StringFieldUpdateOperationsInput;
|
icon?: StringFieldUpdateOperationsInput;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeFieldUpdateOperationsInput, {
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeFieldUpdateOperationsInput;
|
||||||
|
|
||||||
@Field(() => PipelineStageUpdateManyWithoutPipelineNestedInput, {
|
@Field(() => PipelineStageUpdateManyWithoutPipelineNestedInput, {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';
|
|||||||
import { StringFilter } from '../prisma/string-filter.input';
|
import { StringFilter } from '../prisma/string-filter.input';
|
||||||
import { DateTimeFilter } from '../prisma/date-time-filter.input';
|
import { DateTimeFilter } from '../prisma/date-time-filter.input';
|
||||||
import { DateTimeNullableFilter } from '../prisma/date-time-nullable-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 { HideField } from '@nestjs/graphql';
|
||||||
import { PipelineStageListRelationFilter } from '../pipeline-stage/pipeline-stage-list-relation-filter.input';
|
import { PipelineStageListRelationFilter } from '../pipeline-stage/pipeline-stage-list-relation-filter.input';
|
||||||
import { PipelineProgressListRelationFilter } from '../pipeline-progress/pipeline-progress-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 })
|
@Field(() => StringFilter, { nullable: true })
|
||||||
icon?: StringFilter;
|
icon?: StringFilter;
|
||||||
|
|
||||||
|
@Field(() => EnumPipelineProgressableTypeFilter, { nullable: true })
|
||||||
|
pipelineProgressableType?: EnumPipelineProgressableTypeFilter;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId?: StringFilter;
|
workspaceId?: StringFilter;
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Field } from '@nestjs/graphql';
|
import { Field } from '@nestjs/graphql';
|
||||||
import { ObjectType } from '@nestjs/graphql';
|
import { ObjectType } from '@nestjs/graphql';
|
||||||
import { ID } from '@nestjs/graphql';
|
import { ID } from '@nestjs/graphql';
|
||||||
|
import { PipelineProgressableType } from '../prisma/pipeline-progressable-type.enum';
|
||||||
import { HideField } from '@nestjs/graphql';
|
import { HideField } from '@nestjs/graphql';
|
||||||
import { PipelineStage } from '../pipeline-stage/pipeline-stage.model';
|
import { PipelineStage } from '../pipeline-stage/pipeline-stage.model';
|
||||||
import { PipelineProgress } from '../pipeline-progress/pipeline-progress.model';
|
import { PipelineProgress } from '../pipeline-progress/pipeline-progress.model';
|
||||||
@ -27,6 +28,12 @@ export class Pipeline {
|
|||||||
@Field(() => String, { nullable: false })
|
@Field(() => String, { nullable: false })
|
||||||
icon!: string;
|
icon!: string;
|
||||||
|
|
||||||
|
@Field(() => PipelineProgressableType, {
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 'Company',
|
||||||
|
})
|
||||||
|
pipelineProgressableType!: keyof typeof PipelineProgressableType;
|
||||||
|
|
||||||
@HideField()
|
@HideField()
|
||||||
workspaceId!: string;
|
workspaceId!: string;
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,2 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "pipelines" ADD COLUMN "pipelineProgressableType" "PipelineProgressableType" NOT NULL DEFAULT 'Company';
|
||||||
@ -293,6 +293,7 @@ model Pipeline {
|
|||||||
icon String
|
icon String
|
||||||
pipelineStages PipelineStage[]
|
pipelineStages PipelineStage[]
|
||||||
pipelineProgresses PipelineProgress[]
|
pipelineProgresses PipelineProgress[]
|
||||||
|
pipelineProgressableType PipelineProgressableType @default(Company)
|
||||||
/// @TypeGraphQL.omit(input: true, output: true)
|
/// @TypeGraphQL.omit(input: true, output: true)
|
||||||
workspaceId String
|
workspaceId String
|
||||||
/// @TypeGraphQL.omit(input: true, output: true)
|
/// @TypeGraphQL.omit(input: true, output: true)
|
||||||
|
|||||||
@ -8,6 +8,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
|||||||
name: 'Sales pipeline',
|
name: 'Sales pipeline',
|
||||||
icon: '💰',
|
icon: '💰',
|
||||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||||
|
pipelineProgressableType: 'Person',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -97,6 +98,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
|||||||
name: 'Customer support pipeline',
|
name: 'Customer support pipeline',
|
||||||
icon: '📔',
|
icon: '📔',
|
||||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||||
|
pipelineProgressableType: 'Person',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -134,6 +136,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
|||||||
name: 'Sales pipeline',
|
name: 'Sales pipeline',
|
||||||
icon: '💰',
|
icon: '💰',
|
||||||
workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420',
|
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',
|
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',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user