diff --git a/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx b/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx index d12760daa..49c2e0f61 100644 --- a/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx +++ b/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx @@ -64,7 +64,7 @@ export function JobChecklistForm({ [(type === "intake" && "intakechecklist") || (type === "deliver" && "deliverchecklist")]: { ...values, - formItems: formItems.map((fi) => { + form: formItems.map((fi) => { return { ...fi, value: values[fi.name], diff --git a/client/src/components/shop-info/shop-info.component.jsx b/client/src/components/shop-info/shop-info.component.jsx index 27ba83dc3..4c5218217 100644 --- a/client/src/components/shop-info/shop-info.component.jsx +++ b/client/src/components/shop-info/shop-info.component.jsx @@ -611,12 +611,6 @@ export default function ShopInfoComponent({ form, saveLoading }) { label={t("bodyshop.fields.md_ins_co.street1")} key={`${index}street1`} name={[field.name, "street1"]} - rules={[ - { - required: true, - message: t("general.validation.required"), - }, - ]} > @@ -633,12 +627,6 @@ export default function ShopInfoComponent({ form, saveLoading }) { label={t("bodyshop.fields.md_ins_co.city")} key={`${index}city`} name={[field.name, "city"]} - rules={[ - { - required: true, - message: t("general.validation.required"), - }, - ]} > @@ -647,12 +635,6 @@ export default function ShopInfoComponent({ form, saveLoading }) { label={t("bodyshop.fields.md_ins_co.state")} key={`${index}state`} name={[field.name, "state"]} - rules={[ - { - required: true, - message: t("general.validation.required"), - }, - ]} > @@ -661,12 +643,6 @@ export default function ShopInfoComponent({ form, saveLoading }) { label={t("bodyshop.fields.md_ins_co.zip")} key={`${index}zip`} name={[field.name, "zip"]} - rules={[ - { - required: true, - message: t("general.validation.required"), - }, - ]} > diff --git a/client/src/components/shop-info/shop-info.intake.component.jsx b/client/src/components/shop-info/shop-info.intake.component.jsx index ef38f181c..f43549819 100644 --- a/client/src/components/shop-info/shop-info.intake.component.jsx +++ b/client/src/components/shop-info/shop-info.intake.component.jsx @@ -40,7 +40,6 @@ export default function ShopInfoIntakeChecklistComponent({ form }) { > - - - - + + + + + + { remove(field.name); diff --git a/client/src/components/tech-login/tech-login.component.jsx b/client/src/components/tech-login/tech-login.component.jsx index 4d5854b4e..6aed768bb 100644 --- a/client/src/components/tech-login/tech-login.component.jsx +++ b/client/src/components/tech-login/tech-login.component.jsx @@ -36,39 +36,42 @@ export function TechLogin({ }; return ( -
+
{technician ? : null}
+ autoComplete="new-password" + > - + ]} + > + - + ]} + > + -
- {loginError ? : null} + {loginError ? : null}
); } diff --git a/client/src/index.js b/client/src/index.js index 6e7bbbc71..112d08d40 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -11,6 +11,7 @@ import "./index.css"; import { persistor, store } from "./redux/store"; //import * as serviceWorker from "./serviceWorker"; //This is registered in a separate component to track notifications. import "./translations/i18n"; +import "./utils/CleanAxios"; require("dotenv").config(); diff --git a/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx b/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx index 8f063577e..01306b1a1 100644 --- a/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx +++ b/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx @@ -1,5 +1,6 @@ import { useQuery } from "@apollo/client"; import { Col, Row, Typography } from "antd"; +import moment from "moment"; import React, { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -15,7 +16,6 @@ import { setSelectedHeader, } from "../../redux/application/application.actions"; import { selectBodyshop } from "../../redux/user/user.selectors"; -import moment from "moment"; const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser bodyshop: selectBodyshop, @@ -78,12 +78,12 @@ export function JobsChecklistViewContainer({ {t("jobs.labels.intakechecklist")} {data.jobs_by_pk.intakechecklist && - data.jobs_by_pk.intakechecklist.formItems && ( + data.jobs_by_pk.intakechecklist.form && ( <> {data.jobs_by_pk.deliverchecklist && - data.jobs_by_pk.deliverchecklist.formItems && ( + data.jobs_by_pk.deliverchecklist.form && ( <> { return { ...state, technician: null, + loginError: null, }; case TechActionTypes.TECH_LOGIN_START: return { diff --git a/client/src/redux/tech/tech.sagas.js b/client/src/redux/tech/tech.sagas.js index 0f4300526..0c748a7f5 100644 --- a/client/src/redux/tech/tech.sagas.js +++ b/client/src/redux/tech/tech.sagas.js @@ -1,6 +1,6 @@ import axios from "axios"; import { all, call, put, select, takeLatest } from "redux-saga/effects"; -import { auth, logImEXEvent } from "../../firebase/firebase.utils"; +import { logImEXEvent } from "../../firebase/firebase.utils"; import { selectBodyshop } from "../user/user.selectors"; import { techLoginFailure, techLoginSuccess } from "./tech.actions"; import TechActionTypes from "./tech.types"; @@ -13,20 +13,11 @@ export function* signInStart({ payload: { employeeid, pin } }) { logImEXEvent("redux_tech_sign_in"); const bodyshop = yield select(selectBodyshop); - const response = yield call( - axios.post, - "/tech/login", - { - shopid: bodyshop.id, - employeeid: employeeid, - pin: pin, - }, - { - headers: { - Authorization: `Bearer ${yield auth.currentUser.getIdToken()}`, - }, - } - ); + const response = yield call(axios.post, "/tech/login", { + shopid: bodyshop.id, + employeeid: employeeid, + pin: pin, + }); const { valid, technician, error } = response.data;