COMMENT on low water level notification

master^2
Bhaskar 10 months ago
parent 4ab16d8490
commit 2254b20ba9

@ -2281,29 +2281,29 @@ eventEmitter.on(
}
);
eventEmitter.on('sendLowWaterNotification', (fcmTokens, message) => {
const notificationMessage = `Warning: Water level is low in the tank.
Tank Name: ${tankName},
Location: ${receiverTank.location},
Type of Water: ${receiverTank.typeOfWater},
Current Water Level: ${currentWaterLevel} liters (${currentWaterPercentage.toFixed(2)}%),
Date & Time: ${new Date().toLocaleString()}`;
// eventEmitter.on('sendLowWaterNotification', (fcmTokens, message) => {
// const notificationMessage = `Warning: Water level is low in the tank.
// Tank Name: ${tankName},
// Location: ${receiverTank.location},
// Type of Water: ${receiverTank.typeOfWater},
// Current Water Level: ${currentWaterLevel} liters (${currentWaterPercentage.toFixed(2)}%),
// Date & Time: ${new Date().toLocaleString()}`;
// Send notifications using the provided FCM tokens
sendNotification(fcmTokens, notificationMessage);
});
// // Send notifications using the provided FCM tokens
// sendNotification(fcmTokens, notificationMessage);
// });
eventEmitter.on('sendCriticalLowWaterNotification', (fcmTokens, message) => {
const notificationMessage = `Critical Alert: Water level is critically low in the tank.
Tank Name: ${tankName},
Location: ${receiverTank.location},
Type of Water: ${receiverTank.typeOfWater},
Current Water Level: ${currentWaterLevel} liters (${currentWaterPercentage.toFixed(2)}%),
Date & Time: ${new Date().toLocaleString()}`;
// eventEmitter.on('sendCriticalLowWaterNotification', (fcmTokens, message) => {
// const notificationMessage = `Critical Alert: Water level is critically low in the tank.
// Tank Name: ${tankName},
// Location: ${receiverTank.location},
// Type of Water: ${receiverTank.typeOfWater},
// Current Water Level: ${currentWaterLevel} liters (${currentWaterPercentage.toFixed(2)}%),
// Date & Time: ${new Date().toLocaleString()}`;
// Send notifications using the provided FCM tokens
sendNotification(fcmTokens, notificationMessage);
});
// // Send notifications using the provided FCM tokens
// sendNotification(fcmTokens, notificationMessage);
// });

Loading…
Cancel
Save