ashok 4 months ago
commit 4e64572be6

@ -6531,8 +6531,29 @@ exports.getDisconnectedCustomerDetails = async (req, reply) => {
// }
// }
const sensorHardwareId = sensor.hardwareId?.trim().toLowerCase();
// const sensorHardwareId = sensor.hardwareId?.trim().toLowerCase();
// for (const issue of unresolvedIssues) {
// const allIssueHardwareIds = [
// ...(issue.hardwareIds?.map(id => id?.trim().toLowerCase()) || []),
// issue.hardwareId?.trim().toLowerCase()
// ];
// if (
// (sensorHw && allIssueHardwareIds.includes(sensorHw)) ||
// (sensorConnected && allIssueHardwareIds.includes(sensorConnected)) ||
// (sensorHardwareId && allIssueHardwareIds.includes(sensorHardwareId))
// ) {
// for (const hw of allIssueHardwareIds) {
// if (hw && !existingCategorizedHardwareIds.has(hw)) {
// customerHardwareMap[custId].add(hw);
// }
// }
// }
// }
for (const issue of unresolvedIssues) {
if (issue.movedToCategory === true) continue; // ✅ extra safeguard
const allIssueHardwareIds = [
...(issue.hardwareIds?.map(id => id?.trim().toLowerCase()) || []),
issue.hardwareId?.trim().toLowerCase()
@ -6552,6 +6573,7 @@ exports.getDisconnectedCustomerDetails = async (req, reply) => {
}
}
// Debug: Log map of matched customer hardware

Loading…
Cancel
Save