From d65e6a842c49ef722071b62bbe17c1ecccc4b4bd Mon Sep 17 00:00:00 2001 From: karthikalakshmi Date: Fri, 6 Mar 2026 19:11:55 +0530 Subject: [PATCH] countermapping master access issue --- .../BookingFunctionality/CustomerOTP.jsx | 20 ++++++++++++++++++- .../CounterCategoryMappingForm.jsx | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Pages/BookingScreen/Components/BookingFunctionality/CustomerOTP.jsx b/src/Pages/BookingScreen/Components/BookingFunctionality/CustomerOTP.jsx index c79b1e5..243abd4 100644 --- a/src/Pages/BookingScreen/Components/BookingFunctionality/CustomerOTP.jsx +++ b/src/Pages/BookingScreen/Components/BookingFunctionality/CustomerOTP.jsx @@ -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(''); diff --git a/src/Pages/CounterCategoryMapping/CounterCategoryMappingForm.jsx b/src/Pages/CounterCategoryMapping/CounterCategoryMappingForm.jsx index 1f34fbf..1b05945 100644 --- a/src/Pages/CounterCategoryMapping/CounterCategoryMappingForm.jsx +++ b/src/Pages/CounterCategoryMapping/CounterCategoryMappingForm.jsx @@ -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]); };