diff --git a/client/src/components/job-create-iou/job-create-iou.component.jsx b/client/src/components/job-create-iou/job-create-iou.component.jsx index bc1b4bf2f..6fee70d89 100644 --- a/client/src/components/job-create-iou/job-create-iou.component.jsx +++ b/client/src/components/job-create-iou/job-create-iou.component.jsx @@ -9,17 +9,20 @@ import {createStructuredSelector} from "reselect"; import {UPDATE_JOB_LINES_IOU} from "../../graphql/jobs-lines.queries"; import {selectBodyshop, selectCurrentUser,} from "../../redux/user/user.selectors"; import {CreateIouForJob} from "../jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util"; +import {selectTechnician} from "../../redux/tech/tech.selectors"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, currentUser: selectCurrentUser, + technician: selectTechnician, }); + const mapDispatchToProps = (dispatch) => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(JobCreateIOU); -export function JobCreateIOU({bodyshop, currentUser, job, selectedJobLines}) { +export function JobCreateIOU({bodyshop, currentUser, job, selectedJobLines, technician}) { const {t} = useTranslation(); const [loading, setLoading] = useState(false); const client = useApolloClient(); @@ -79,13 +82,13 @@ export function JobCreateIOU({bodyshop, currentUser, job, selectedJobLines}) { title={t("jobs.labels.createiouwarning")} onConfirm={handleCreateIou} disabled={ - !selectedJobLines || selectedJobLines.length === 0 || !job.converted + !selectedJobLines || selectedJobLines.length === 0 || !job.converted || technician } >