IO-1219 Add status to job search select.

This commit is contained in:
Patrick Fic
2021-07-14 15:48:27 -07:00
parent a8ad65000d
commit 5385e6918b
2 changed files with 14 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
import { LoadingOutlined } from "@ant-design/icons";
import { useLazyQuery } from "@apollo/client";
import { Empty, Select } from "antd";
import { Empty, Select, Space, Tag } from "antd";
import _ from "lodash";
import React, { forwardRef, useEffect } from "react";
import { useTranslation } from "react-i18next";
@@ -80,13 +80,18 @@ const JobSearchSelect = (
{theOptions
? theOptions.map((o) => (
<Option key={o.id} value={o.id} status={o.status}>
{`${clm_no && o.clm_no ? `${o.clm_no} | ` : ""}${
o.ro_number || t("general.labels.na")
} | ${o.ownr_ln || ""} ${o.ownr_fn || ""} ${
o.ownr_co_nm ? ` ${o.ownr_co_num}` : ""
}| ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${
o.v_model_desc || ""
}`}
<Space>
<span>
{`${clm_no && o.clm_no ? `${o.clm_no} | ` : ""}${
o.ro_number || t("general.labels.na")
} | ${o.ownr_ln || ""} ${o.ownr_fn || ""} ${
o.ownr_co_nm ? ` ${o.ownr_co_num}` : ""
}| ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${
o.v_model_desc || ""
}`}
</span>
<Tag>{o.status}</Tag>
</Space>
</Option>
))
: null}

View File

@@ -1043,6 +1043,7 @@ export const SEARCH_JOBS_FOR_AUTOCOMPLETE = gql`
v_make_desc
v_model_desc
v_model_yr
status
}
}
`;