- Merge Test-AIO

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-04-08 20:25:08 -04:00
11 changed files with 66 additions and 45 deletions

View File

@@ -1,5 +1,6 @@
import {useLazyQuery} from "@apollo/client";
import {Select, Space, Spin, Tag} from "antd";
import { LoadingOutlined } from "@ant-design/icons";
import { useLazyQuery } from "@apollo/client";
import { Select, Space, Spin, Tag } from "antd";
import _ from "lodash";
import React, {forwardRef, useEffect, useState} from "react";
import {useTranslation} from "react-i18next";
@@ -8,8 +9,7 @@ import {
SEARCH_JOBS_FOR_AUTOCOMPLETE
} from "../../graphql/jobs.queries";
import AlertComponent from "../alert/alert.component";
import {OwnerNameDisplayFunction} from "../owner-name-display/owner-name-display.component";
import {LoadingOutlined} from "@ant-design/icons";
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
const {Option} = Select;
@@ -28,9 +28,14 @@ const JobSearchSelect = (
const [theOptions, setTheOptions] = useState([]);
const [callSearch, {loading, error, data}] = useLazyQuery(SEARCH_JOBS_FOR_AUTOCOMPLETE, {});
const [callIdSearch, {loading: idLoading, error: idError, data: idData}] = useLazyQuery(
SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE
);
const [
callIdSearch,
{
//loading: idLoading,
error: idError,
data: idData
}
] = useLazyQuery(SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE);
const executeSearch = (v) => {
if (v && v.variables?.search !== "" && v.variables.search.length >= 2) callSearch(v);
@@ -95,9 +100,9 @@ const JobSearchSelect = (
<span>
{`${clm_no && o.clm_no ? `${o.clm_no} | ` : ""}${
o.ro_number || t("general.labels.na")
} | ${OwnerNameDisplayFunction(o)} | ${
o.v_model_yr || ""
} ${o.v_make_desc || ""} ${o.v_model_desc || ""}`}
} | ${OwnerNameDisplayFunction(o)} | ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${
o.v_model_desc || ""
}`}
</span>
<Tag>
<strong>{o.status}</strong>