bug fixes, schema updates
This commit is contained in:
@@ -33,16 +33,10 @@ const rtsSchema = new mongoose.Schema({
|
||||
type: mongoose.Types.ObjectId,
|
||||
ref: "organization",
|
||||
},
|
||||
statusPipeline: new mongoose.Schema(
|
||||
stage: new mongoose.Schema(
|
||||
{
|
||||
pipeline: Array,
|
||||
currentStage: Number,
|
||||
stages: [
|
||||
{
|
||||
name: String,
|
||||
date: Date,
|
||||
description: String,
|
||||
},
|
||||
],
|
||||
},
|
||||
{ _id: false }
|
||||
),
|
||||
@@ -63,11 +57,37 @@ const rtsCreateInput = z.object({
|
||||
county: z.string(),
|
||||
client: z.string().optional(),
|
||||
files: z.array(files).optional(),
|
||||
stage: z
|
||||
.object({
|
||||
pipeline: z.array(
|
||||
z.object({
|
||||
name: z.string(),
|
||||
date: z.date().nullable().optional(),
|
||||
description: z.string().optional(),
|
||||
comment: z.string().optional(),
|
||||
})
|
||||
),
|
||||
currentStage: z.number(),
|
||||
})
|
||||
.optional(),
|
||||
});
|
||||
|
||||
const rtsUpdateInput = z.object({
|
||||
county: z.string().optional(),
|
||||
client: z.string().optional(),
|
||||
stage: z
|
||||
.object({
|
||||
pipeline: z.array(
|
||||
z.object({
|
||||
name: z.string(),
|
||||
date: z.date().nullable().optional(),
|
||||
description: z.string().optional(),
|
||||
comment: z.string().optional(),
|
||||
})
|
||||
),
|
||||
currentStage: z.number(),
|
||||
})
|
||||
.optional(),
|
||||
});
|
||||
|
||||
const rtsNewUpload = z.object({
|
||||
|
||||
Reference in New Issue
Block a user