countermapping master access issue

This commit is contained in:
karthikalakshmi 2026-03-06 19:11:55 +05:30
parent 7e8ef0ddfb
commit d65e6a842c
2 changed files with 20 additions and 2 deletions

View File

@ -37,6 +37,7 @@ const CustomerMobileNumberModal = ({ open, HandleCloseModal }) => {
const [messageType, setMessageType] = useState(null);
const [messageData, setMessageData] = useState(null);
const [canResend, setCanResend] = useState(true);
const [resendTimer, setResendTimer] = useState(0)
const [otpInput, setOtpInput] = useState(['', '', '', '']);
const [otpIndex, setOtpIndex] = useState(0);
const [otpSent, setOtpSent] = useState(false);
@ -211,7 +212,10 @@ const CustomerMobileNumberModal = ({ open, HandleCloseModal }) => {
let response = await dispatch(
sendupiotp({
MobileNo: number,
CreatedBy: 0,
CreatedBy: SessionData.UserId,
AppId: SessionData.AppId,
CompId: SessionData.CompId,
BranchId: SessionData.BranchId,
})
)?.unwrap();
if (response?.data?.statusCode == 1) {
@ -224,6 +228,20 @@ const CustomerMobileNumberModal = ({ open, HandleCloseModal }) => {
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 enteredOtp = otpInput.join('');

View File

@ -239,7 +239,7 @@ const CounterCategoryMappingForm = () => {
};
let response = await dispatch(getEmpAccess(data)).unwrap();
let datas = response?.data?.data?.[0]?.EmpAccessDetails?.filter(
(item) => item.ConfigName === 'Counter Category Mapping'
(item) => item.ConfigName === 'Counter Mapping'
);
setEmpData(datas?.[0]);
};