fix validasi otp

This commit is contained in:
Anang Yusman 2025-06-11 12:44:17 +08:00
parent dbc5a396e5
commit 75f8485dd9
1 changed files with 11 additions and 12 deletions

View File

@ -149,6 +149,7 @@ const LoginForm = () => {
console.log("PROFILE : ", profile?.data?.data);
if (
profile?.data?.data?.isInternational == true ||
profile?.data?.data?.isActive == false ||
profile?.data?.data?.isDelete == true
) {
@ -224,8 +225,6 @@ const LoginForm = () => {
Number(profile?.data?.data?.roleId) == 10 ||
Number(profile?.data?.data?.roleId) == 11 ||
Number(profile?.data?.data?.roleId) == 12 ||
Number(profile?.data?.data?.roleId) == 14 ||
Number(profile?.data?.data?.roleId) == 15 ||
Number(profile?.data?.data?.roleId) == 18 ||
Number(profile?.data?.data?.roleId) == 19
) {
@ -282,17 +281,17 @@ const LoginForm = () => {
return false;
}
const msg = response?.data?.message;
onSubmit(data);
// onSubmit(data);
// if (msg == "Continue to setup email") {
// setStep(2);
// } else if (msg == "Email is valid and OTP has been sent") {
// setStep(3);
// } else if (msg == "Username & password valid") {
// onSubmit(data);
// } else {
// error("Username / password incorrect");
// }
if (msg == "Continue to setup email") {
setStep(2);
} else if (msg == "Email is valid and OTP has been sent") {
setStep(3);
} else if (msg == "Username & password valid") {
onSubmit(data);
} else {
error("Username / password incorrect");
}
// else {
// setStep(1);
// }