Add contextRefect to payment export buttons.

This commit is contained in:
Patrick Fic
2024-04-08 09:48:39 -07:00
parent 1469960643
commit a2a7c1c58c
2 changed files with 24 additions and 12 deletions

View File

@@ -61,11 +61,13 @@ const PaymentMarkForExportButton = ({ bodyshop, payment, refetch, setPaymentCont
}
});
if (refetch)
refetch(
paymentUpdateResponse &&
paymentUpdateResponse.data.update_payments.returning[0]
);
if (refetch) {
if (context.refetchRequiresContext) {
refetch(paymentUpdateResponse && paymentUpdateResponse.data.update_payments.returning[0]);
} else {
refetch();
}
}
} else {
notification["error"]({
message: t("payments.errors.exporting", {