feature/IO-3096-GlobalNotifications - Checkpoint - Additional String Cleanup, loading spinner

This commit is contained in:
Dave Richer
2025-03-03 12:07:19 -05:00
parent 35b92570e5
commit 86aa5bf5e7
8 changed files with 46 additions and 20 deletions

View File

@@ -9,7 +9,13 @@ const { getJobAssignmentType } = require("./stringHelpers");
const populateWatchers = (data, result) => {
data.scenarioWatchers.forEach((recipients) => {
const { user, app, fcm, email, firstName, lastName, employeeId, associationId } = recipients;
if (app === true) result.app.recipients.push({ user, bodyShopId: data.bodyShopId, employeeId, associationId });
if (app === true)
result.app.recipients.push({
user,
bodyShopId: data.bodyShopId,
employeeId,
associationId
});
if (fcm === true) result.fcm.recipients.push(user);
if (email === true) result.email.recipients.push({ user, firstName, lastName });
});
@@ -147,7 +153,7 @@ const intakeDeliveryChecklistCompletedBuilder = (data) => {
* Builds notification data for job assignment events.
*/
const jobAssignedToMeBuilder = (data) => {
const body = `You have been assigned to [${getJobAssignmentType(data.scenarioFields?.[0])}]`;
const body = `You have been assigned to ${getJobAssignmentType(data.scenarioFields?.[0])}`;
const result = {
app: {
jobId: data.jobId,