Merged in feature/IO-3322-intellipay-refund (pull request #2465)

IO-3332 Add error message to intellipay refund error.
This commit is contained in:
Patrick Fic
2025-08-11 19:29:59 +00:00
3 changed files with 28 additions and 7 deletions

View File

@@ -16,10 +16,10 @@ import { useNotification } from "../../contexts/Notifications/notificationContex
const { confirm } = Modal;
const openNotificationWithIcon = (type, t, notification) => {
const openNotificationWithIcon = (type, t, notification, message) => {
notification[type]({
message: t("job_payments.notifications.error.title"),
description: t("job_payments.notifications.error.description")
description: t("job_payments.notifications.error.description", { message: message || "Unknown error." })
});
};
@@ -99,7 +99,7 @@ const PaymentExpandedRowComponent = ({ record, bodyshop }) => {
});
if (refundResponse.data.status < 0) {
openNotificationWithIcon("error", t, notification);
openNotificationWithIcon("error", t, notification, refundResponse.data.message);
return;
}