diff --git a/client/debug.log b/client/debug.log new file mode 100644 index 000000000..33e8a157e --- /dev/null +++ b/client/debug.log @@ -0,0 +1 @@ +[1207/095430.554:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3) diff --git a/client/src/components/bill-form/bill-form.component.jsx b/client/src/components/bill-form/bill-form.component.jsx index 1d76181af..86eae294f 100644 --- a/client/src/components/bill-form/bill-form.component.jsx +++ b/client/src/components/bill-form/bill-form.component.jsx @@ -78,6 +78,8 @@ export function BillFormComponent({ > { if (form.getFieldValue("jobid") !== null) { loadLines({ variables: { id: form.getFieldValue("jobid") } }); diff --git a/client/src/components/job-detail-cards/job-detail-cards.component.jsx b/client/src/components/job-detail-cards/job-detail-cards.component.jsx index 6a5fdee95..eabd90f2f 100644 --- a/client/src/components/job-detail-cards/job-detail-cards.component.jsx +++ b/client/src/components/job-detail-cards/job-detail-cards.component.jsx @@ -89,7 +89,12 @@ export function JobDetailCards({ setPrintCenterContext }) { {t("jobs.labels.inproduction")} , diff --git a/client/src/components/job-search-select/job-search-select.component.jsx b/client/src/components/job-search-select/job-search-select.component.jsx index 5fb0476bd..6d513713c 100644 --- a/client/src/components/job-search-select/job-search-select.component.jsx +++ b/client/src/components/job-search-select/job-search-select.component.jsx @@ -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 }, diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js index 027ba0f6a..0ebe57ccb 100644 --- a/client/src/graphql/jobs.queries.js +++ b/client/src/graphql/jobs.queries.js @@ -778,23 +778,20 @@ export const ACTIVE_JOBS_FOR_AUTOCOMPLETE = gql` `; export const SEARCH_JOBS_FOR_AUTOCOMPLETE = gql` - query SEARCH_JOBS_FOR_AUTOCOMPLETE($search: String) { - search_jobs( - args: { search: $search } - limit: 50 - order_by: { ro_number: desc_nulls_last } - ) { - id - ownr_fn - ownr_ln - ro_number - est_number - vehicleid - v_make_desc - v_model_desc - v_model_yr - } +query SEARCH_JOBS_FOR_AUTOCOMPLETE($search: String, $isConverted: Boolean, $notExported: Boolean) { + search_jobs(args: {search: $search}, limit: 50, order_by: {ro_number: desc_nulls_last}, where: {_and: {converted: {_eq: $isConverted}, date_exported: {_is_null: $notExported}}}) { + id + ownr_fn + ownr_ln + ro_number + est_number + vehicleid + v_make_desc + v_model_desc + v_model_yr } +} + `; export const SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE = gql` query SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE($id: uuid!) {