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(
|
const BSOtherServiceClaim = lazy(
|
||||||
() => import('../../UtillComponents/BSOtherServiceClaim.jsx')
|
() => import('../../UtillComponents/BSOtherServiceClaim.jsx')
|
||||||
);
|
);
|
||||||
const OtherServiceMobilePrint = lazy(
|
import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx';
|
||||||
() => import('../../BookingFunctionality/OtherServiceMobilePrint.jsx')
|
|
||||||
);
|
|
||||||
const OtherServicePrintStyle1 = lazy(
|
const OtherServicePrintStyle1 = lazy(
|
||||||
() =>
|
() =>
|
||||||
import('../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx')
|
import('../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx')
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,7 @@ import {
|
||||||
import { shallowEqual, useSelector } from 'react-redux';
|
import { shallowEqual, useSelector } from 'react-redux';
|
||||||
import { Global_OverallOfferAmount } from '../../../../../Features/Offer/Offer';
|
import { Global_OverallOfferAmount } from '../../../../../Features/Offer/Offer';
|
||||||
import {
|
import {
|
||||||
|
getPrinterMappingDetails,
|
||||||
getTemplateData,
|
getTemplateData,
|
||||||
GlobalprintDatas,
|
GlobalprintDatas,
|
||||||
GlobalPrinterMappingDtls,
|
GlobalPrinterMappingDtls,
|
||||||
|
|
@ -524,6 +525,36 @@ const StandardTablePayment = () => {
|
||||||
}, 0)
|
}, 0)
|
||||||
);
|
);
|
||||||
}, [GlobalExtraCharge]);
|
}, [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(() => {
|
useEffect(() => {
|
||||||
if (salesBillEdit) {
|
if (salesBillEdit) {
|
||||||
|
|
|
||||||
|
|
@ -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