Parcourir la source

Finished bug 1928

bugfix/1928
Djordje Mitrovic il y a 3 ans
Parent
révision
e16a9415fe

+ 1
- 1
src/AppRoutes.js Voir le fichier

<Route exact path={BASE_PAGE} component={HomePage} /> <Route exact path={BASE_PAGE} component={HomePage} />
<AuthRoute exact path={LOGIN_PAGE} component={LoginPage} /> <AuthRoute exact path={LOGIN_PAGE} component={LoginPage} />
<AuthRoute exact path={ADMIN_LOGIN_PAGE} component={AdminLoginPage} /> <AuthRoute exact path={ADMIN_LOGIN_PAGE} component={AdminLoginPage} />
<AuthRoute path={REGISTER_PAGE} component={Register} />
<AuthRoute exact path={REGISTER_PAGE} component={Register} />
<AuthRoute path={FORGOT_PASSWORD_MAIL_SENT} component={MailSent} /> <AuthRoute path={FORGOT_PASSWORD_MAIL_SENT} component={MailSent} />
<AuthRoute path={FORGOT_PASSWORD_PAGE} component={ForgotPasswordPage} /> <AuthRoute path={FORGOT_PASSWORD_PAGE} component={ForgotPasswordPage} />
<AuthRoute path={RESET_PASSWORD_PAGE} component={ResetPasswordPage} /> <AuthRoute path={RESET_PASSWORD_PAGE} component={ResetPasswordPage} />

+ 4
- 4
src/pages/RegisterPages/Register/Register.js Voir le fichier

if (currentStep !== 3) { if (currentStep !== 3) {
setCurrentStep((prevState) => prevState + 1); setCurrentStep((prevState) => prevState + 1);
} else { } else {
if (!informations.image) {
setImageError(true);
} else {
// if (!informations.image) {
// setImageError(true);
// } else {
registerUser({ ...informations, ...values }); registerUser({ ...informations, ...values });
}
// }
} }
setInformations({ ...informations, ...values }); setInformations({ ...informations, ...values });
}; };

+ 3
- 1
src/store/saga/registerSaga.js Voir le fichier

const requestBody = new FormData(); const requestBody = new FormData();
requestBody.append("email", payload.values.mail); requestBody.append("email", payload.values.mail);
requestBody.append("password", payload.values.registerPassword); requestBody.append("password", payload.values.registerPassword);
requestBody.append("file", payload.values.image);
if (payload.values.image) {
requestBody.append("file", payload.values.image);
}
requestBody.append("company[name]", payload.values.nameOfFirm); requestBody.append("company[name]", payload.values.nameOfFirm);
requestBody.append("company[PIB]", payload.values.PIB); requestBody.append("company[PIB]", payload.values.PIB);
if (payload.values.phoneNumber.toString().length !== 0) if (payload.values.phoneNumber.toString().length !== 0)

Chargement…
Annuler
Enregistrer