Changed RO Search Select to use RO searching and possible provided job value for options IMEX-129 IMEX-327

This commit is contained in:
Patrick Fic
2020-08-26 16:15:17 -07:00
parent 69f2b66e56
commit 721c938e8a
20 changed files with 193 additions and 109 deletions

View File

@@ -1,10 +1,8 @@
import { useQuery } from "@apollo/react-hooks";
import { Form } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { ACTIVE_JOBS_FOR_AUTOCOMPLETE } from "../../graphql/jobs.queries";
import { selectBodyshop } from "../../redux/user/user.selectors";
import JobSearchSelect from "../job-search-select/job-search-select.component";
import JobsDetailLaborContainer from "../jobs-detail-labor/jobs-detail-labor.container";
@@ -15,11 +13,6 @@ const mapStateToProps = createStructuredSelector({
export function TechClockInComponent({ form, bodyshop }) {
const { t } = useTranslation();
const { loading, data } = useQuery(ACTIVE_JOBS_FOR_AUTOCOMPLETE, {
variables: {
statuses: bodyshop.md_ro_statuses.open_statuses || ["Open"],
},
});
return (
<div>
@@ -33,7 +26,7 @@ export function TechClockInComponent({ form, bodyshop }) {
},
]}
>
<JobSearchSelect loading={loading} options={data ? data.jobs : []} />
<JobSearchSelect />
</Form.Item>
<Form.Item