add manualStatus field

This commit is contained in:
2025-03-15 14:32:24 +05:30
parent 9d6bd67383
commit ce16c798e9
2 changed files with 4 additions and 16 deletions

View File

@@ -28,6 +28,7 @@ const permitSchema = new mongoose.Schema({
{ _id: false } { _id: false }
), ),
status: String, status: String,
manualStatus: String,
assignedTo: { assignedTo: {
type: mongoose.Types.ObjectId, type: mongoose.Types.ObjectId,
ref: "user", ref: "user",
@@ -127,23 +128,9 @@ const listPermitResponse = z.object({
}); });
const updatePermitInput = z.object({ const updatePermitInput = z.object({
county: z.string().optional(), manualStatus: z
client: z.string().optional(), .enum(["Ready To Issue", "Issued", "Invoiced", "Paid", "Closed"])
permitDate: z.date().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(), .optional(),
status: z.string().optional(),
assignedTo: z.string().optional(), assignedTo: z.string().optional(),
}); });

View File

@@ -27,6 +27,7 @@ const processedSchema = new mongoose.Schema({
{ _id: false } { _id: false }
), ),
status: String, status: String,
manualStatus: String,
assignedTo: { assignedTo: {
type: mongoose.Types.ObjectId, type: mongoose.Types.ObjectId,
ref: "user", ref: "user",