diff --git a/client/src/pages/jobs-create/jobs-create.component.jsx b/client/src/pages/jobs-create/jobs-create.component.jsx index d760aa0cc..7d48d035a 100644 --- a/client/src/pages/jobs-create/jobs-create.component.jsx +++ b/client/src/pages/jobs-create/jobs-create.component.jsx @@ -10,14 +10,12 @@ import JobsCreateOwnerInfoContainer from "../../components/jobs-create-owner-inf import JobsCreateVehicleInfoContainer from "../../components/jobs-create-vehicle-info/jobs-create-vehicle-info.container"; import JobCreateContext from "../../pages/jobs-create/jobs-create.context"; -export default function JobsCreateComponent({ form }) { +export default function JobsCreateComponent({ form, isSubmitting }) { const [pageIndex, setPageIndex] = useState(0); - const [errorMessage, setErrorMessage] = useState(null); - const [state] = useContext(JobCreateContext); - const { t } = useTranslation(); + const steps = [ { title: t("jobs.labels.create.vehicleinfo"), @@ -42,11 +40,9 @@ export default function JobsCreateComponent({ form }) { const next = () => { setPageIndex(pageIndex + 1); - console.log("Next"); }; const prev = () => { setPageIndex(pageIndex - 1); - console.log("Previous"); }; const ProgressButtons = ({ top }) => { @@ -79,17 +75,19 @@ export default function JobsCreateComponent({ form }) { {pageIndex === steps.length - 1 && ( )} @@ -146,13 +144,11 @@ export default function JobsCreateComponent({ form }) { ) : (
- {errorMessage ? (
) : null} - {steps.map((item, idx) => (
{ notification.error({ title: t("jobs.errors.creating", { error: error }) }); setState({ ...state, error: error }); + setIsSubmitting(false); }); }; const handleFinish = (values) => { + setIsSubmitting(true); let job = Object.assign( {}, values, @@ -297,7 +301,7 @@ function JobsCreateContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, curr }) }} > - + diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 667056efd..6d411dd94 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1296,6 +1296,7 @@ "delete": "Delete", "deleteall": "Delete All", "deselectall": "Deselect All", + "done": "Done", "download": "Download", "edit": "Edit", "gotoadmin": "Go to Admin Panel", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 3745e662c..cf7703e1f 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1296,6 +1296,7 @@ "delete": "Borrar", "deleteall": "", "deselectall": "", + "done": "", "download": "", "edit": "Editar", "gotoadmin": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 36c858bc3..c2e30e653 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1296,6 +1296,7 @@ "delete": "Effacer", "deleteall": "", "deselectall": "", + "done": "", "download": "", "edit": "modifier", "gotoadmin": "",