feature/IO-3499-React-19: Bug Fixes / Checkpoint
This commit is contained in:
@@ -15,8 +15,8 @@ export default function AddToProduction(apolloClient, jobId, completionCallback,
|
||||
variables: { jobId: jobId, job: { inproduction: !remove } }
|
||||
})
|
||||
.then(() => {
|
||||
notification["success"]({
|
||||
message: i18n.t("jobs.successes.save")
|
||||
notification.success({
|
||||
title: i18n.t("jobs.successes.save")
|
||||
});
|
||||
|
||||
store.dispatch(
|
||||
@@ -29,8 +29,8 @@ export default function AddToProduction(apolloClient, jobId, completionCallback,
|
||||
if (completionCallback) completionCallback();
|
||||
})
|
||||
.catch((error) => {
|
||||
notification["errors"]({
|
||||
message: i18n.t("jobs.errors.saving", {
|
||||
notification.error({
|
||||
title: i18n.t("jobs.errors.saving", {
|
||||
error: JSON.stringify(error)
|
||||
})
|
||||
});
|
||||
|
||||
@@ -182,7 +182,7 @@ export function JobsDetailHeaderActions({
|
||||
completionCallback: (newJobId) => {
|
||||
history(`/manage/jobs/${newJobId}`);
|
||||
notification.success({
|
||||
message: t("jobs.successes.duplicated")
|
||||
title: t("jobs.successes.duplicated")
|
||||
});
|
||||
},
|
||||
keepJobLines: true,
|
||||
@@ -197,7 +197,7 @@ export function JobsDetailHeaderActions({
|
||||
completionCallback: (newJobId) => {
|
||||
history(`/manage/jobs/${newJobId}`);
|
||||
notification.success({
|
||||
message: t("jobs.successes.duplicated")
|
||||
title: t("jobs.successes.duplicated")
|
||||
});
|
||||
},
|
||||
keepJobLines: false,
|
||||
@@ -215,14 +215,12 @@ export function JobsDetailHeaderActions({
|
||||
},
|
||||
refetchQueries: ["QUERY_ALL_ACTIVE_APPOINTMENTS"]
|
||||
});
|
||||
notification.open({
|
||||
type: "success",
|
||||
message: t("appointments.successes.created")
|
||||
notification.success({
|
||||
title: t("appointments.successes.created")
|
||||
});
|
||||
} catch (error) {
|
||||
notification.open({
|
||||
type: "error",
|
||||
message: t("appointments.errors.saving", { error: error.message })
|
||||
notification.error({
|
||||
title: t("appointments.errors.saving", { error: error.message })
|
||||
});
|
||||
} finally {
|
||||
setLoading(false);
|
||||
@@ -236,13 +234,13 @@ export function JobsDetailHeaderActions({
|
||||
|
||||
if (!result.errors) {
|
||||
notification.success({
|
||||
message: t("jobs.successes.delete")
|
||||
title: t("jobs.successes.delete")
|
||||
});
|
||||
//go back to jobs list.
|
||||
history(`/manage/`);
|
||||
} else {
|
||||
notification.error({
|
||||
message: t("jobs.errors.deleted", {
|
||||
title: t("jobs.errors.deleted", {
|
||||
error: JSON.stringify(result.errors)
|
||||
})
|
||||
});
|
||||
@@ -293,10 +291,10 @@ export function JobsDetailHeaderActions({
|
||||
});
|
||||
|
||||
if (!result.errors) {
|
||||
notification.success({ message: t("csi.successes.created") });
|
||||
notification.success({ title: t("csi.successes.created") });
|
||||
} else {
|
||||
notification.error({
|
||||
message: t("csi.errors.creating", {
|
||||
title: t("csi.errors.creating", {
|
||||
message: JSON.stringify(result.errors)
|
||||
})
|
||||
});
|
||||
@@ -335,7 +333,7 @@ export function JobsDetailHeaderActions({
|
||||
);
|
||||
} else {
|
||||
notification.error({
|
||||
message: t("messaging.error.invalidphone")
|
||||
title: t("messaging.error.invalidphone")
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -347,7 +345,7 @@ export function JobsDetailHeaderActions({
|
||||
}
|
||||
} else {
|
||||
notification.error({
|
||||
message: t("csi.errors.notconfigured")
|
||||
title: t("csi.errors.notconfigured")
|
||||
});
|
||||
}
|
||||
} else {
|
||||
@@ -377,7 +375,7 @@ export function JobsDetailHeaderActions({
|
||||
setMessage(`${window.location.protocol}//${window.location.host}/csi/${job.csiinvites[0].id}`);
|
||||
} else {
|
||||
notification.error({
|
||||
message: t("messaging.error.invalidphone")
|
||||
title: t("messaging.error.invalidphone")
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -417,7 +415,7 @@ export function JobsDetailHeaderActions({
|
||||
|
||||
if (!result.errors) {
|
||||
notification.success({
|
||||
message: t("jobs.successes.voided")
|
||||
title: t("jobs.successes.voided")
|
||||
});
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
@@ -428,7 +426,7 @@ export function JobsDetailHeaderActions({
|
||||
history(`/manage/`);
|
||||
} else {
|
||||
notification.error({
|
||||
message: t("jobs.errors.voiding", {
|
||||
title: t("jobs.errors.voiding", {
|
||||
error: JSON.stringify(result.errors)
|
||||
})
|
||||
});
|
||||
@@ -461,7 +459,7 @@ export function JobsDetailHeaderActions({
|
||||
} catch (error) {
|
||||
console.log("Error getting QBXML from Server.", error);
|
||||
notification.error({
|
||||
message: t("jobs.errors.exporting", {
|
||||
title: t("jobs.errors.exporting", {
|
||||
error: "Unable to retrieve QBXML. " + JSON.stringify(error.message)
|
||||
})
|
||||
});
|
||||
@@ -479,7 +477,7 @@ export function JobsDetailHeaderActions({
|
||||
} catch (error) {
|
||||
console.log("Error connecting to quickbooks or partner.", error);
|
||||
notification.error({
|
||||
message: t("jobs.errors.exporting-partner")
|
||||
title: t("jobs.errors.exporting-partner")
|
||||
});
|
||||
|
||||
return;
|
||||
@@ -491,10 +489,9 @@ export function JobsDetailHeaderActions({
|
||||
//Uh oh. At least one was no good.
|
||||
failedTransactions.forEach((ft) => {
|
||||
//insert failed export log
|
||||
notification.open({
|
||||
notification.error({
|
||||
// key: "failedexports",
|
||||
type: "error",
|
||||
message: t("jobs.errors.exporting", {
|
||||
title: t("jobs.errors.exporting", {
|
||||
error: ft.errorMessage || ""
|
||||
})
|
||||
});
|
||||
@@ -504,10 +501,9 @@ export function JobsDetailHeaderActions({
|
||||
} else {
|
||||
//Insert success export log.
|
||||
|
||||
notification.open({
|
||||
type: "success",
|
||||
notification.success({
|
||||
key: "jobsuccessexport",
|
||||
message: t("jobs.successes.exported")
|
||||
title: t("jobs.successes.exported")
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -575,7 +571,7 @@ export function JobsDetailHeaderActions({
|
||||
});
|
||||
if (!jobUpdate.errors) {
|
||||
notification.success({
|
||||
message: t("appointments.successes.canceled")
|
||||
title: t("appointments.successes.canceled")
|
||||
});
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
@@ -952,11 +948,11 @@ export function JobsDetailHeaderActions({
|
||||
|
||||
if (!result.errors) {
|
||||
notification.success({
|
||||
message: t("jobs.successes.partsqueue")
|
||||
title: t("jobs.successes.partsqueue")
|
||||
});
|
||||
} else {
|
||||
notification.error({
|
||||
message: t("jobs.errors.saving", {
|
||||
title: t("jobs.errors.saving", {
|
||||
error: JSON.stringify(result.errors)
|
||||
})
|
||||
});
|
||||
@@ -1145,12 +1141,12 @@ export function JobsDetailHeaderActions({
|
||||
try {
|
||||
await axios.post("/job/totals-recorder", { id: job.id });
|
||||
notification.success({
|
||||
message: t("general.messages.submit-for-testing")
|
||||
title: t("general.messages.submit-for-testing")
|
||||
});
|
||||
} catch (err) {
|
||||
console.error(`Error submitting job for testing: ${err?.message}`);
|
||||
notification.error({
|
||||
message: t("general.errors.submit-for-testing-error")
|
||||
title: t("general.errors.submit-for-testing-error")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,8 +91,8 @@ export function JobsDetailHeaderActionsToggleProduction({
|
||||
});
|
||||
|
||||
if (!res.errors) {
|
||||
notification["success"]({
|
||||
message: t("jobs.successes.converted")
|
||||
notification.success({
|
||||
title: t("jobs.successes.converted")
|
||||
});
|
||||
|
||||
insertAuditTrail({
|
||||
|
||||
Reference in New Issue
Block a user