remove the start date and end date fromassign team member

master^2
Bhaskar 3 months ago
parent 245ada62d7
commit 3af1c75430

@ -8860,7 +8860,7 @@ exports.updateHardwareList = async (req, reply) => {
exports.assignCategorizeIssue = async (request, reply) => { exports.assignCategorizeIssue = async (request, reply) => {
const { supportId } = request.params; 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) { if (!support_teamMemberId || !startDate || !endDate || !category || !masterHardwareId) {
return reply.code(400).send({ error: 'support_teamMemberId, startDate, endDate, category, and masterHardwareId are required' }); 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 // ✅ Parse using moment with expected format
const start = moment(startDate, "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); // const end = moment(endDate, "DD-MM-YYYY HH:mm", true);
if (!start.isValid() || !end.isValid()) { // if (!start.isValid() || !end.isValid()) {
return reply.code(400).send({ error: 'Invalid startDate or endDate format. Use DD-MM-YYYY HH:mm' }); // 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 formattedStart = start.format("DD-MM-YYYY HH:mm:ss");
const formattedEnd = end.format("DD-MM-YYYY HH:mm:ss"); // const formattedEnd = end.format("DD-MM-YYYY HH:mm:ss");
let assignedCount = 0; let assignedCount = 0;
@ -8901,8 +8901,8 @@ exports.assignCategorizeIssue = async (request, reply) => {
support_teamMemberId: teamMember.support_teamMemberId, support_teamMemberId: teamMember.support_teamMemberId,
phone: teamMember.phone, phone: teamMember.phone,
email: teamMember.email, email: teamMember.email,
startDate: formattedStart, // startDate: formattedStart,
endDate: formattedEnd // endDate: formattedEnd
}; };
assignedCount++; assignedCount++;
} }

@ -876,8 +876,8 @@ module.exports = function (fastify, opts, next) {
//required: [ "support_teamMemberId", "startDate", "endDate", "category", "masterHardwareId"], //required: [ "support_teamMemberId", "startDate", "endDate", "category", "masterHardwareId"],
properties: { properties: {
support_teamMemberId: { type: "string" }, support_teamMemberId: { type: "string" },
startDate: { type: "string" }, // startDate: { type: "string" },
endDate: { type: "string" }, // endDate: { type: "string" },
category: { type: "string" }, category: { type: "string" },
masterHardwareId: { type: "string" }, masterHardwareId: { type: "string" },
}, },

Loading…
Cancel
Save