feature/IO-3499-React-19: Bug Fixes / Checkpoint
This commit is contained in:
@@ -62,8 +62,8 @@ export function PayableExportAll({ bodyshop, currentUser, billids, disabled, loa
|
||||
);
|
||||
} catch (error) {
|
||||
console.log("Error getting QBXML from Server.", error);
|
||||
notification["error"]({
|
||||
message: t("bills.errors.exporting", {
|
||||
notification.error({
|
||||
title: t("bills.errors.exporting", {
|
||||
error: "Unable to retrieve QBXML. " + JSON.stringify(error.message)
|
||||
})
|
||||
});
|
||||
@@ -76,8 +76,8 @@ export function PayableExportAll({ bodyshop, currentUser, billids, disabled, loa
|
||||
PartnerResponse = await axios.post("http://localhost:1337/qb/", QbXmlResponse.data);
|
||||
} catch (error) {
|
||||
console.log("Error connecting to quickbooks or partner.", error);
|
||||
notification["error"]({
|
||||
message: t("bills.errors.exporting-partner")
|
||||
notification.error({
|
||||
title: t("bills.errors.exporting-partner")
|
||||
});
|
||||
if (loadingCallback) loadingCallback(false);
|
||||
setLoading(false);
|
||||
@@ -97,8 +97,8 @@ export function PayableExportAll({ bodyshop, currentUser, billids, disabled, loa
|
||||
if (failedTransactions.length > 0) {
|
||||
//Uh oh. At least one was no good.
|
||||
failedTransactions.map((ft) =>
|
||||
notification["error"]({
|
||||
message: t("bills.errors.exporting", {
|
||||
notification.error({
|
||||
title: t("bills.errors.exporting", {
|
||||
error: ft.errorMessage || ""
|
||||
})
|
||||
})
|
||||
@@ -145,25 +145,23 @@ export function PayableExportAll({ bodyshop, currentUser, billids, disabled, loa
|
||||
}
|
||||
});
|
||||
if (!billUpdateResponse.errors) {
|
||||
notification.open({
|
||||
type: "success",
|
||||
notification.success({
|
||||
key: "billsuccessexport",
|
||||
message: t("bills.successes.exported")
|
||||
title: t("bills.successes.exported")
|
||||
});
|
||||
updateBillCache(billUpdateResponse.data.update_bills.returning.map((bill) => bill.id));
|
||||
} else {
|
||||
notification["error"]({
|
||||
message: t("bills.errors.exporting", {
|
||||
notification.error({
|
||||
title: t("bills.errors.exporting", {
|
||||
error: JSON.stringify(billUpdateResponse.errors)
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
if (bodyshop?.accountingconfig?.qbo && successfulTransactions.length > 0) {
|
||||
notification.open({
|
||||
type: "success",
|
||||
notification.success({
|
||||
key: "billsuccessexport",
|
||||
message: t("bills.successes.exported")
|
||||
title: t("bills.successes.exported")
|
||||
});
|
||||
updateBillCache([
|
||||
...new Set(successfulTransactions.map((st) => st[bodyshop.accountingconfig?.qbo ? "billid" : "id"]))
|
||||
|
||||
Reference in New Issue
Block a user