feat(notificaitons): fixed and corrections to get them working properly

This commit is contained in:
2025-04-04 17:12:48 -05:00
parent 99477bac19
commit a7818b4ca3
21 changed files with 888 additions and 633 deletions

View File

@@ -65,7 +65,10 @@ export default async function reprintLabelMonitor(notifyData: any) {
`;
//update the time check
notifyQuery = notifyQuery.replaceAll("[timeCheck]", notifyData.checkTime);
notifyQuery = notifyQuery.replaceAll(
"[timeCheck]",
notifyData.checkInterval
);
notifyQuery = notifyQuery.replaceAll(
"[locations]",
notifyData.notifiySettings.locations
@@ -82,13 +85,13 @@ export default async function reprintLabelMonitor(notifyData: any) {
// update the count with the result
const emailSetup = {
emailTo: notifyData.emails,
email: notifyData.emails,
subject: `Alert! Pallets in production greater than ${notifyData.checkTime} ${notifyData.timeType}`,
template: "productionCheck",
context: {
items: prod,
count: prod.length,
checkTime: notifyData.checkTime,
checkTime: notifyData.checkInterval,
timeCheck: notifyData.timeType,
},
};