diff --git a/src/common/pages/Otp/index.js b/src/common/pages/Otp/index.js index b159bbc..f29a073 100644 --- a/src/common/pages/Otp/index.js +++ b/src/common/pages/Otp/index.js @@ -95,7 +95,7 @@ class OtpPage extends React.Component{ let data = { code : this.state.otpText, login_request_id : this.state.otpData.login_request_id - } + }; console.log("data",data); this.setState({isLoading:true}); // if(this.checkIsExpired){ @@ -105,19 +105,19 @@ class OtpPage extends React.Component{ // },2000); // } // else{ - this.authStore.validateOtp(data).then(res=>{ - setTimeout(()=>{ - this.props.history.push(LINKS.DASHBOARD); - this.setState({isLoading:false}); - },1000); - }).catch(err=>{ - setTimeout(()=>{ - this.setState({isLoading:false,isOtpWrong:true}); - },2000); - setTimeout(()=>{ - this.setState({isOtpWrong:false}); - },4000) - }); + // this.authStore.validateOtp(data).then(res=>{ + // setTimeout(()=>{ + // this.props.history.push(LINKS.DASHBOARD); + // this.setState({isLoading:false}); + // },1000); + // }).catch(err=>{ + // setTimeout(()=>{ + // this.setState({isLoading:false,isOtpWrong:true}); + // },2000); + // setTimeout(()=>{ + // this.setState({isOtpWrong:false}); + // },4000) + // }); // } }; @@ -133,7 +133,7 @@ class OtpPage extends React.Component{ ContentProps={{ 'aria-describedby': 'message-id', }} - message={Wrong OTP code} + message={Kode OTP Salah} /> Your OTP code has expired} + message={Kode OTP sudah tidak berlaku} /> OTP Code Re-sended} + message={Kode OTP sudah di kirim ulang} /> @@ -162,37 +162,48 @@ class OtpPage extends React.Component{ - Input Your OTP Code - - - Still not received OTP Code? this.resendCode()}>Resend Code + Masukkan Kode OTP Anda + {/**/} + {/*Still not received OTP Code? this.resendCode()}>Resend Code*/} + {/**/} {[0, 1, 2, 3, 4, 5].map(x => ( - { + { + if (event.keyCode === 8 && x > 0 && event.target.value.length === 0) { + this.otp[x-1].focus(); + } + }} + onChange={event => { + // console.log(event); + if (event.target.value !== '') { + this.setState({otpText:this.state.otpText+event.target.value}, () => { + if (x < 5) { + this.otp[x+1].focus(); + } else { + this.login(); + } + }); + } else { + const otpText = this.state.otpText.split(""); + otpText[x] = ""; + this.setState({otpText:otpText.join("")}); + } - if (event.target.value !== '') { - this.setState({otpText:this.state.otpText+event.target.value}, () => { - if (x < 5) { - this.otp[x+1].focus(); - } else { - this.login(); - } - }); - } else { - const otpText = this.state.otpText.split(""); - otpText[x] = ""; - this.setState({otpText:otpText.join("")}); - } - - }} autoFocus={x === 0} ref={(input) => { this.otp[x] = input; }} key={x} id={x} inputStyle={{textAlign:'center'}} style={{width:'100%'}} type="tel" maxLength="1"/> + }} + autoFocus={x === 0} + ref={(input) => { this.otp[x] = input; }} + key={x} + id={x} + inputStyle={{textAlign:'center'}} style={{width:'100%'}} type="tel" maxLength="1"/> ))}
diff --git a/src/common/pages/RegisterCompleted/index.js b/src/common/pages/RegisterCompleted/index.js index fc778ba..c9e5a13 100644 --- a/src/common/pages/RegisterCompleted/index.js +++ b/src/common/pages/RegisterCompleted/index.js @@ -75,31 +75,32 @@ export default class RegisterCompletedComponent extends React.Component{ - Welcome to BTN Points + Selamat Datang di BTN Point - Sign in to get various voucher and items + Daftar untuk mendapatkan berbagai macam manfaat dan keuntungan - Registration Completed + Pendaftaran Berhasil - We have sent an email with a confirmation link to your email address. Please allow 5-10 minutes for this message to arrive. + Kami telah mengirim sebuah surat elektronik yang berisi tautan untuk konfirmasi pendaftaran ke email anda, harap menunggu 5 sampai 10 menit untuk surat sampai + {/*We have sent an email with a confirmation link to your email address. Please allow 5-10 minutes for this message to arrive.*/} -
+ {/*
*/} - - - -
+ {/**/} + {/**/} + {/**/} + {/*
*/}
diff --git a/src/common/pages/RegisterNew/index.js b/src/common/pages/RegisterNew/index.js index 8239927..8607c8a 100644 --- a/src/common/pages/RegisterNew/index.js +++ b/src/common/pages/RegisterNew/index.js @@ -300,10 +300,10 @@ class RegisterPage extends React.Component { - Redeem point, Get Your Item! + Tukarkan point! - Get promo and benefits with BTN + Dapatkan promo dan keuntungan dengan BTN