feature/IO-3499-React-19: Bug Fixes / Checkpoint

This commit is contained in:
Dave
2026-01-13 22:28:43 -05:00
parent 7bdfbfabe9
commit 53d556a621
171 changed files with 1128 additions and 954 deletions

View File

@@ -65,8 +65,8 @@ export function PayableExportButton({ bodyshop, currentUser, billId, disabled, l
);
} 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)
})
});
@@ -79,8 +79,8 @@ export function PayableExportButton({ bodyshop, currentUser, billId, disabled, l
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);
@@ -94,8 +94,8 @@ export function PayableExportButton({ bodyshop, currentUser, billId, disabled, l
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 || ""
})
})
@@ -142,25 +142,23 @@ export function PayableExportButton({ bodyshop, currentUser, billId, disabled, l
}
});
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.error)
})
});
}
}
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"]))