From c001f184f32f2fc315bfe4bdfefa807cab2d5c5f Mon Sep 17 00:00:00 2001 From: Bhaskar Date: Fri, 21 Mar 2025 13:13:19 +0530 Subject: [PATCH] nameoftheContactPerson added in new branch account --- src/controllers/departmentController.js | 4 +++- src/models/Department.js | 3 ++- src/routes/departmentRoute.js | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/controllers/departmentController.js b/src/controllers/departmentController.js index b521787d..0e38bcf2 100644 --- a/src/controllers/departmentController.js +++ b/src/controllers/departmentController.js @@ -134,7 +134,8 @@ const generateDepartmentId = async (city, departmentName) => { pincode, createdBy, updatedBy, - email + email, + nameoftheContactPerson } = request.body; // Generate departmentId based on departmentName @@ -163,6 +164,7 @@ const generateDepartmentId = async (city, departmentName) => { country, pincode, email, + nameoftheContactPerson, // departmentName, createdBy, updatedBy, diff --git a/src/models/Department.js b/src/models/Department.js index ce78d5f9..41386723 100644 --- a/src/models/Department.js +++ b/src/models/Department.js @@ -53,7 +53,8 @@ const citySchema = new mongoose.Schema( city: { type: String }, location: [{ type : String}], state: String, - country: String, + country: String, + nameoftheContactPerson: String, services: { password: { bcrypt: String } }, createdAt: { type: Date, diff --git a/src/routes/departmentRoute.js b/src/routes/departmentRoute.js index d0049607..49082a0a 100644 --- a/src/routes/departmentRoute.js +++ b/src/routes/departmentRoute.js @@ -507,6 +507,7 @@ module.exports = function (fastify, opts, next) { address2: { type: "string" }, zone: { type: "string" }, pincode: { type: "string" }, + nameoftheContactPerson: { type: "string"} //departmentName: { type: "string" }, }, },