feature/IO-3499-React-19: Bug Fixes / Checkpoint
This commit is contained in:
@@ -72,8 +72,8 @@ export function PaymentExportButton({
|
||||
console.log("handle -> XML", QbXmlResponse);
|
||||
} catch (error) {
|
||||
console.log("Error getting QBXML from Server.", error);
|
||||
notification["error"]({
|
||||
message: t("payments.errors.exporting", {
|
||||
notification.error({
|
||||
title: t("payments.errors.exporting", {
|
||||
error: "Unable to retrieve QBXML. " + JSON.stringify(error.message)
|
||||
})
|
||||
});
|
||||
@@ -86,8 +86,8 @@ export function PaymentExportButton({
|
||||
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("payments.errors.exporting-partner")
|
||||
notification.error({
|
||||
title: t("payments.errors.exporting-partner")
|
||||
});
|
||||
if (loadingCallback) loadingCallback(false);
|
||||
setLoading(false);
|
||||
@@ -101,8 +101,8 @@ export function PaymentExportButton({
|
||||
if (failedTransactions.length > 0) {
|
||||
//Uh oh. At least one was no good.
|
||||
failedTransactions.map((ft) =>
|
||||
notification["error"]({
|
||||
message: t("payments.errors.exporting", {
|
||||
notification.error({
|
||||
title: t("payments.errors.exporting", {
|
||||
error: ft.errorMessage || ""
|
||||
})
|
||||
})
|
||||
@@ -148,15 +148,14 @@ export function PaymentExportButton({
|
||||
}
|
||||
});
|
||||
if (!paymentUpdateResponse.errors) {
|
||||
notification.open({
|
||||
type: "success",
|
||||
notification.success({
|
||||
key: "paymentsuccessexport",
|
||||
message: t("payments.successes.exported")
|
||||
title: t("payments.successes.exported")
|
||||
});
|
||||
updatePaymentCache(paymentUpdateResponse.data.update_payments.returning.map((payment) => payment.id));
|
||||
} else {
|
||||
notification["error"]({
|
||||
message: t("payments.errors.exporting", {
|
||||
notification.error({
|
||||
title: t("payments.errors.exporting", {
|
||||
error: JSON.stringify(paymentUpdateResponse.error)
|
||||
})
|
||||
});
|
||||
@@ -170,10 +169,9 @@ export function PaymentExportButton({
|
||||
}
|
||||
}
|
||||
if (bodyshop?.accountingconfig?.qbo && successfulTransactions.length > 0) {
|
||||
notification.open({
|
||||
type: "success",
|
||||
notification.success({
|
||||
key: "paymentsuccessexport",
|
||||
message: t("payments.successes.exported")
|
||||
title: t("payments.successes.exported")
|
||||
});
|
||||
updatePaymentCache([
|
||||
...new Set(successfulTransactions.map((st) => st[bodyshop.accountingconfig?.qbo ? "paymentid" : "id"]))
|
||||
|
||||
Reference in New Issue
Block a user