Modified job search select to include additoinal filters IO-417

This commit is contained in:
Patrick Fic
2020-12-07 14:25:50 -08:00
parent d44db5662d
commit 3506f61711
5 changed files with 45 additions and 19 deletions

View File

@@ -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 },