From 623d407a6c0dfcb51940ab15fad32e585610a9de Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 20 Jun 2022 15:18:54 -0700 Subject: [PATCH] IO-1942 Resolve marking credit memoes received error. --- .../bill-cm-returns-table.component.jsx | 1 - .../bill-form/bill-form.component.jsx | 17 ++++++++++------- .../bill-form/bill-form.container.jsx | 1 - 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/client/src/components/bill-cm-returns-table/bill-cm-returns-table.component.jsx b/client/src/components/bill-cm-returns-table/bill-cm-returns-table.component.jsx index 555903813..47588ef1c 100644 --- a/client/src/components/bill-cm-returns-table/bill-cm-returns-table.component.jsx +++ b/client/src/components/bill-cm-returns-table/bill-cm-returns-table.component.jsx @@ -5,7 +5,6 @@ import ReadOnlyFormItemComponent from "../form-items-formatted/read-only-form-it import "./bill-cm-returns-table.styles.scss"; export default function BillCmdReturnsTableComponent({ form, - loadOutstandingReturns, returnLoading, returnData, }) { diff --git a/client/src/components/bill-form/bill-form.component.jsx b/client/src/components/bill-form/bill-form.component.jsx index a9eb07443..12617db5b 100644 --- a/client/src/components/bill-form/bill-form.component.jsx +++ b/client/src/components/bill-form/bill-form.component.jsx @@ -58,6 +58,7 @@ export function BillFormComponent({ {}, bodyshop.imexshopid ); + const handleVendorSelect = (props, opt) => { setDiscount(opt.discount); @@ -140,13 +141,14 @@ export function BillFormComponent({ onBlur={() => { if (form.getFieldValue("jobid") !== null) { loadLines({ variables: { id: form.getFieldValue("jobid") } }); - if (form.getFieldValue("vendorid") !== null) + if (form.getFieldValue("vendorid") !== null) { loadOutstandingReturns({ variables: { jobId: form.getFieldValue("jobid"), vendorId: form.getFieldValue("vendorid"), }, }); + } } }} /> @@ -273,12 +275,13 @@ export function BillFormComponent({ getFieldValue("jobid") && getFieldValue("vendorid") ) { - loadOutstandingReturns({ - variables: { - jobId: form.getFieldValue("jobid"), - vendorId: form.getFieldValue("vendorid"), - }, - }); + //Removed as this would cause an additional reload when validating the form on submit and clear the values. + // loadOutstandingReturns({ + // variables: { + // jobId: form.getFieldValue("jobid"), + // vendorId: form.getFieldValue("vendorid"), + // }, + // }); } if ( diff --git a/client/src/components/bill-form/bill-form.container.jsx b/client/src/components/bill-form/bill-form.container.jsx index 358bb7f38..07a70e4c5 100644 --- a/client/src/components/bill-form/bill-form.container.jsx +++ b/client/src/components/bill-form/bill-form.container.jsx @@ -63,7 +63,6 @@ export function BillFormContainer({ {!billEdit && (