IO-3166-Global-Notifications-Part-2: checkpoint
This commit is contained in:
@@ -23,6 +23,7 @@ export const useNotification = () => {
|
|||||||
export const NotificationProvider = ({ children }) => {
|
export const NotificationProvider = ({ children }) => {
|
||||||
const [api, contextHolder] = notification.useNotification({
|
const [api, contextHolder] = notification.useNotification({
|
||||||
placement: "bottomRight",
|
placement: "bottomRight",
|
||||||
|
bottom: 70,
|
||||||
showProgress: true
|
showProgress: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -261,12 +261,13 @@ const newMediaAddedReassignedBuilder = (data) => {
|
|||||||
|
|
||||||
// Determine the action
|
// Determine the action
|
||||||
let action;
|
let action;
|
||||||
|
|
||||||
if (data?.data?._documentMoved) {
|
if (data?.data?._documentMoved) {
|
||||||
action = "moved to another Job"; // Special case for document moved from this job
|
action = "moved to another job"; // Special case for document moved from this job
|
||||||
} else if (data.isNew) {
|
} else if (data.isNew) {
|
||||||
action = "added"; // New media
|
action = "added"; // New media
|
||||||
} else if (data.changedFields?.jobid && data.changedFields.jobid.old !== data.changedFields.jobid.new) {
|
} else if (data.changedFields?.jobid && data.changedFields.jobid.old !== data.changedFields.jobid.new) {
|
||||||
action = "moved to this Job";
|
action = "moved to this job";
|
||||||
} else {
|
} else {
|
||||||
action = "updated";
|
action = "updated";
|
||||||
}
|
}
|
||||||
@@ -416,7 +417,6 @@ const partMarkedBackOrderedBuilder = (data) => {
|
|||||||
*/
|
*/
|
||||||
const paymentCollectedCompletedBuilder = (data) => {
|
const paymentCollectedCompletedBuilder = (data) => {
|
||||||
const momentFormat = "MM/DD/YYYY";
|
const momentFormat = "MM/DD/YYYY";
|
||||||
const timezone = data.bodyShopTimezone;
|
|
||||||
|
|
||||||
// Format amount using Dinero.js
|
// Format amount using Dinero.js
|
||||||
const amountDinero = Dinero({
|
const amountDinero = Dinero({
|
||||||
@@ -427,7 +427,7 @@ const paymentCollectedCompletedBuilder = (data) => {
|
|||||||
|
|
||||||
const payer = data.data.payer;
|
const payer = data.data.payer;
|
||||||
const paymentType = data.data.type;
|
const paymentType = data.data.type;
|
||||||
const paymentDate = moment(data.data.date).tz(timezone).format(momentFormat);
|
const paymentDate = moment(data.data.date).format(momentFormat);
|
||||||
|
|
||||||
const body = `Payment of ${amountFormatted} has been collected from ${payer} via ${paymentType} on ${paymentDate}`;
|
const body = `Payment of ${amountFormatted} has been collected from ${payer} via ${paymentType} on ${paymentDate}`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user