FIX #258 Printer mapping issue solving
This commit is contained in:
parent
47a75e8843
commit
7e8ef0ddfb
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue