Changed RO Search Select to use RO searching and possible provided job value for options IMEX-129 IMEX-327
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user