diff --git a/src/Features/BookingScreen/Customer/addCustomer.js b/src/Features/BookingScreen/Customer/addCustomer.js index de7c3fd..eff9b67 100644 --- a/src/Features/BookingScreen/Customer/addCustomer.js +++ b/src/Features/BookingScreen/Customer/addCustomer.js @@ -103,6 +103,18 @@ export const ReprintDetails = createAsyncThunk( } ); +export const VerifiedPaymentDtl = createAsyncThunk( + "addCustomer/ReprintDetails", + async (data) => { + const { AppId, CompId, BranchId, OrderId } = data || {}; + if (OrderId) { + return await axiosRetailInstanceData.get( + `/reprint?CompId=${CompId}&BranchId=${BranchId}&AppId=${AppId}&OrderId=${OrderId}` + ); + } + + } +); const initialState = { diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BST1Payment.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BST1Payment.jsx index 484ff5f..adb7a6b 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BST1Payment.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BST1Payment.jsx @@ -138,8 +138,8 @@ import { getAddCustomerDetails, getDefaultPaymentOptions, GlobalAddCustomerDetails, - ReprintDetails, triggerCustomerRefresh, + VerifiedPaymentDtl, } from '../../../../../Features/BookingScreen/Customer/addCustomer'; import PozoHoldIcon from '../../UtillComponents/Pozo retail icons/PozoHoldIcon'; import PozoDineInIcon from '../../UtillComponents/Pozo retail icons/PozoDineIn.jsx'; @@ -421,6 +421,7 @@ export default function BST1Payment() { const [empData, setEmpData] = useState(); const [addnewAccess, setaddnewAccess] = useState(true); const tableOptions = templateData?.BookingBilling?.[1]; + const NavBarOptions = templateData?.BookingNavbar?.[1]; const paymentInput = paybtns?.filter( (item) => item?.ModeName?.toLowerCase() === 'cash' )?.[0]?.ModeId; @@ -649,7 +650,7 @@ export default function BST1Payment() { //mohan stoped data useEffect(() => { if (CompId && BranchId && AppId) { - if (holdCheckedSalesSetup) { + if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) { getHolddata(); } // getUnpaiddatas(); @@ -837,7 +838,7 @@ export default function BST1Payment() { OrderId: businessUPIOrderId, }; - const res = await dispatch(ReprintDetails(data)).unwrap(); + const res = await dispatch(VerifiedPaymentDtl(data)).unwrap(); if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) { const orderData = [{ OrderDetails: res.data.data }]; @@ -1846,7 +1847,7 @@ export default function BST1Payment() { setUpinotSelected(false); setCurrentOrderNetAmount(0); setPreviousNetAmount(0); - if (holdCheckedSalesSetup) { + if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) { getHolddata(); } if (defaultBookingType === 'Both') { diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BSBillingTable2.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BSBillingTable2.jsx index f3bc8e0..b8ff8df 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BSBillingTable2.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BSBillingTable2.jsx @@ -157,8 +157,8 @@ import { getAddCustomerDetails, getDefaultPaymentOptions, GlobalAddCustomerDetails, - ReprintDetails, triggerCustomerRefresh, + VerifiedPaymentDtl, } from '../../../../../Features/BookingScreen/Customer/addCustomer.js'; import TooltipWrapper from '../../../../../Components/Tooltip/Tooltip'; import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTable2/BSBIllingTable2.scss'; @@ -389,6 +389,7 @@ const BSBillingTable2 = () => { const [addcustomer, setAddCustomer] = useState(false); const [paybtns, setpaybtns] = useState([]); const tableOptions = templateData?.BookingBilling?.[1]; + const NavBarOptions = templateData?.BookingNavbar?.[1]; const [paybtnselected, setPaybtnselected] = useState(); const [Paybtnnameselected, setPaybtnnameselected] = useState(); const defaultPaymentTrigger = useSelector(GlobalPaymentTrigger); @@ -733,7 +734,7 @@ const BSBillingTable2 = () => { }, []); useEffect(() => { if (CompId && BranchId && AppId) { - if (holdCheckedSalesSetup) { + if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) { getHolddata(); } @@ -1292,7 +1293,7 @@ const BSBillingTable2 = () => { OrderId: businessUPIOrderId, }; - const res = await dispatch(ReprintDetails(data)).unwrap(); + const res = await dispatch(VerifiedPaymentDtl(data)).unwrap(); if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) { const orderData = [{ OrderDetails: res.data.data }]; @@ -1927,7 +1928,7 @@ const BSBillingTable2 = () => { setCurrentOrderNetAmount(0); setPreviousNetAmount(0); - if (holdCheckedSalesSetup) { + if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) { getHolddata(); } if (defaultBookingType === 'Both') { diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3pay.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3pay.jsx index 5fff035..d8e3faf 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3pay.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3pay.jsx @@ -164,8 +164,8 @@ import { getAddCustomerDetails, getDefaultPaymentOptions, GlobalAddCustomerDetails, - ReprintDetails, triggerCustomerRefresh, + VerifiedPaymentDtl, } from '../../../../../Features/BookingScreen/Customer/addCustomer'; import PozoHoldIcon from '../../UtillComponents/Pozo retail icons/PozoHoldIcon'; import PozoUnpaidIcon from '../../UtillComponents/Pozo retail icons/PozoUnpaidIcon.jsx'; @@ -409,6 +409,8 @@ const BSBillingTable3Pay = () => { const [creditCustomerOpen, setcreditCustomerOpen] = useState(false); const tableOptions = BSLayoutData?.BookingBilling?.[1]; + const NavBarOptions = BSLayoutData?.BookingNavbar?.[1]; + // BookingNavbar const GlobEstBooking = useSelector(GlobalEstimateBooking); const GlobProdwisedata = useSelector(GlobalSelProdWiseEst); const GlobalUpiID = useSelector(GlobalUpiIDprint); @@ -715,7 +717,7 @@ const BSBillingTable3Pay = () => { OrderId: businessUPIOrderId, }; - const res = await dispatch(ReprintDetails(data)).unwrap(); + const res = await dispatch(VerifiedPaymentDtl(data)).unwrap(); if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) { const orderData = [{ OrderDetails: res.data.data }]; @@ -759,7 +761,7 @@ const BSBillingTable3Pay = () => { }; useEffect(() => { if (CompId && BranchId && AppId) { - if (holdCheckedSalesSetup) { + if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) { getHolddata(); } @@ -2022,7 +2024,7 @@ const BSBillingTable3Pay = () => { setCurrentOrderNetAmount(0); setPreviousNetAmount(0); setUpinotSelected(false); - if (holdCheckedSalesSetup) { + if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) { getHolddata(); } if (defaultBookingType === 'Both') { @@ -3594,8 +3596,9 @@ const BSBillingTable3Pay = () => { className={`BSBillingTable1-summeryTable ${responsiveBill ? 'open' : 'closed'}`} style={{ transition: 'max-height 0.3s ease-in-out', - overflow: 'scroll', + overflow: 'auto', maxHeight: responsiveBill ? '180px' : '0px', + scrollbarWidth: 'thin', }} > {Array.isArray(OrderCardDetail) && @@ -3919,13 +3922,13 @@ const BSBillingTable3Pay = () => { ) : ''} + {unpaidFlow == false ? item?.OptionName == 'Hold' && paybtns?.length > 0 && BookingType !== 'Dine In' && !BookingTypeBoth && Holddata?.length > 0 && - paybtns?.length > 0 && OrderCardDetail?.length == 0 && CheckBookingStatus != 'Close' && !addnewAccess && ( diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BSBillingTable5.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BSBillingTable5.jsx index f954d9d..b0beabb 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BSBillingTable5.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BSBillingTable5.jsx @@ -150,8 +150,8 @@ import { getAddCustomerDetails, getDefaultPaymentOptions, GlobalAddCustomerDetails, - ReprintDetails, triggerCustomerRefresh, + VerifiedPaymentDtl, } from '../../../../../Features/BookingScreen/Customer/addCustomer'; import BSCustomerSelect from '../../UtillComponents/BSSelectCustomer.jsx'; import PozoUnpaidIcon from '../../UtillComponents/Pozo retail icons/PozoUnpaidIcon.jsx'; @@ -356,6 +356,7 @@ const BSBillingTable5 = () => { (item) => item?.OptionName == 'Offer' ); const tableOptions = templateData?.BookingBilling?.[1]; + const NavBarOptions = templateData?.BookingNavbar?.[1]; const ReportholdData = useSelector(GlobalReorderHoldDetails); const Custdisable = useSelector(GlobalSelectedCustDisable); const GlobEstBooking = useSelector(GlobalEstimateBooking); @@ -759,7 +760,7 @@ const BSBillingTable5 = () => { useEffect(() => { if (CompId && BranchId && AppId) { - if (holdCheckedSalesSetup) { + if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) { getHolddata(); } getCustomerData(); @@ -1553,7 +1554,7 @@ const BSBillingTable5 = () => { OrderId: businessUPIOrderId, }; - const res = await dispatch(ReprintDetails(data)).unwrap(); + const res = await dispatch(VerifiedPaymentDtl(data)).unwrap(); if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) { const orderData = [{ OrderDetails: res.data.data }]; @@ -1945,7 +1946,7 @@ const BSBillingTable5 = () => { setUpinotSelected(false); setCurrentOrderNetAmount(0); setPreviousNetAmount(0); - if (holdCheckedSalesSetup) { + if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) { getHolddata(); } if (defaultBookingType === 'Both') { diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBilling7Payment.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBilling7Payment.jsx index 1762acc..e6836fc 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBilling7Payment.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBilling7Payment.jsx @@ -134,8 +134,8 @@ import { getAddCustomerDetails, getDefaultPaymentOptions, GlobalAddCustomerDetails, - ReprintDetails, triggerCustomerRefresh, + VerifiedPaymentDtl, } from '../../../../../Features/BookingScreen/Customer/addCustomer.js'; import { changeholddata, @@ -723,7 +723,7 @@ const BSBilling7Payment = () => { OrderId: businessUPIOrderId, }; - const res = await dispatch(ReprintDetails(data)).unwrap(); + const res = await dispatch(VerifiedPaymentDtl(data)).unwrap(); if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) { const orderData = [{ OrderDetails: res.data.data }]; diff --git a/src/Pages/BookingScreen/Components/BSCombo/BSC1NavBar.jsx b/src/Pages/BookingScreen/Components/BSCombo/BSC1NavBar.jsx index 1c387da..07510f4 100644 --- a/src/Pages/BookingScreen/Components/BSCombo/BSC1NavBar.jsx +++ b/src/Pages/BookingScreen/Components/BSCombo/BSC1NavBar.jsx @@ -354,7 +354,7 @@ const BSC1NavBar = () => { )} - {!isMobile && ( + {isMobile && (
diff --git a/src/Pages/BookingScreen/Components/BookingFunctionality/FeaturesFunctionalities.jsx b/src/Pages/BookingScreen/Components/BookingFunctionality/FeaturesFunctionalities.jsx index 5f47613..ff8c63f 100644 --- a/src/Pages/BookingScreen/Components/BookingFunctionality/FeaturesFunctionalities.jsx +++ b/src/Pages/BookingScreen/Components/BookingFunctionality/FeaturesFunctionalities.jsx @@ -1813,8 +1813,8 @@ const FeaturesFunctionalities = (props) => { setTabledata(holdingData?.data?.data); dispatch(changeholddata(holdingData?.data?.data)); } else { - // props.handleHoldCancel(); - props?.closeModal(); + props.handleHoldCancel(); + // props?.closeModal(); setHold(false); const dataValue = { CompId: CompId, BranchId: BranchId, AppId: AppId }; let responseValue = await dispatch(gettinghold(dataValue)).unwrap(); @@ -1941,8 +1941,8 @@ const FeaturesFunctionalities = (props) => { await dispatch(changeSelectedCustId(b?.CustSuppId)); await dispatch(ChangeTotalAmount(b?.ExtraChargeDetails)); setHold(false); - // props.handleHoldCancel(); - props?.closeModal(); + props.handleHoldCancel(); + // props?.closeModal(); }; const removeAll = async () => { @@ -1981,8 +1981,8 @@ const FeaturesFunctionalities = (props) => { setMessageType('success'); setMessageData(response?.data?.response); - // props.handleHoldCancel(); - props?.closeModal(); + props.handleHoldCancel(); + // props?.closeModal(); setHold(false); const dataValue = { CompId: CompId, BranchId: BranchId, AppId: AppId }; let responseValue = await dispatch(gettinghold(dataValue)).unwrap(); @@ -2605,7 +2605,7 @@ const FeaturesFunctionalities = (props) => { } - handleCancel={props.handleHoldCancel} + handleCancel={props?.handleHoldCancel} /> diff --git a/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx b/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx index 3228d6b..c516ec5 100644 --- a/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx +++ b/src/Pages/Kiosk/Payment/KioskPaymentWithModal.jsx @@ -78,7 +78,7 @@ import KioskBookingReceipt from '../../paymentpdfPage/KioskBookingReceipt.jsx'; import { getSalesDetails } from '../../../Features/PaymentGateway/PaymentGateway.js'; import { sendSms } from '../../../Features/Payment/PaymentDetails/PaymentDetails.js'; import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin.js'; -import { ReprintDetails } from '../../../Features/BookingScreen/Customer/addCustomer.js'; +import { VerifiedPaymentDtl } from '../../../Features/BookingScreen/Customer/addCustomer.js'; import PaymentGatewayEmbedded from '../../BookingScreen/Components/UtillComponents/PaymentGatewayEmbedded.jsx'; import MobileMultiPdfPrintTrigger from '../../BookingScreen/Components/UtillComponents/MobileMultiPdfPrintTrigger.jsx'; @@ -182,7 +182,7 @@ const KioskPayment = (props) => { OrderId: TransctionId, }; - const res = await dispatch(ReprintDetails(data)).unwrap(); + const res = await dispatch(VerifiedPaymentDtl(data)).unwrap(); if (res?.data?.statusCode === 1 && res?.data?.data?.length > 0) { const orderData = [{ OrderDetails: res.data.data }];