Merge pull request 'March-3-deployment' (#260) from March-3-deployment into main
Reviewed-on: Pozomind/pozo-retail-app#260
This commit is contained in:
commit
7e068a8286
|
|
@ -251,9 +251,8 @@ const CustomerOrders = lazy(
|
|||
const BSOtherServiceClaim = lazy(
|
||||
() => import('../../UtillComponents/BSOtherServiceClaim.jsx')
|
||||
);
|
||||
const OtherServiceMobilePrint = lazy(
|
||||
() => import('../../BookingFunctionality/OtherServiceMobilePrint.jsx')
|
||||
);
|
||||
import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx';
|
||||
|
||||
const OtherServicePrintStyle1 = lazy(
|
||||
() =>
|
||||
import('../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx')
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ import {
|
|||
import { shallowEqual, useSelector } from 'react-redux';
|
||||
import { Global_OverallOfferAmount } from '../../../../../Features/Offer/Offer';
|
||||
import {
|
||||
getPrinterMappingDetails,
|
||||
getTemplateData,
|
||||
GlobalprintDatas,
|
||||
GlobalPrinterMappingDtls,
|
||||
|
|
@ -524,6 +525,36 @@ const StandardTablePayment = () => {
|
|||
}, 0)
|
||||
);
|
||||
}, [GlobalExtraCharge]);
|
||||
useEffect(() => {
|
||||
|
||||
const fetchPrinterMapping = async () => {
|
||||
try {
|
||||
if (UserType !== 'Super Admin' && isMobile && MobileA4Print) {
|
||||
const data = {
|
||||
CompId: CompId,
|
||||
BranchId: BranchId,
|
||||
AppId: AppId,
|
||||
UserId: UserId,
|
||||
};
|
||||
// && isMobile && MobileA4Print
|
||||
const response = await dispatch(getPrinterMappingDetails(data)).unwrap();
|
||||
if (response?.data?.statusCode === 0) {
|
||||
handlePrintMappingClick()
|
||||
}
|
||||
console.log(response, "printer mapping response");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error fetching printer mapping:", error);
|
||||
}
|
||||
};
|
||||
|
||||
fetchPrinterMapping();
|
||||
|
||||
}, []);
|
||||
const handlePrintMappingClick = () => {
|
||||
// setReprint1(true)
|
||||
window.dispatchEvent(new Event('CLICK PRINTER MAPPING'));
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (salesBillEdit) {
|
||||
|
|
|
|||
|
|
@ -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('');
|
||||
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue