Added parts backorder + receiving for orders BOD-159
This commit is contained in:
@@ -13,7 +13,7 @@ export default function JobsDetailPliContainer({ job }) {
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const history = useHistory();
|
||||
|
||||
const handleOnRowClick = (record) => {
|
||||
const handleInvoiceOnRowClick = (record) => {
|
||||
if (record) {
|
||||
if (record.id) {
|
||||
search.invoiceid = record.id;
|
||||
@@ -25,12 +25,24 @@ export default function JobsDetailPliContainer({ job }) {
|
||||
}
|
||||
};
|
||||
|
||||
const handlePartsOrderOnRowClick = (record) => {
|
||||
if (record) {
|
||||
if (record.id) {
|
||||
search.partsorderid = record.id;
|
||||
history.push({ search: queryString.stringify(search) });
|
||||
}
|
||||
} else {
|
||||
delete search.partsorderid;
|
||||
history.push({ search: queryString.stringify(search) });
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<JobsDetailPliComponent
|
||||
job={job}
|
||||
invoicesQuery={invoicesQuery}
|
||||
handleOnRowClick={handleOnRowClick}
|
||||
selectedInvoice={search.invoiceid}
|
||||
handleInvoiceOnRowClick={handleInvoiceOnRowClick}
|
||||
handlePartsOrderOnRowClick={handlePartsOrderOnRowClick}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user