add block field to permits and processed

This commit is contained in:
2025-06-17 15:08:20 +05:30
parent 8c490b513b
commit 4ff82dfc3a
5 changed files with 24 additions and 0 deletions

View File

@@ -65,6 +65,10 @@ const processedSchema = new mongoose.Schema({
lastUpdateDate: Date,
statusUpdated: Date,
issuedDate: Date,
communityName: String,
lot: String,
block: String,
jobNumber: String,
transferDate: Date,
history: Array,
}).index({ tenantId: 1, permitNumber: 1 }, { unique: true });

View File

@@ -140,6 +140,10 @@ export async function listProcessedPermits(
transferDate: 1,
issuedDate: 1,
history: 1,
communityName: 1,
lot: 1,
block: 1,
jobNumber: 1,
assignedTo: {
$let: {
vars: { assigned: { $arrayElemAt: ["$assignedRec", 0] } },