From d183e5bf3ba8dec6c63fb4eb32099da8f223d6cc Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 6 Jan 2026 19:05:50 +0530 Subject: [PATCH] Code changes done for industry code mandatory --- app/controllers/establishment.controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/establishment.controller.js b/app/controllers/establishment.controller.js index b8b91e7..d6110c6 100644 --- a/app/controllers/establishment.controller.js +++ b/app/controllers/establishment.controller.js @@ -1355,7 +1355,7 @@ exports.establishmentBulkUpload = async (req, res) => { // ------------------------------------------------------- // REQUIRED HEADERS // ------------------------------------------------------- - const required = ["establishment_id", "factory_name", "user_name", "email", "emirate"]; + const required = ["establishment_id", "factory_name", "user_name", "email", "emirate", "industry_code_current_production"]; const firstKeys = Object.keys(rows[0]); const missingHeaders = required.filter(h => !firstKeys.includes(h)); @@ -1446,6 +1446,7 @@ exports.establishmentBulkUpload = async (req, res) => { const factory = r.factory_name; const email = r.email; const emirate = r.emirate; + const industry_code_current_production = r.industry_code_current_production; const missing = []; if (!est) missing.push("Establishment ID"); @@ -1453,6 +1454,7 @@ exports.establishmentBulkUpload = async (req, res) => { if (!r.user_name) missing.push("User Name"); if (!email) missing.push("Email"); if (!emirate) missing.push("Emirate"); + if (!industry_code_current_production) missing.push("Industry Code Current Production"); if (missing.length) { errors.push({ row: rowNum, error: `Missing required fields: ${missing.join(", ")}` });