IO-1748 Add vendor # to parts order modal.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { HeartOutlined } from "@ant-design/icons";
|
import { HeartOutlined } from "@ant-design/icons";
|
||||||
import { Select, Tag } from "antd";
|
import { Select, Space, Tag } from "antd";
|
||||||
import React, { forwardRef, useEffect, useState } from "react";
|
import React, { forwardRef, useEffect, useState } from "react";
|
||||||
|
import PhoneNumberFormatter from "../../utils/PhoneFormatter";
|
||||||
const { Option } = Select;
|
const { Option } = Select;
|
||||||
|
|
||||||
//To be used as a form element only.
|
//To be used as a form element only.
|
||||||
@@ -35,6 +36,7 @@ const VendorSearchSelect = (
|
|||||||
style={{
|
style={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
}}
|
}}
|
||||||
|
dropdownMatchSelectWidth={false}
|
||||||
onChange={setOption}
|
onChange={setOption}
|
||||||
optionFilterProp="name"
|
optionFilterProp="name"
|
||||||
onSelect={onSelect}
|
onSelect={onSelect}
|
||||||
@@ -50,10 +52,15 @@ const VendorSearchSelect = (
|
|||||||
>
|
>
|
||||||
<div className="imex-flex-row">
|
<div className="imex-flex-row">
|
||||||
<div style={{ flex: 1 }}>{o.name}</div>
|
<div style={{ flex: 1 }}>{o.name}</div>
|
||||||
<HeartOutlined />
|
<Space style={{ marginLeft: "1rem" }}>
|
||||||
{o.discount && o.discount !== 0 ? (
|
<HeartOutlined style={{ color: "red" }} />
|
||||||
<Tag color="green">{`${o.discount * 100}%`}</Tag>
|
{o.phone && (
|
||||||
) : null}
|
<PhoneNumberFormatter>{o.phone}</PhoneNumberFormatter>
|
||||||
|
)}
|
||||||
|
{o.discount && o.discount !== 0 ? (
|
||||||
|
<Tag color="green">{`${o.discount * 100}%`}</Tag>
|
||||||
|
) : null}
|
||||||
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
</Option>
|
</Option>
|
||||||
))
|
))
|
||||||
@@ -64,9 +71,14 @@ const VendorSearchSelect = (
|
|||||||
<div className="imex-flex-row" style={{ width: "100%" }}>
|
<div className="imex-flex-row" style={{ width: "100%" }}>
|
||||||
<div style={{ flex: 1 }}>{o.name}</div>
|
<div style={{ flex: 1 }}>{o.name}</div>
|
||||||
|
|
||||||
{o.discount && o.discount !== 0 ? (
|
<Space style={{ marginLeft: "1rem" }}>
|
||||||
<Tag color="green">{`${o.discount * 100}%`}</Tag>
|
{o.phone && (
|
||||||
) : null}
|
<PhoneNumberFormatter>{o.phone}</PhoneNumberFormatter>
|
||||||
|
)}
|
||||||
|
{o.discount && o.discount !== 0 ? (
|
||||||
|
<Tag color="green">{`${o.discount * 100}%`}</Tag>
|
||||||
|
) : null}
|
||||||
|
</Space>
|
||||||
</div>
|
</div>
|
||||||
</Option>
|
</Option>
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ export const QUERY_ALL_VENDORS_FOR_ORDER = gql`
|
|||||||
discount
|
discount
|
||||||
email
|
email
|
||||||
active
|
active
|
||||||
|
phone
|
||||||
}
|
}
|
||||||
jobs(where: { id: { _eq: $jobId } }) {
|
jobs(where: { id: { _eq: $jobId } }) {
|
||||||
v_make_desc
|
v_make_desc
|
||||||
|
|||||||
Reference in New Issue
Block a user