BOD-11 BOD-12 BOD-10 WIP Guided manual estimate creation.

This commit is contained in:
Patrick Fic
2020-03-23 09:24:09 -07:00
parent 7889ee61ae
commit c55f5ebafc
17 changed files with 769 additions and 133 deletions

View File

@@ -9,14 +9,14 @@ export default function JobsCreateOwnerContainer() {
const [state] = useContext(JobCreateContext);
const { loading, error, data } = useQuery(QUERY_SEARCH_OWNER_BY_IDX, {
variables: { search: `%${state.owner.search}%` },
skip: !state.vehicle.search
skip: !state.owner.search
});
if (error) return <AlertComponent message={error.message} type='error' />;
if (error) return <AlertComponent message={error.message} type="error" />;
return (
<JobsCreateOwnerInfoComponent
loading={loading}
owners={data ? data.owners : null}
owners={data ? data.search_owner : null}
/>
);
}