Merge branch 'feature/IO-2727-resolve-payment-refetch' into test-AIO

This commit is contained in:
Patrick Fic
2024-04-08 11:08:57 -07:00
4 changed files with 37 additions and 26 deletions

View File

@@ -89,10 +89,13 @@ function PaymentModalContainer({paymentModal, toggleModalVisible, bodyshop }) {
}
if (actions.refetch) {
const updatedData = smartRefetch && updatedPayment ? updatedPayment.data.update_payments.returning[0] : undefined;
actions.refetch(updatedData);
if (context.refetchRequiresContext) {
actions.refetch(updatedPayment && updatedPayment.data.update_payments.returning[0]);
} else {
actions.refetch();
}
}
if (enterAgain) {
const prev = form.getFieldsValue(["date"]);
@@ -166,13 +169,7 @@ function PaymentModalContainer({paymentModal, toggleModalVisible, bodyshop }) {
</Space>
)}
<Form
onFinish={handleFinish}
autoComplete={"off"}
form={form}
layout="vertical"
disabled={context?.exportedat}
>
<Form onFinish={handleFinish} autoComplete={"off"} form={form} layout="vertical" disabled={context?.exportedat}>
<PaymentForm form={form} />
</Form>
</Modal>