瀏覽代碼

Finished bug 1928

bugfix/1928
Djordje Mitrovic 3 年之前
父節點
當前提交
e16a9415fe
共有 3 個檔案被更改,包括 8 行新增6 行删除
  1. 1
    1
      src/AppRoutes.js
  2. 4
    4
      src/pages/RegisterPages/Register/Register.js
  3. 3
    1
      src/store/saga/registerSaga.js

+ 1
- 1
src/AppRoutes.js 查看文件

@@ -51,7 +51,7 @@ const AppRoutes = () => {
<Route exact path={BASE_PAGE} component={HomePage} />
<AuthRoute exact path={LOGIN_PAGE} component={LoginPage} />
<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_PAGE} component={ForgotPasswordPage} />
<AuthRoute path={RESET_PASSWORD_PAGE} component={ResetPasswordPage} />

+ 4
- 4
src/pages/RegisterPages/Register/Register.js 查看文件

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

+ 3
- 1
src/store/saga/registerSaga.js 查看文件

@@ -24,7 +24,9 @@ function* fetchRegisterUser({ payload }) {
const requestBody = new FormData();
requestBody.append("email", payload.values.mail);
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[PIB]", payload.values.PIB);
if (payload.values.phoneNumber.toString().length !== 0)

Loading…
取消
儲存