Modified job search select to include additoinal filters IO-417
This commit is contained in:
@@ -78,6 +78,8 @@ export function BillFormComponent({
|
||||
>
|
||||
<JobSearchSelect
|
||||
disabled={billEdit || disabled}
|
||||
convertedOnly
|
||||
// notExported={false}
|
||||
onBlur={() => {
|
||||
if (form.getFieldValue("jobid") !== null) {
|
||||
loadLines({ variables: { id: form.getFieldValue("jobid") } });
|
||||
|
||||
@@ -89,7 +89,12 @@ export function JobDetailCards({ setPrintCenterContext }) {
|
||||
<Tag
|
||||
color="#f50"
|
||||
key="production"
|
||||
style={{ display: data.jobs_by_pk.inproduction ? "" : "none" }}
|
||||
style={{
|
||||
display:
|
||||
data && data.jobs_by_pk && data.jobs_by_pk.inproduction
|
||||
? ""
|
||||
: "none",
|
||||
}}
|
||||
>
|
||||
{t("jobs.labels.inproduction")}
|
||||
</Tag>,
|
||||
|
||||
@@ -11,10 +11,31 @@ import AlertComponent from "../alert/alert.component";
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
const JobSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => {
|
||||
const JobSearchSelect = (
|
||||
{
|
||||
value,
|
||||
onChange,
|
||||
onBlur,
|
||||
disabled,
|
||||
convertedOnly = false,
|
||||
notExported = true,
|
||||
},
|
||||
ref
|
||||
) => {
|
||||
const [callSearch, { loading, error, data }] = useLazyQuery(
|
||||
SEARCH_JOBS_FOR_AUTOCOMPLETE
|
||||
SEARCH_JOBS_FOR_AUTOCOMPLETE,
|
||||
{
|
||||
...(convertedOnly || notExported
|
||||
? {
|
||||
variables: {
|
||||
...(convertedOnly ? { isConverted: true } : {}),
|
||||
...(notExported ? { notExported: true } : {}),
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
}
|
||||
);
|
||||
|
||||
const [
|
||||
callIdSearch,
|
||||
{ loading: idLoading, error: idError, data: idData },
|
||||
|
||||
Reference in New Issue
Block a user