From 3af1c75430fbc87d69994cc8e6de6a299b6df906 Mon Sep 17 00:00:00 2001 From: Bhaskar Date: Tue, 24 Jun 2025 12:30:05 +0530 Subject: [PATCH] remove the start date and end date fromassign team member --- src/controllers/installationController.js | 20 ++++++++++---------- src/routes/installationRoute.js | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/controllers/installationController.js b/src/controllers/installationController.js index 454fa681..ae279c6a 100644 --- a/src/controllers/installationController.js +++ b/src/controllers/installationController.js @@ -8860,7 +8860,7 @@ exports.updateHardwareList = async (req, reply) => { exports.assignCategorizeIssue = async (request, reply) => { const { supportId } = request.params; - const { support_teamMemberId, startDate, endDate, category, masterHardwareId } = request.body; + const { support_teamMemberId, category, masterHardwareId } = request.body; if (!support_teamMemberId || !startDate || !endDate || !category || !masterHardwareId) { return reply.code(400).send({ error: 'support_teamMemberId, startDate, endDate, category, and masterHardwareId are required' }); @@ -8879,15 +8879,15 @@ exports.assignCategorizeIssue = async (request, reply) => { } // ✅ Parse using moment with expected format - const start = moment(startDate, "DD-MM-YYYY HH:mm", true); - const end = moment(endDate, "DD-MM-YYYY HH:mm", true); + // const start = moment(startDate, "DD-MM-YYYY HH:mm", true); + // const end = moment(endDate, "DD-MM-YYYY HH:mm", true); - if (!start.isValid() || !end.isValid()) { - return reply.code(400).send({ error: 'Invalid startDate or endDate format. Use DD-MM-YYYY HH:mm' }); - } + // if (!start.isValid() || !end.isValid()) { + // return reply.code(400).send({ error: 'Invalid startDate or endDate format. Use DD-MM-YYYY HH:mm' }); + // } - const formattedStart = start.format("DD-MM-YYYY HH:mm:ss"); - const formattedEnd = end.format("DD-MM-YYYY HH:mm:ss"); + // const formattedStart = start.format("DD-MM-YYYY HH:mm:ss"); + // const formattedEnd = end.format("DD-MM-YYYY HH:mm:ss"); let assignedCount = 0; @@ -8901,8 +8901,8 @@ exports.assignCategorizeIssue = async (request, reply) => { support_teamMemberId: teamMember.support_teamMemberId, phone: teamMember.phone, email: teamMember.email, - startDate: formattedStart, - endDate: formattedEnd + // startDate: formattedStart, + // endDate: formattedEnd }; assignedCount++; } diff --git a/src/routes/installationRoute.js b/src/routes/installationRoute.js index bdc7c8bb..abb7bf86 100644 --- a/src/routes/installationRoute.js +++ b/src/routes/installationRoute.js @@ -876,8 +876,8 @@ module.exports = function (fastify, opts, next) { //required: [ "support_teamMemberId", "startDate", "endDate", "category", "masterHardwareId"], properties: { support_teamMemberId: { type: "string" }, - startDate: { type: "string" }, - endDate: { type: "string" }, + // startDate: { type: "string" }, + // endDate: { type: "string" }, category: { type: "string" }, masterHardwareId: { type: "string" }, },