Merge pull request 'auto submit otp' (#211) from qty-limit-time-limit into main
Reviewed-on: Pozomind/pozo-retail-app#211
This commit is contained in:
commit
ece60a52e7
|
|
@ -203,6 +203,12 @@ const KioskPayment = (props) => {
|
|||
}
|
||||
}, [SessionData.CompId, SessionData.BranchId, SessionData.AppId]);
|
||||
|
||||
useEffect(() => {
|
||||
if (otpInput.every(input => input !== '')) {
|
||||
verifyOtp();
|
||||
}
|
||||
}, [otpInput]);
|
||||
|
||||
useEffect(() => {
|
||||
const getPrintData = async () => {
|
||||
try {
|
||||
|
|
@ -1922,6 +1928,8 @@ const KioskPayment = (props) => {
|
|||
} else {
|
||||
setMessageType('error');
|
||||
setMessageData('Invalid OTP');
|
||||
setOtpInput(['', '', '', '']);
|
||||
setOtpIndex(0);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -2185,13 +2193,13 @@ const KioskPayment = (props) => {
|
|||
|
||||
{/* Buttons */}
|
||||
<div className="otp-buttons">
|
||||
<button
|
||||
{/* <button
|
||||
className="verify-btn"
|
||||
disabled={otpInput.join('').length !== 4}
|
||||
onClick={verifyOtp}
|
||||
>
|
||||
Verify
|
||||
</button>
|
||||
</button> */}
|
||||
|
||||
<button
|
||||
className="resend-btn"
|
||||
|
|
|
|||
Loading…
Reference in New Issue