diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBilling4Payment.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBilling4Payment.jsx index 08f3b9e..a7f4b57 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBilling4Payment.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBilling4Payment.jsx @@ -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') diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx index 7dc3e99..089846f 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.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) {