Merged in release/2022-06-24 (pull request #520)

release/2022-06-24

Approved-by: Patrick Fic
This commit is contained in:
Patrick Fic
2022-06-20 22:19:15 +00:00
3 changed files with 10 additions and 9 deletions

View File

@@ -5,7 +5,6 @@ import ReadOnlyFormItemComponent from "../form-items-formatted/read-only-form-it
import "./bill-cm-returns-table.styles.scss"; import "./bill-cm-returns-table.styles.scss";
export default function BillCmdReturnsTableComponent({ export default function BillCmdReturnsTableComponent({
form, form,
loadOutstandingReturns,
returnLoading, returnLoading,
returnData, returnData,
}) { }) {

View File

@@ -58,6 +58,7 @@ export function BillFormComponent({
{}, {},
bodyshop.imexshopid bodyshop.imexshopid
); );
const handleVendorSelect = (props, opt) => { const handleVendorSelect = (props, opt) => {
setDiscount(opt.discount); setDiscount(opt.discount);
@@ -140,13 +141,14 @@ export function BillFormComponent({
onBlur={() => { onBlur={() => {
if (form.getFieldValue("jobid") !== null) { if (form.getFieldValue("jobid") !== null) {
loadLines({ variables: { id: form.getFieldValue("jobid") } }); loadLines({ variables: { id: form.getFieldValue("jobid") } });
if (form.getFieldValue("vendorid") !== null) if (form.getFieldValue("vendorid") !== null) {
loadOutstandingReturns({ loadOutstandingReturns({
variables: { variables: {
jobId: form.getFieldValue("jobid"), jobId: form.getFieldValue("jobid"),
vendorId: form.getFieldValue("vendorid"), vendorId: form.getFieldValue("vendorid"),
}, },
}); });
}
} }
}} }}
/> />
@@ -273,12 +275,13 @@ export function BillFormComponent({
getFieldValue("jobid") && getFieldValue("jobid") &&
getFieldValue("vendorid") getFieldValue("vendorid")
) { ) {
loadOutstandingReturns({ //Removed as this would cause an additional reload when validating the form on submit and clear the values.
variables: { // loadOutstandingReturns({
jobId: form.getFieldValue("jobid"), // variables: {
vendorId: form.getFieldValue("vendorid"), // jobId: form.getFieldValue("jobid"),
}, // vendorId: form.getFieldValue("vendorid"),
}); // },
// });
} }
if ( if (

View File

@@ -63,7 +63,6 @@ export function BillFormContainer({
{!billEdit && ( {!billEdit && (
<BillCmdReturnsTableComponent <BillCmdReturnsTableComponent
form={form} form={form}
loadOutstandingReturns={loadOutstandingReturns}
returnLoading={returnLoading} returnLoading={returnLoading}
returnData={returnData} returnData={returnData}
/> />