From a933a1d58710efc171951e4ce7018bcd05832c9e Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 13 Dec 2021 13:22:02 -0800 Subject: [PATCH] IO-1572 Search bill lines by act price. --- .../bill-line-search-select.component.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx b/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx index e470fce33..910d29856 100644 --- a/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx +++ b/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx @@ -20,7 +20,11 @@ const BillLineSearchSelect = ({ options, disabled, ...restProps }, ref) => { .toLowerCase() .includes(inputValue.toLowerCase())) || (option.oem_partno && - option.oem_partno.toLowerCase().includes(inputValue.toLowerCase())) + option.oem_partno + .toLowerCase() + .includes(inputValue.toLowerCase())) || + (option.act_price && + option.act_price.toString().startsWith(inputValue.toString())) ); }} notFoundContent={"Removed."} @@ -40,13 +44,14 @@ const BillLineSearchSelect = ({ options, disabled, ...restProps }, ref) => { line_desc={item.line_desc} part_qty={item.part_qty} oem_partno={item.oem_partno} + act_price={item.act_price} style={{ ...(item.removed ? { textDecoration: "line-through" } : {}), }} > {`${item.removed ? `(REMOVED) ` : ""}${item.line_desc}${ item.oem_partno ? ` - ${item.oem_partno}` : "" - }`} + }${item.act_price ? ` - $${item.act_price}` : ``}`} )) : null}