feature/IO-3096-GlobalNotifications - Checkpoint - Fix user getting all bodyshop notifications (now by associationId), fix regression in 'Assigned To' scenario.

This commit is contained in:
Dave Richer
2025-02-26 13:11:49 -05:00
parent b86309e74b
commit 0767e290f4
8 changed files with 99 additions and 65 deletions

View File

@@ -31,7 +31,7 @@ const scenarioParser = async (req, jobIdField) => {
const { event, trigger, table } = req.body;
const { logger } = req;
// Validate we know what user commited the action that fired the parser
// Validate we know what user committed the action that fired the parser
const hasuraUserId = event?.session_variables?.["x-hasura-user-id"];
// Bail if we don't know
@@ -140,9 +140,10 @@ const scenarioParser = async (req, jobIdField) => {
email: settings.email,
app: settings.app,
fcm: settings.fcm,
firstName: matchingWatcher ? matchingWatcher.firstName : undefined,
lastName: matchingWatcher ? matchingWatcher.lastName : undefined,
employeeId: matchingWatcher ? assoc.id : undefined
firstName: matchingWatcher?.firstName,
lastName: matchingWatcher?.lastName,
employeeId: matchingWatcher?.employeeId,
associationId: assoc.id
};
})
}));