countermapping master access issue
This commit is contained in:
parent
7e8ef0ddfb
commit
d65e6a842c
|
|
@ -37,6 +37,7 @@ const CustomerMobileNumberModal = ({ open, HandleCloseModal }) => {
|
||||||
const [messageType, setMessageType] = useState(null);
|
const [messageType, setMessageType] = useState(null);
|
||||||
const [messageData, setMessageData] = useState(null);
|
const [messageData, setMessageData] = useState(null);
|
||||||
const [canResend, setCanResend] = useState(true);
|
const [canResend, setCanResend] = useState(true);
|
||||||
|
const [resendTimer, setResendTimer] = useState(0)
|
||||||
const [otpInput, setOtpInput] = useState(['', '', '', '']);
|
const [otpInput, setOtpInput] = useState(['', '', '', '']);
|
||||||
const [otpIndex, setOtpIndex] = useState(0);
|
const [otpIndex, setOtpIndex] = useState(0);
|
||||||
const [otpSent, setOtpSent] = useState(false);
|
const [otpSent, setOtpSent] = useState(false);
|
||||||
|
|
@ -211,7 +212,10 @@ const CustomerMobileNumberModal = ({ open, HandleCloseModal }) => {
|
||||||
let response = await dispatch(
|
let response = await dispatch(
|
||||||
sendupiotp({
|
sendupiotp({
|
||||||
MobileNo: number,
|
MobileNo: number,
|
||||||
CreatedBy: 0,
|
CreatedBy: SessionData.UserId,
|
||||||
|
AppId: SessionData.AppId,
|
||||||
|
CompId: SessionData.CompId,
|
||||||
|
BranchId: SessionData.BranchId,
|
||||||
})
|
})
|
||||||
)?.unwrap();
|
)?.unwrap();
|
||||||
if (response?.data?.statusCode == 1) {
|
if (response?.data?.statusCode == 1) {
|
||||||
|
|
@ -224,6 +228,20 @@ const CustomerMobileNumberModal = ({ open, HandleCloseModal }) => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const startResendTimer = () => {
|
||||||
|
setCanResend(false);
|
||||||
|
setResendTimer(30);
|
||||||
|
const timer = setInterval(() => {
|
||||||
|
setResendTimer((prev) => {
|
||||||
|
if (prev <= 1) {
|
||||||
|
clearInterval(timer);
|
||||||
|
setCanResend(true);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return prev - 1;
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
const verifyOtp = () => {
|
const verifyOtp = () => {
|
||||||
const enteredOtp = otpInput.join('');
|
const enteredOtp = otpInput.join('');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -239,7 +239,7 @@ const CounterCategoryMappingForm = () => {
|
||||||
};
|
};
|
||||||
let response = await dispatch(getEmpAccess(data)).unwrap();
|
let response = await dispatch(getEmpAccess(data)).unwrap();
|
||||||
let datas = response?.data?.data?.[0]?.EmpAccessDetails?.filter(
|
let datas = response?.data?.data?.[0]?.EmpAccessDetails?.filter(
|
||||||
(item) => item.ConfigName === 'Counter Category Mapping'
|
(item) => item.ConfigName === 'Counter Mapping'
|
||||||
);
|
);
|
||||||
setEmpData(datas?.[0]);
|
setEmpData(datas?.[0]);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue