IO-1103 Include removed lines for bill line select.
This commit is contained in:
@@ -13,6 +13,7 @@ const BillLineSearchSelect = ({ options, disabled, ...restProps }, ref) => {
|
|||||||
ref={ref}
|
ref={ref}
|
||||||
showSearch
|
showSearch
|
||||||
optionFilterProp="line_desc"
|
optionFilterProp="line_desc"
|
||||||
|
notFoundContent={"Removed."}
|
||||||
{...restProps}
|
{...restProps}
|
||||||
>
|
>
|
||||||
<Select.Option key={null} value={"noline"} cost={0} line_desc={""}>
|
<Select.Option key={null} value={"noline"} cost={0} line_desc={""}>
|
||||||
@@ -21,14 +22,18 @@ const BillLineSearchSelect = ({ options, disabled, ...restProps }, ref) => {
|
|||||||
{options
|
{options
|
||||||
? options.map((item) => (
|
? options.map((item) => (
|
||||||
<Option
|
<Option
|
||||||
|
disabled={item.removed}
|
||||||
key={item.id}
|
key={item.id}
|
||||||
value={item.id}
|
value={item.id}
|
||||||
cost={item.act_price ? item.act_price : 0}
|
cost={item.act_price ? item.act_price : 0}
|
||||||
part_type={item.part_type}
|
part_type={item.part_type}
|
||||||
line_desc={item.line_desc}
|
line_desc={item.line_desc}
|
||||||
part_qty={item.part_qty}
|
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}` : ""
|
item.oem_partno ? ` - ${item.oem_partno}` : ""
|
||||||
}`}
|
}`}
|
||||||
</Option>
|
</Option>
|
||||||
|
|||||||
@@ -160,7 +160,8 @@ export const UPDATE_JOB_LINE = gql`
|
|||||||
|
|
||||||
export const GET_JOB_LINES_TO_ENTER_BILL = gql`
|
export const GET_JOB_LINES_TO_ENTER_BILL = gql`
|
||||||
query GET_JOB_LINES_TO_ENTER_BILL($id: uuid!) {
|
query GET_JOB_LINES_TO_ENTER_BILL($id: uuid!) {
|
||||||
joblines(where: { jobid: { _eq: $id }, removed: { _eq: false } }) {
|
joblines(where: { jobid: { _eq: $id } }) {
|
||||||
|
removed
|
||||||
id
|
id
|
||||||
line_desc
|
line_desc
|
||||||
part_type
|
part_type
|
||||||
|
|||||||
Reference in New Issue
Block a user