IO-1103 Include removed lines for bill line select.

This commit is contained in:
Patrick Fic
2021-09-21 15:56:07 -07:00
parent 4cc1f77b14
commit c64c49ab6e
2 changed files with 8 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ const BillLineSearchSelect = ({ options, disabled, ...restProps }, ref) => {
ref={ref}
showSearch
optionFilterProp="line_desc"
notFoundContent={"Removed."}
{...restProps}
>
<Select.Option key={null} value={"noline"} cost={0} line_desc={""}>
@@ -21,14 +22,18 @@ const BillLineSearchSelect = ({ options, disabled, ...restProps }, ref) => {
{options
? options.map((item) => (
<Option
disabled={item.removed}
key={item.id}
value={item.id}
cost={item.act_price ? item.act_price : 0}
part_type={item.part_type}
line_desc={item.line_desc}
part_qty={item.part_qty}
style={{
...(item.removed ? { textDecoration: "line-through" } : {}),
}}
>
{`${item.line_desc}${
{`${item.removed ? `(REMOVED) ` : ""}${item.line_desc}${
item.oem_partno ? ` - ${item.oem_partno}` : ""
}`}
</Option>

View File

@@ -160,7 +160,8 @@ export const UPDATE_JOB_LINE = gql`
export const GET_JOB_LINES_TO_ENTER_BILL = gql`
query GET_JOB_LINES_TO_ENTER_BILL($id: uuid!) {
joblines(where: { jobid: { _eq: $id }, removed: { _eq: false } }) {
joblines(where: { jobid: { _eq: $id } }) {
removed
id
line_desc
part_type