IO-3166-Global-Notifications-Part-2: checkpoint
This commit is contained in:
@@ -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: []
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user