Enable pipeline stage ordering (#577)

* Enable pipeline stage ordering

* Removing migration

* Remove Save button
This commit is contained in:
Charles Bochet
2023-07-10 17:20:37 -07:00
committed by GitHub
parent eae583209e
commit 03c6d1f19d
56 changed files with 322 additions and 10 deletions

View File

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "pipeline_stages" ADD COLUMN "index" INTEGER;

View File

@ -434,6 +434,9 @@ model PipelineStage {
type String
/// @Validator.IsString()
color String
/// @Validator.IsNumber()
/// @Validator.IsOptional()
index Int?
pipelineProgresses PipelineProgress[]
pipeline Pipeline @relation(fields: [pipelineId], references: [id])

View File

@ -19,6 +19,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
id: 'twenty-fe256b39-3ec3-4fe3-8998-b76aa0bfb600',
name: 'New',
color: '#B76796',
index: 0,
type: 'open',
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
@ -32,6 +33,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
id: 'twenty-fe256b39-3ec3-4fe4-8998-b76aa0bfb600',
name: 'Screening',
color: '#CB912F',
index: 1,
type: 'ongoing',
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
@ -45,6 +47,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
id: 'twenty-fe256b39-3ec3-4fe5-8998-b76aa0bfb600',
name: 'Meeting',
color: '#9065B0',
index: 2,
type: 'ongoing',
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
@ -58,6 +61,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
id: 'twenty-fe256b39-3ec3-4fe6-8998-b76aa0bfb600',
name: 'Proposal',
color: '#337EA9',
index: 3,
type: 'ongoing',
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
@ -71,6 +75,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
id: 'twenty-fe256b39-3ec3-4fe7-8998-b76aa0bfb600',
name: 'Customer',
color: '#079039',
index: 4,
type: 'won',
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
@ -148,6 +153,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
id: 'twenty-fe256b39-3ec3-4fe3-8998-a76aa0bfb600',
name: 'New',
color: '#B76796',
index: 1,
type: 'open',
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b74aa0bfb400',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
@ -186,6 +192,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
id: 'twenty-dev-fe256b39-3ec3-4fe3-8998-b76aa0bfb600',
name: 'New',
color: '#B76796',
index: 0,
type: 'open',
pipelineId: 'twenty-dev-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420',
@ -199,6 +206,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
id: 'twenty-dev-fe256b39-3ec3-4fe4-8998-b76aa0bfb600',
name: 'Screening',
color: '#CB912F',
index: 1,
type: 'ongoing',
pipelineId: 'twenty-dev-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420',
@ -212,6 +220,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
id: 'twenty-dev-fe256b39-3ec3-4fe5-8998-b76aa0bfb600',
name: 'Meeting',
color: '#9065B0',
index: 2,
type: 'ongoing',
pipelineId: 'twenty-dev-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420',
@ -225,6 +234,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
id: 'twenty-dev-fe256b39-3ec3-4fe6-8998-b76aa0bfb600',
name: 'Proposal',
color: '#337EA9',
index: 3,
type: 'ongoing',
pipelineId: 'twenty-dev-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420',
@ -238,6 +248,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
id: 'twenty-dev-fe256b39-3ec3-4fe7-8998-b76aa0bfb600',
name: 'Customer',
color: '#079039',
index: 4,
type: 'won',
pipelineId: 'twenty-dev-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420',