IO-3166-Global-Notifications-Part-2: checkpoint

This commit is contained in:
Dave Richer
2025-03-11 13:16:47 -04:00
parent d6df5af1a4
commit 8de7db60e6
2 changed files with 64 additions and 5 deletions

View File

@@ -261,10 +261,12 @@ const newMediaAddedReassignedBuilder = (data) => {
// Determine the action
let action;
if (data.isNew) {
if (data?.data?._documentMoved) {
action = "moved to another Job"; // Special case for document moved from this job
} else if (data.isNew) {
action = "added"; // New media
} else if (data.changedFields?.jobid && data.changedFields.jobid.old !== data.changedFields.jobid.new) {
action = "reassigned to Job";
action = "moved to this Job";
} else {
action = "updated";
}
@@ -281,7 +283,8 @@ const newMediaAddedReassignedBuilder = (data) => {
body,
variables: {
mediaType,
action
action,
movedToJob: data?.data?._movedToJob
},
recipients: []
},