feature/IO-3499-React-19: Bug Fixes / Checkpoint
This commit is contained in:
@@ -73,8 +73,8 @@ export function JobsExportAllButton({
|
||||
);
|
||||
} catch (error) {
|
||||
console.log("Error getting QBXML from Server.", error);
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.exporting", {
|
||||
notification.error({
|
||||
title: t("jobs.errors.exporting", {
|
||||
error: "Unable to retrieve QBXML. " + JSON.stringify(error.message)
|
||||
})
|
||||
});
|
||||
@@ -95,8 +95,8 @@ export function JobsExportAllButton({
|
||||
);
|
||||
} catch (error) {
|
||||
console.log("Error connecting to quickbooks or partner.", error);
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.exporting-partner")
|
||||
notification.error({
|
||||
title: t("jobs.errors.exporting-partner")
|
||||
});
|
||||
setLoading(false);
|
||||
return;
|
||||
@@ -114,10 +114,9 @@ export function JobsExportAllButton({
|
||||
if (failedTransactions.length > 0) {
|
||||
//Uh oh. At least one was no good.
|
||||
failedTransactions.forEach((ft) => {
|
||||
notification.open({
|
||||
notification.error({
|
||||
// key: "failedexports",
|
||||
type: "error",
|
||||
message: t("jobs.errors.exporting", {
|
||||
title: t("jobs.errors.exporting", {
|
||||
error: ft.errorMessage || ""
|
||||
})
|
||||
});
|
||||
@@ -167,10 +166,9 @@ export function JobsExportAllButton({
|
||||
});
|
||||
|
||||
if (!jobUpdateResponse.errors) {
|
||||
notification.open({
|
||||
type: "success",
|
||||
notification.success({
|
||||
key: "jobsuccessexport",
|
||||
message: t("jobs.successes.exported")
|
||||
title: t("jobs.successes.exported")
|
||||
});
|
||||
jobUpdateResponse.data.update_jobs.returning.forEach((job) => {
|
||||
insertAuditTrail({
|
||||
@@ -181,18 +179,17 @@ export function JobsExportAllButton({
|
||||
});
|
||||
updateJobCache(jobUpdateResponse.data.update_jobs.returning.map((job) => job.id));
|
||||
} else {
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.exporting", {
|
||||
notification.error({
|
||||
title: t("jobs.errors.exporting", {
|
||||
error: JSON.stringify(jobUpdateResponse.error)
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
if (bodyshop.accountingconfig?.qbo && successfulTransactions.length > 0) {
|
||||
notification.open({
|
||||
type: "success",
|
||||
notification.success({
|
||||
key: "jobsuccessexport",
|
||||
message: t("jobs.successes.exported")
|
||||
title: t("jobs.successes.exported")
|
||||
});
|
||||
const successfulTransactionsSet = [
|
||||
...new Set(successfulTransactions.map((st) => st[bodyshop.accountingconfig?.qbo ? "jobid" : "id"]))
|
||||
|
||||
Reference in New Issue
Block a user