Resolve ESLint Warnings
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { LoadingOutlined } from "@ant-design/icons";
|
||||||
import { useLazyQuery } from "@apollo/client";
|
import { useLazyQuery } from "@apollo/client";
|
||||||
import { Select, Space, Spin, Tag } from "antd";
|
import { Select, Space, Spin, Tag } from "antd";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
@@ -6,8 +7,6 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE, SEARCH_JOBS_FOR_AUTOCOMPLETE } from "../../graphql/jobs.queries";
|
import { SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE, SEARCH_JOBS_FOR_AUTOCOMPLETE } from "../../graphql/jobs.queries";
|
||||||
import AlertComponent from "../alert/alert.component";
|
import AlertComponent from "../alert/alert.component";
|
||||||
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
|
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
|
||||||
import { SearchOutlined } from "@ant-design/icons";
|
|
||||||
import { LoadingOutlined } from "@ant-design/icons";
|
|
||||||
|
|
||||||
const { Option } = Select;
|
const { Option } = Select;
|
||||||
|
|
||||||
@@ -19,9 +18,14 @@ const JobSearchSelect = (
|
|||||||
const [theOptions, setTheOptions] = useState([]);
|
const [theOptions, setTheOptions] = useState([]);
|
||||||
const [callSearch, { loading, error, data }] = useLazyQuery(SEARCH_JOBS_FOR_AUTOCOMPLETE, {});
|
const [callSearch, { loading, error, data }] = useLazyQuery(SEARCH_JOBS_FOR_AUTOCOMPLETE, {});
|
||||||
|
|
||||||
const [callIdSearch, { loading: idLoading, error: idError, data: idData }] = useLazyQuery(
|
const [
|
||||||
SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE
|
callIdSearch,
|
||||||
);
|
{
|
||||||
|
//loading: idLoading,
|
||||||
|
error: idError,
|
||||||
|
data: idData
|
||||||
|
}
|
||||||
|
] = useLazyQuery(SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE);
|
||||||
|
|
||||||
const executeSearch = (v) => {
|
const executeSearch = (v) => {
|
||||||
if (v && v.variables?.search !== "" && v.variables.search.length >= 2) callSearch(v);
|
if (v && v.variables?.search !== "" && v.variables.search.length >= 2) callSearch(v);
|
||||||
@@ -86,9 +90,9 @@ const JobSearchSelect = (
|
|||||||
<span>
|
<span>
|
||||||
{`${clm_no && o.clm_no ? `${o.clm_no} | ` : ""}${
|
{`${clm_no && o.clm_no ? `${o.clm_no} | ` : ""}${
|
||||||
o.ro_number || t("general.labels.na")
|
o.ro_number || t("general.labels.na")
|
||||||
} | ${OwnerNameDisplayFunction(o)} | ${
|
} | ${OwnerNameDisplayFunction(o)} | ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${
|
||||||
o.v_model_yr || ""
|
o.v_model_desc || ""
|
||||||
} ${o.v_make_desc || ""} ${o.v_model_desc || ""}`}
|
}`}
|
||||||
</span>
|
</span>
|
||||||
<Tag>
|
<Tag>
|
||||||
<strong>{o.status}</strong>
|
<strong>{o.status}</strong>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { UPDATE_PAYMENT } from "../../graphql/payments.queries";
|
|||||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||||
import { selectPayment } from "../../redux/modals/modals.selectors";
|
import { selectPayment } from "../../redux/modals/modals.selectors";
|
||||||
import { selectCurrentUser } from "../../redux/user/user.selectors";
|
import { selectCurrentUser } from "../../redux/user/user.selectors";
|
||||||
import { selectPayment } from "../../redux/modals/modals.selectors";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
currentUser: selectCurrentUser,
|
currentUser: selectCurrentUser,
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ function PaymentModalContainer({paymentModal, toggleModalVisible, bodyshop }) {
|
|||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { context, actions, open } = paymentModal;
|
const { context, actions, open } = paymentModal;
|
||||||
const smartRefetch = context?.smartRefetch || false;
|
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
||||||
const handleFinish = async (values) => {
|
const handleFinish = async (values) => {
|
||||||
|
|||||||
@@ -7,15 +7,11 @@ import { createStructuredSelector } from "reselect";
|
|||||||
import { UPDATE_PAYMENT } from "../../graphql/payments.queries";
|
import { UPDATE_PAYMENT } from "../../graphql/payments.queries";
|
||||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||||
import { selectPayment } from "../../redux/modals/modals.selectors";
|
import { selectPayment } from "../../redux/modals/modals.selectors";
|
||||||
import { createStructuredSelector } from "reselect";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
paymentModal: selectPayment
|
paymentModal: selectPayment
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
|
||||||
paymentModal: selectPayment,
|
|
||||||
});
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
setPaymentContext: (context) => dispatch(setModalContext({ context: context, modal: "payment" }))
|
setPaymentContext: (context) => dispatch(setModalContext({ context: context, modal: "payment" }))
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user