feature/IO-3096-GlobalNotifications - Checkpoint, BULLMQ!
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const consoleDir = require("../utils/consoleDir");
|
||||
const { getJobAssignmentType } = require("./stringHelpers");
|
||||
|
||||
const alternateTransportChangedBuilder = (data) => {
|
||||
consoleDir(data);
|
||||
@@ -17,7 +18,23 @@ const intakeDeliveryChecklistCompletedBuilder = (data) => {
|
||||
};
|
||||
|
||||
const jobAssignedToMeBuilder = (data) => {
|
||||
consoleDir(data);
|
||||
return {
|
||||
app: {
|
||||
key: "notifications.job.assigned",
|
||||
variables: {
|
||||
type: data.scenarioFields?.[0],
|
||||
jobId: data.jobId,
|
||||
bodyShopName: data.bodyShopName
|
||||
},
|
||||
recipients: data.scenarioWatchers.map((watcher) => ({ email: watcher.user, employeeId: watcher.employeeId }))
|
||||
},
|
||||
email: {
|
||||
subject: `You have been assigned to [${getJobAssignmentType(data.scenarioFields?.[0])}] on ${data?.jobRoNumber} in ${data.bodyShopName}`,
|
||||
body: `Hello, a new job has been assigned to you in ${data.bodyShopName}.`,
|
||||
recipient: data.scenarioWatchers.map((watcher) => watcher.user)
|
||||
},
|
||||
fcm: {}
|
||||
};
|
||||
};
|
||||
|
||||
const jobsAddedToProductionBuilder = (data) => {
|
||||
|
||||
Reference in New Issue
Block a user