feature/IO-3096-GlobalNotifications - Checkpoint, merge master, ready DB

This commit is contained in:
Dave Richer
2025-02-24 12:05:40 -05:00
parent e892e4cab1
commit a5cf81bd28
12 changed files with 142 additions and 48 deletions

View File

@@ -8,8 +8,8 @@ const { getJobAssignmentType } = require("./stringHelpers");
*/
const populateWatchers = (data, result) => {
data.scenarioWatchers.forEach((recipients) => {
const { user, app, fcm, email, firstName, lastName } = recipients;
if (app === true) result.app.recipients.push({ user, bodyShopId: data.bodyShopId });
const { user, app, fcm, email, firstName, lastName, employeeId } = recipients;
if (app === true) result.app.recipients.push({ user, bodyShopId: data.bodyShopId, employeeId });
if (fcm === true) result.fcm.recipients.push(user);
if (email === true) result.email.recipients.push({ user, firstName, lastName });
});