diff --git a/src/App.jsx b/src/App.jsx index 66d1c59..51ee8e1 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -33,7 +33,7 @@ const isCapacitor = () => !!window.Capacitor?.isNativePlatform?.(); const HOME_PAGES = [ '/app-page/home', // android minimize '/apps/retail/app-page/home', - '/' // android minimize + '/', // android minimize ]; const LOGIN_PAGES = ['signin', 'login', 'auth']; @@ -92,13 +92,13 @@ const AppRoutes = () => { // 🟒 If session exists β†’ allow navigation if (SessionId) { - console.log("Browser back allowed"); + console.log('Browser back allowed'); return; } // πŸ”΄ Only redirect if user is on protected page - if (!LOGIN_PAGES.some(p => currentPath.includes(p))) { - console.log("Session missing β†’ redirecting login"); + if (!LOGIN_PAGES.some((p) => currentPath.includes(p))) { + console.log('Session missing β†’ redirecting login'); clearSession(); window.location.replace(`${commonSubDir}`); } @@ -108,7 +108,6 @@ const AppRoutes = () => { window.addEventListener('popstate', handlePopState); return () => window.removeEventListener('popstate', handlePopState); - }, [location.pathname]); // βœ… Android β€” Capacitor back button @@ -116,48 +115,48 @@ const AppRoutes = () => { if (!isCapacitor()) return; const handler = async () => { - try { - const currentPath = location.pathname + (location.search || ''); - console.log('πŸ”™ Back pressed:', currentPath); + try { + const currentPath = location.pathname + (location.search || ''); + console.log('πŸ”™ Back pressed:', currentPath); - const raw = sessionStorage.getItem('navStack'); - let stack = raw ? JSON.parse(raw) : []; + const raw = sessionStorage.getItem('navStack'); + let stack = raw ? JSON.parse(raw) : []; // Remove current path from stack if it's at the end - while (stack.length && stack[stack.length - 1] === currentPath) { - stack.pop(); - } + while (stack.length && stack[stack.length - 1] === currentPath) { + stack.pop(); + } // If there are pages in history, go back to previous page if (stack.length > 0) { - const previous = stack[stack.length - 1]; + const previous = stack[stack.length - 1]; sessionStorage.setItem('navStack', JSON.stringify(stack)); - isBackNav.current = true; + isBackNav.current = true; navigate(previous); console.log('Navigate to previous:', previous); - return; - } + return; + } // Stack is empty - check where we are // 🏠 Home page β†’ minimize if (HOME_PAGES?.some((p) => currentPath?.includes(p))) { - console.log("Home page & empty stack β†’ minimizing app"); + console.log('Home page & empty stack β†’ minimizing app'); await CapacitorApp.minimizeApp(); return; } // πŸšͺ Login page β†’ minimize if (LOGIN_PAGES?.some((p) => currentPath?.includes(p))) { - console.log("Login page & empty stack β†’ minimizing app"); + console.log('Login page & empty stack β†’ minimizing app'); await CapacitorApp.minimizeApp(); return; } // Anywhere else with empty stack β†’ go to home const home = '/app-page/home'; - sessionStorage.setItem('navStack', JSON.stringify([home])); - isBackNav.current = true; - navigate(home); + sessionStorage.setItem('navStack', JSON.stringify([home])); + isBackNav.current = true; + navigate(home); console.log('Empty stack, navigate to home'); } catch (e) { console.error('Back handler error:', e); diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3overall.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3overall.jsx index 9ad65fe..1506eb0 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3overall.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3overall.jsx @@ -69,7 +69,9 @@ const BSBillingTable3overall = () => { className={ templateData?.BookingLayout?.[0] === 'Layout6' ? 'BSTable3_overall BSTable3_overall-6' - : 'BSTable3_overall' + : templateData?.BookingLayout?.[0] === 'Layout1' && isMobile + ? 'BSTable3_overallLayout1 BSTable3_overall-1' + : 'BSTable3_overall' } style={{ height: containerHeight }} > diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBilling4Payment.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBilling4Payment.jsx index 6816ef7..184d891 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBilling4Payment.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBilling4Payment.jsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState, useRef, lazy, Suspense } from 'react'; +import React, { useEffect, useState, useRef, lazy } from 'react'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { useNavigate } from 'react-router-dom'; import moment from 'moment'; @@ -3645,8 +3645,7 @@ const BSBilling4Payment = () => { ); }; - return ( - Loading ...}> + return (
@@ -4985,7 +4984,7 @@ const BSBilling4Payment = () => { /> )}
- + ); }; export default BSBilling4Payment; diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable6/BST6Payment.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable6/BST6Payment.jsx index 1420f4c..bcd6884 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable6/BST6Payment.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable6/BST6Payment.jsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState, useRef, lazy, Suspense } from 'react'; +import React, { useEffect, useState, useRef, lazy } from 'react'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { useNavigate } from 'react-router-dom'; import moment from 'moment'; @@ -3511,8 +3511,7 @@ const BST6Payment = () => { (arr) => Array.isArray(arr) && arr.some((err) => err) ); }; - return ( - Suspense Loading...
}> + return ( <> {(addcustomer || hold) && ( { />
-
+ ); }; diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx index af36731..afcc3aa 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx @@ -526,36 +526,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(); - - }, []); + 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')); - }; + // setReprint1(true) + window.dispatchEvent(new Event('CLICK PRINTER MAPPING')); + }; useEffect(() => { if (salesBillEdit) { @@ -1452,15 +1452,15 @@ useEffect(() => { OrderStatus: 'O', OrderType: BookingType === 'Dine In' || - BookingTypeBoth || - Estimation?.SettingValue == 'N' + BookingTypeBoth || + Estimation?.SettingValue == 'N' ? 'S' : GlobEstBooking === 'OvrAllEst' ? 'E' : GlobEstBooking === 'ParEst' ? GlobProdwisedata?.includes( - a.InwardDtlId + ' ' + a?.BookingTypeName - ) + a.InwardDtlId + ' ' + a?.BookingTypeName + ) ? 'E' : 'S' : 'S', @@ -1559,7 +1559,7 @@ useEffect(() => { : Paybtnnameselected?.toLowerCase() === 'credit' ? 'S' : Paybtnnameselected?.toLowerCase() === 'upi' && - SelectedUPIPayOption?.toLowerCase() === 'default' + SelectedUPIPayOption?.toLowerCase() === 'default' ? 'S' : 'P', OrderDtlDetails: @@ -1576,9 +1576,9 @@ useEffect(() => { ? globalTipAmount === 0 ? SelectedTableDetails : SelectedTableDetails?.map((item) => ({ - ...item, - TipsAmount: globalTipAmount, - })) + ...item, + TipsAmount: globalTipAmount, + })) : null, SalesPaymentType: 'normal', @@ -1594,8 +1594,8 @@ useEffect(() => { ? PaymentgatewayUPI?.[0]?.ModeId : SelectedUPIPayOption?.toLowerCase() === 'business' ? BusinessPayOption?.find( - (busupi) => busupi?.ModeId === UpiId - )?.ModeId + (busupi) => busupi?.ModeId === UpiId + )?.ModeId : paybtnselected : paybtnselected ? paybtnselected @@ -1608,15 +1608,15 @@ useEffect(() => { salesBillEdit && currentOrderNetAmount < previousNetAmount ? null : Paybtnnameselected?.toLowerCase() === 'upi' && - SelectedUPIPayOption?.toLowerCase() === 'business' + SelectedUPIPayOption?.toLowerCase() === 'business' ? BusinessPayOption?.find((busupi) => busupi?.ModeId === UpiId) - ?.MerchantId + ?.MerchantId : null, PaymentOptionType: salesBillEdit && - currentOrderNetAmount < previousNetAmount && - (refundPaySelectedName?.toLowerCase() === 'cash' || - refundPaySelectedName?.toLowerCase() === 'credit') + currentOrderNetAmount < previousNetAmount && + (refundPaySelectedName?.toLowerCase() === 'cash' || + refundPaySelectedName?.toLowerCase() === 'credit') ? 'PC' : Paybtnnameselected?.toLowerCase() === 'cash' ? 'PC' @@ -1636,29 +1636,29 @@ useEffect(() => { ? null : SelectedUPIPayOption?.toLowerCase() === 'default' ? PaymentUpiOptions?.find((upipay) => upipay?.UPIId === UpiId) - ?.UPIDetailId + ?.UPIDetailId : SelectedUPIPayOption?.toLowerCase() === 'business' ? BusinessPayOption?.find( - (busupi) => busupi?.ModeId === UpiId - )?.MerchantUPIId + (busupi) => busupi?.ModeId === UpiId + )?.MerchantUPIId : null, AccountDtl: salesBillEdit && currentOrderNetAmount < previousNetAmount ? [] : Paybtnnameselected?.toLowerCase() === 'upi' && - SelectedUPIPayOption?.toLowerCase() === 'default' + SelectedUPIPayOption?.toLowerCase() === 'default' ? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find( - (upipay) => upipay?.UPIId === UpiId - ) + (upipay) => upipay?.UPIId === UpiId + ) : (Paybtnnameselected?.toLowerCase() === 'upi' && - SelectedUPIPayOption?.toLowerCase() === 'pd') || - (Paybtnnameselected?.toLowerCase() === 'card' && - SelectedCardOption?.toLowerCase() === 'pd') + SelectedUPIPayOption?.toLowerCase() === 'pd') || + (Paybtnnameselected?.toLowerCase() === 'card' && + SelectedCardOption?.toLowerCase() === 'pd') ? useOptions?.[0]?.PaymentDetails?.PaymentDevice : (Paybtnnameselected?.toLowerCase() === 'upi' && - SelectedUPIPayOption?.toLowerCase() === 'pg') || - (Paybtnnameselected?.toLowerCase() === 'card' && - SelectedCardOption?.toLowerCase() === 'pg') + SelectedUPIPayOption?.toLowerCase() === 'pg') || + (Paybtnnameselected?.toLowerCase() === 'card' && + SelectedCardOption?.toLowerCase() === 'pg') ? useOptions?.[0]?.PaymentDetails?.PaymentGateway : [], PaymentStatus: @@ -1669,13 +1669,13 @@ useEffect(() => { : Paybtnnameselected?.toLowerCase() === 'credit' ? 'S' : Paybtnnameselected?.toLowerCase() === 'upi' && - SelectedUPIPayOption?.toLowerCase() === 'default' + SelectedUPIPayOption?.toLowerCase() === 'default' ? 'S' : 'P', Debit: salesBillEdit && - currentOrderNetAmount < previousNetAmount && - refundPaySelectedName?.toLowerCase() === 'credit' + currentOrderNetAmount < previousNetAmount && + refundPaySelectedName?.toLowerCase() === 'credit' ? Math.round(previousNetAmount - currentOrderNetAmount) : 0, Credit: salesBillEdit @@ -1777,14 +1777,14 @@ useEffect(() => { setMessageType('success'); setMessageData( response?.data?.response + - ' ' + - (response?.data?.OrderDetails?.length > 0 - ? response?.data?.OrderId && - extractLastNumberOrderId( - response?.data?.OrderId, - response?.data?.OrderDetails?.[0]?.FYStatus - ) - : '') + ' ' + + (response?.data?.OrderDetails?.length > 0 + ? response?.data?.OrderId && + extractLastNumberOrderId( + response?.data?.OrderId, + response?.data?.OrderDetails?.[0]?.FYStatus + ) + : '') ); response?.data?.OrderDetails?.length > 0 && setPrintOrderDetails([response?.data]); @@ -1943,14 +1943,14 @@ useEffect(() => { setMessageType('success'); setMessageData( response?.data?.response + - ' ' + - (response?.data?.OrderDetails?.length > 0 - ? response?.data?.OrderId && - extractLastNumberOrderId( - response?.data?.OrderId, - response?.data?.OrderDetails?.[0]?.FYStatus - ) - : '') + ' ' + + (response?.data?.OrderDetails?.length > 0 + ? response?.data?.OrderId && + extractLastNumberOrderId( + response?.data?.OrderId, + response?.data?.OrderDetails?.[0]?.FYStatus + ) + : '') ); response?.data?.OrderDetails?.length > 0 && setPrintOrderDetails([response?.data]); @@ -2055,14 +2055,14 @@ useEffect(() => { } setMessageData( response?.data?.response + - ' ' + - (response?.data?.OrderDetails?.length > 0 - ? response?.data?.OrderId && - extractLastNumberOrderId( - response?.data?.OrderId, - response?.data?.OrderDetails?.[0]?.FYStatus - ) - : '') + ' ' + + (response?.data?.OrderDetails?.length > 0 + ? response?.data?.OrderId && + extractLastNumberOrderId( + response?.data?.OrderId, + response?.data?.OrderDetails?.[0]?.FYStatus + ) + : '') ); if (response?.data?.OrderDetails?.length > 0) { setPrintOrderDetails([response?.data]); @@ -2136,9 +2136,9 @@ useEffect(() => { AppId: AppId, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; @@ -2151,9 +2151,9 @@ useEffect(() => { ProdSubCat: ProdSubCat, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; @@ -2164,9 +2164,9 @@ useEffect(() => { prodCat: prodCat, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; @@ -2346,14 +2346,14 @@ useEffect(() => { setMessageType('success'); setMessageData( bookingpaymentupdate?.data?.response + - ' ' + - (bookingpaymentupdate?.data?.OrderDetails?.length > 0 - ? bookingpaymentupdate?.data?.OrderId && - extractLastNumberOrderId( - bookingpaymentupdate?.data?.OrderId, - bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus - ) - : '') + ' ' + + (bookingpaymentupdate?.data?.OrderDetails?.length > 0 + ? bookingpaymentupdate?.data?.OrderId && + extractLastNumberOrderId( + bookingpaymentupdate?.data?.OrderId, + bookingpaymentupdate?.data?.OrderDetail?.[0]?.FYStatus + ) + : '') ); bookingpaymentupdate?.data?.OrderDetails?.length > 0 && setPrintOrderDetails([bookingpaymentupdate?.data]); @@ -2371,7 +2371,7 @@ useEffect(() => { if ( Date.now() - startTime > useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes * - 60000 + 60000 ) { // 60,000 ms = 1 minute @@ -3011,7 +3011,7 @@ useEffect(() => { const selectedStyle = stylesMap[ - printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle + printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle ]; if (selectedStyle) { @@ -3427,830 +3427,824 @@ useEffect(() => { } return ( - Suspense Loading...}> -
- - {summary && ( -
-
-
Items :
-

{orderCardDetail?.length || 0}

-
-
-
Total Qty :
-

- {orderCardDetail?.reduce((acc, item) => { - const isWeightScale = item?.ScaleType === 'weight'; - - if (isWeightScale) { - return ( - acc + - (Weightasquantity - ? Math.round(Number(item?.OrderQty || 0)) - : 1) - ); - } - - return acc + Math.round(Number(item?.OrderQty || 0)); - }, 0)} -

-
-
-
MRP Total :
-

- β‚Ή - {orderCardDetail?.reduce( - (acc, data) => parseFloat(data?.TotalAmt || 0) + acc, - 0 - )} -

-
- {TotalTaxAmount > 0 && ( -
-
Tax Amount :
-

{safeRound(TotalTaxAmount)}

-
- )} - {parseInt(extra) > 0 && ( -
-
Extra Charges :
-

{safeRound(extra)}

-
- )} -
-
Discount :
-

- -β‚Ή - {(OverAllSales > 0 ? OverAllSales : 0) + - (OverAllEstimate > 0 ? OverAllEstimate : 0) + - (Discount > 0 ? Discount : 0)} -

-
-
-
Total :
-

- β‚Ή - {safeRound( - credit && overAllBal >= 0 - ? Math.max(0, TotalAmount - overAllBal) - : TotalAmount - )} -

-
+
+ + {summary && ( +
+
+
Items :
+

{orderCardDetail?.length || 0}

- )} -
-
- -
+
+
Total Qty :
+

+ {orderCardDetail?.reduce((acc, item) => { + const isWeightScale = item?.ScaleType === 'weight'; + + if (isWeightScale) { + return ( + acc + + (Weightasquantity + ? Math.round(Number(item?.OrderQty || 0)) + : 1) + ); + } + + return acc + Math.round(Number(item?.OrderQty || 0)); + }, 0)} +

+
+
+
MRP Total :
+

+ β‚Ή + {orderCardDetail?.reduce( + (acc, data) => parseFloat(data?.TotalAmt || 0) + acc, + 0 + )} +

+
+ {TotalTaxAmount > 0 && ( +
+
Tax Amount :
+

{safeRound(TotalTaxAmount)}

+
+ )} + {parseInt(extra) > 0 && ( +
+
Extra Charges :
+

{safeRound(extra)}

+
+ )} +
+
Discount :
+

+ -β‚Ή + {(OverAllSales > 0 ? OverAllSales : 0) + + (OverAllEstimate > 0 ? OverAllEstimate : 0) + + (Discount > 0 ? Discount : 0)} +

+
+
+
Total :
+

+ β‚Ή + {safeRound( + credit && overAllBal >= 0 + ? Math.max(0, TotalAmount - overAllBal) + : TotalAmount + )} +

+
+
+ )} +
+
+ +
+ {' '} + 0 && 'not-allowed', + color: + orderCardDetail?.length > 0 || + (selOption?.value === undefined && + GlobalAddCustomerDetails1?.length === 0 && + GetCustId?.CustMobile === undefined) + ? 'gray' + : 'rgb(18, 146, 238)', + fontSize: '28px', + }} + />{' '} +
+
+ + {!OtherServicesglobal && ( + + {' '} +
+ +
+
+ )} + + {/* Customer Orders */} + {SelCustId && + tableOptions?.filter( + (item) => item.OptionName === 'PreviousBillFetch' + ).length === 1 && ( + {' '} - { + if ( + CheckBookingStatus !== 'Close' && + !addnewAccess && + !(orderCardDetail?.length > 0) + ) { + setCustomerPreviesOrders(true); + } + }} style={{ cursor: orderCardDetail?.length > 0 && 'not-allowed', color: orderCardDetail?.length > 0 || - (selOption?.value === undefined && - GlobalAddCustomerDetails1?.length === 0 && - GetCustId?.CustMobile === undefined) - ? 'gray' - : 'rgb(18, 146, 238)', - fontSize: '28px', - }} - />{' '} -
- - - {!OtherServicesglobal && ( - - {' '} -
0 && + GetCustId?.CustMobile === undefined) ? 'gray' : 'rgb(18, 146, 238)', + fontSize: '25px', display: 'flex', alignItems: 'center', height: '2.46rem', + width: '1.5rem', }} > - +
)} - {/* Customer Orders */} - {(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch') - .length === 1) && ( - - {' '} -
{ - if ( - CheckBookingStatus !== 'Close' && - !addnewAccess && - !(orderCardDetail?.length > 0) - ) { - setCustomerPreviesOrders(true); - } - }} - style={{ - cursor: orderCardDetail?.length > 0 && 'not-allowed', - color: - orderCardDetail?.length > 0 || - (orderCardDetail?.length > 0 && - GetCustId?.CustMobile === undefined) - ? 'gray' - : 'rgb(18, 146, 238)', - fontSize: '25px', - display: 'flex', - alignItems: 'center', - height: '2.46rem', - width: '1.5rem', - }} - > - -
-
+ {tabledata?.length > 0 && dinePreference && ( +
+ {tableOptions + ?.filter((item) => item.OptionName === 'UnpaidBill') + .map((filteredItem) => ( + + {!OtherServicesglobal && ( + + {' '} + { + (setUnpaidOpen(true), getUnpaiddatas()); + }} + /> + + )} + + ))} +
+ )} + {/* share */} + {PrintOrderDetails?.length > 0 && ( +
+ {filteredSettingNames?.includes('whatsapp') && + MobileNoWhatsApp?.value && ( + + )} + + {(filteredSettingNames?.includes('Print') || + !MobileNoWhatsApp || + !MobileNoWhatsApp.value) && ( + )} - {tabledata?.length > 0 && dinePreference && ( -
- {tableOptions - ?.filter((item) => item.OptionName === 'UnpaidBill') - .map((filteredItem) => ( - - {!OtherServicesglobal && ( - - {' '} - { - (setUnpaidOpen(true), getUnpaiddatas()); - }} - /> - - )} - - ))} -
- )} - {/* share */} - {PrintOrderDetails?.length > 0 && ( + {filteredSettingNames?.includes('SMS') && isMobile && ( + + )} + {/* WhatsAppShare modal/component */} + {showWhatsAppShare && ( + closePrintOption(false)} + /> + )} + {showSMSShare && isMobile && ( + closePrintOption(false)} + /> + )} +
+ )} + + {dinePreference && + (BookingType === 'Dine In' || + BookingTypeBoth || + CheckOrderType?.length > 0) && + !unpaidFlow && + SelectedTableDetails?.length !== 0 && (
- {filteredSettingNames?.includes('whatsapp') && - MobileNoWhatsApp?.value && ( - - )} - - {(filteredSettingNames?.includes('Print') || - !MobileNoWhatsApp || - !MobileNoWhatsApp.value) && ( - - )} - - {filteredSettingNames?.includes('SMS') && isMobile && ( - + {' '} + + FirstPaymentclick === false && !addnewAccess + ? changeOrderStatus() + : '' + } /> - )} - {/* WhatsAppShare modal/component */} - {showWhatsAppShare && ( - closePrintOption(false)} - /> - )} - {showSMSShare && isMobile && ( - closePrintOption(false)} - /> - )} +
)} - - {dinePreference && - (BookingType === 'Dine In' || - BookingTypeBoth || - CheckOrderType?.length > 0) && - !unpaidFlow && - SelectedTableDetails?.length !== 0 && ( -
- - {' '} - - FirstPaymentclick === false && !addnewAccess - ? changeOrderStatus() - : '' - } - /> - -
- )} -
-
- -
- {payBtns?.length > 0 && - currentOrderNetAmount >= previousNetAmount ? ( - payBtns.map((payment) => { - const mode = payment?.ModeName?.toLowerCase(); - const isSelected = paybtnselected === payment?.ModeId; - const buttonClass = isSelected - ? 'paybutton-selected' - : 'paybutton'; + +
+ +
+ {payBtns?.length > 0 && currentOrderNetAmount >= previousNetAmount ? ( + payBtns.map((payment) => { + const mode = payment?.ModeName?.toLowerCase(); + const isSelected = paybtnselected === payment?.ModeId; + const buttonClass = isSelected + ? 'paybutton-selected' + : 'paybutton'; - const handleClick = - mode === 'upi' - ? () => + const handleClick = + mode === 'upi' + ? () => handleUPIButtonClick(payment?.ModeId, payment?.ModeName) - : () => - handlePaymentMode(payment?.ModeId, payment?.ModeName); + : () => handlePaymentMode(payment?.ModeId, payment?.ModeName); - return ( -
- -
- ); - }) - ) : currentOrderNetAmount < previousNetAmount && - salesBillEdit && - refundPayBtns.length > 0 ? ( - refundPayBtns.map((payment) => { - const mode = payment?.ConfigName?.toLowerCase(); - const isSelected = refundPaySelected === payment?.ConfigId; - const buttonClass = isSelected - ? 'paybutton-selected' - : 'paybutton'; - - return ( -
- -
- ); - }) - ) : ( -
- Please Set Payment Options -
- )} -
-
+ {mode === 'credit' && ( + <> + + + )} + {payment?.ModeName} - -
+ )} + {mode === 'card' && ( + + )} +
+ +
+ ); + }) + ) : currentOrderNetAmount < previousNetAmount && + salesBillEdit && + refundPayBtns.length > 0 ? ( + refundPayBtns.map((payment) => { + const mode = payment?.ConfigName?.toLowerCase(); + const isSelected = refundPaySelected === payment?.ConfigId; + const buttonClass = isSelected + ? 'paybutton-selected' + : 'paybutton'; + + return ( +
+ +
+ ); + }) + ) : ( +
+ Please Set Payment Options +
+ )} +
+ + + +
0 && paybtnselected && CheckBookingStatus !== 'Close' - ? !OrderStatus - ? salesBillEdit && currentOrderNetAmount < previousNetAmount - ? 'standard-pay-btn-refund' - : 'standard-pay-btn' - : 'standard-pay-btn order-complete' - : 'standard-pay-btn-disabled' - } - onClick={handleButtonClick} - > - {!OrderStatus ? ( - salesBillEdit && currentOrderNetAmount < previousNetAmount ? ( -

- Refund: β‚Ή - {(previousNetAmount || 0) - (currentOrderNetAmount || 0)} -

- ) : ( - <> -

- {isMobile ? ( - `β‚Ή ${safeRound( - OrderType === 'Failed' - ? FailedTotalAmt - : credit && overAllBal >= 0 - ? Math.max(0, TotalAmount - overAllBal) - : TotalAmount - )}` - ) : ( -

- β‚Ή{' '} - = 0 - ? Math.max(0, TotalAmount - overAllBal) - : TotalAmount - )} - /> -
- )} -

- -
- -
- - ) - ) : ( -
ORDER
- )} -
-
- - { - setUnpaidOpen(false); - }} - footer={false} - children={ -
- -
+ ? !OrderStatus + ? salesBillEdit && currentOrderNetAmount < previousNetAmount + ? 'standard-pay-btn-refund' + : 'standard-pay-btn' + : 'standard-pay-btn order-complete' + : 'standard-pay-btn-disabled' } - /> - {UnpaidConfirmation && ( - + {!OrderStatus ? ( + salesBillEdit && currentOrderNetAmount < previousNetAmount ? ( +

+ Refund: β‚Ή + {(previousNetAmount || 0) - (currentOrderNetAmount || 0)} +

+ ) : ( <> -
- You have already selected a table. If you click 'OK,' the - table selection will be removed, and the unpaid flow will - continue. If you click 'Cancel,' the dine-in flow will proceed - as selected. -
- - } - onOk={UnpaidOk} - onCancel={Unpaidclose} - /> - )} - - {UpiOpen && ( - { - Upimodel('Cancel'); - }} - footer={false} - children={ -
-
-
- -
- -
-

- {' '} - RS : - {OrderType === 'Failed' + {isMobile ? ( + `β‚Ή ${safeRound( + OrderType === 'Failed' ? FailedTotalAmt - : Math.round(TotalAmount)}{' '} -

-
-
- -
- {(selOption || SelCustId) && ( -
- Sent Payment Link - Your Alt Text= 0 + ? Math.max(0, TotalAmount - overAllBal) + : TotalAmount + )}` + ) : ( +
+ β‚Ή{' '} + = 0 + ? Math.max(0, TotalAmount - overAllBal) + : TotalAmount + )} />
)} +

-
- } - handleSubmit={() => { - Upimodel('Submit'); - }} - /> -
+
+
-
- } - /> - )} - {PrintOrderDetails?.length > 0 && - PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => ( -
- -
- ))} - {PrintOrderDetails?.length > 0 && - (TokenOnly?.SettingValue === 'Y' || - IndividualToken?.SettingValue === 'Y') && - PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => ( -
- -
- ))} - {CreditCustomer && ( -
- { - handleCreditCustomer('Cancel'); - }} - handleOk={() => { - handleCreditCustomer('Submit'); - }} + + ) + ) : ( +
ORDER
+ )} +
+ + + { + setUnpaidOpen(false); + }} + footer={false} + children={ +
+
- )} - - {creditCustomerOpen && ( - - )} - {Splitpayment && ( - data?.TotalAmt + acc, 0) - - ((OverAllSales > 0 ? OverAllSales : 0) + - (OverAllEstimate > 0 ? OverAllEstimate : 0) + - (Discount > 0 ? Discount : 0)) - )} - // failedOrderData={failedOrderData} - /> - )} - - + {UnpaidConfirmation && ( + +
+ You have already selected a table. If you click 'OK,' the table + selection will be removed, and the unpaid flow will continue. If + you click 'Cancel,' the dine-in flow will proceed as selected. +
+ + } + onOk={UnpaidOk} + onCancel={Unpaidclose} + /> + )} + + {UpiOpen && ( + { - dispatch(changeSalesPaymentoption(false)); + Upimodel('Cancel'); }} footer={false} children={ -
- +
+
+
+ +
+ +
+

+ {' '} + RS : + {OrderType === 'Failed' + ? FailedTotalAmt + : Math.round(TotalAmount)}{' '} +

+
+
+ +
+ {(selOption || SelCustId) && ( +
+ Sent Payment Link + Your Alt Text +
+ )} + +
+ } + handleSubmit={() => { + Upimodel('Submit'); + }} + /> +
+
} /> - setShowCancelConfirm(true)} - footer={false} - width={600} - className={'ModalPaymentGatewayEmbedded'} - children={ - <> - - - } - /> - {showCancelConfirm && ( - { - paymentGatewayRef.current?.clearPolling(); - setBusinessUPI(false); - setShowCancelConfirm(false); - ClearAllGlobalStateDatas(); - CustomerDisplay(); - }} - onCancel={() => setShowCancelConfirm(false)} - okText="Yes" - cancelText="No" - > - Do you want to cancel the payment? - - )} - {customerPreviesOrders && ( - setCustomerPreviesOrders(false)} - footer={false} - width={700} - className={'ModalPaymentGatewayEmbedded'} - children={ - <> - setCustomerPreviesOrders(false)} - /> - - } - /> - )} - {OtherServicesPrintDetails?.length > 0 && ( - // PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => ( + )} + {PrintOrderDetails?.length > 0 && + PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => (
-
- )} -
- + ))} + {PrintOrderDetails?.length > 0 && + (TokenOnly?.SettingValue === 'Y' || + IndividualToken?.SettingValue === 'Y') && + PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => ( +
+ +
+ ))} + {CreditCustomer && ( +
+ { + handleCreditCustomer('Cancel'); + }} + handleOk={() => { + handleCreditCustomer('Submit'); + }} + /> +
+ )} + + {creditCustomerOpen && ( + + )} + {Splitpayment && ( + data?.TotalAmt + acc, 0) - + ((OverAllSales > 0 ? OverAllSales : 0) + + (OverAllEstimate > 0 ? OverAllEstimate : 0) + + (Discount > 0 ? Discount : 0)) + )} + // failedOrderData={failedOrderData} + /> + )} + + { + dispatch(changeSalesPaymentoption(false)); + }} + footer={false} + children={ +
+ +
+ } + /> + setShowCancelConfirm(true)} + footer={false} + width={600} + className={'ModalPaymentGatewayEmbedded'} + children={ + <> + + + } + /> + {showCancelConfirm && ( + { + paymentGatewayRef.current?.clearPolling(); + setBusinessUPI(false); + setShowCancelConfirm(false); + ClearAllGlobalStateDatas(); + CustomerDisplay(); + }} + onCancel={() => setShowCancelConfirm(false)} + okText="Yes" + cancelText="No" + > + Do you want to cancel the payment? + + )} + {customerPreviesOrders && ( + setCustomerPreviesOrders(false)} + footer={false} + width={700} + className={'ModalPaymentGatewayEmbedded'} + children={ + <> + setCustomerPreviesOrders(false)} + /> + + } + /> + )} + {OtherServicesPrintDetails?.length > 0 && ( + // PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => ( +
+ +
+ )} +
); }; diff --git a/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx b/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx index 61ae9bd..5d90baf 100644 --- a/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx +++ b/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx @@ -144,7 +144,7 @@ export function SortableCard({ id, children, item }) { // Add mobile-specific cursor and visual feedback cursor: isMobile ? 'grab' : 'default', // Add a subtle shadow for mobile to indicate draggability - boxShadow: isMobile && !isDragging ? '0 2px 4px rgba(0,0,0,0.1)' : 'none', + boxShadow: isMobile && !isDragging ? '0 0 0 rgba(0,0,0,0.1)' : 'none', }; const draggingComponent = useSelector(GlobaldraggingComponent); const allowDrag = draggingComponent === 'card'; @@ -4965,7 +4965,7 @@ const BSItemCard = (props) => { setStockItem(); setOnePeiceFlow(false); if (cardData?.length <= 1) { - dispatch(changeSearchedData('')); + dispatch(changeSearchedData('')); } }; @@ -6125,7 +6125,7 @@ const BSItemCard = (props) => { ['Layout4', 'Layout5', 'Layout6'].includes( templateData?.BookingLayout?.[0] ) - ? '4.4rem' + ? '3rem' : ['Layout4', 'Layout5', 'Layout6'].includes( templateData?.BookingLayout?.[0] ) diff --git a/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar1.jsx b/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar1.jsx index 9f34425..d0be917 100644 --- a/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar1.jsx +++ b/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar1.jsx @@ -1124,6 +1124,7 @@ const BSNavbar1 = (props, BookingNavbar) => {
)} + {/* Customer Add Select */} {item?.OptionName == 'AddCustomer' && !preOrderOpen && (
diff --git a/src/Pages/BookingScreen/Components/BSSubCategories/BSSubCategoryHorizontal.jsx b/src/Pages/BookingScreen/Components/BSSubCategories/BSSubCategoryHorizontal.jsx index 3b16d34..4cfeb3f 100644 --- a/src/Pages/BookingScreen/Components/BSSubCategories/BSSubCategoryHorizontal.jsx +++ b/src/Pages/BookingScreen/Components/BSSubCategories/BSSubCategoryHorizontal.jsx @@ -118,18 +118,6 @@ function BSSubCategoryHorizontal(props) { return () => container.removeEventListener('scroll', updateButtons); }, [subCategoryType]); - useEffect(() => { - // Accessing the DOM elements - const container = containerRef?.current; - - // Checking initial values - const isConditionMet = - container?.scrollLeft + container?.clientWidth === container?.scrollWidth; - if (isConditionMet == true) { - setShowRightButton(true); - } - }, []); - const handleScrollClickLeft = ( scrollAmountX, scrollAmountY, @@ -397,28 +385,18 @@ function BSSubCategoryHorizontal(props) { if (!container) return; const handleWheel = (e) => { - container.scrollLeft += e.deltaX; - e.preventDefault(); + if (!isVertical) { + container.scrollLeft += e.deltaY; + e.preventDefault(); + } }; - container.addEventListener('wheel', handleWheel); + container.addEventListener('wheel', handleWheel, { passive: false }); return () => { container.removeEventListener('wheel', handleWheel); }; - }, [scrollContainerRef]); - - useEffect(() => { - // Accessing the DOM elements - const container = containerRef.current; - - // Checking initial values - const isConditionMet = - container?.scrollLeft + container?.clientWidth === container?.scrollWidth; - if (isConditionMet == true) { - setShowRightButton(true); - } - }, []); + }, [scrollContainerRef, isVertical]); const maindiv = document.getElementById('mainDiv'); const count = maindiv?.querySelectorAll('div'); @@ -487,7 +465,7 @@ function BSSubCategoryHorizontal(props) { overflowX: 'auto', width: '100%', whiteSpace: 'nowrap', - margin: '0', + margin: '0 6px', } : {} } diff --git a/src/Pages/BookingScreen/Components/BookingFunctionality/CreditCustSplitPayment.jsx b/src/Pages/BookingScreen/Components/BookingFunctionality/CreditCustSplitPayment.jsx index 2244a10..ba36ade 100644 --- a/src/Pages/BookingScreen/Components/BookingFunctionality/CreditCustSplitPayment.jsx +++ b/src/Pages/BookingScreen/Components/BookingFunctionality/CreditCustSplitPayment.jsx @@ -1,11 +1,4 @@ -import { - useEffect, - useRef, - useState, - useCallback, - Suspense, - lazy, -} from 'react'; +import { useEffect, useRef, useState, useCallback, lazy } from 'react'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { getConfigType, @@ -1252,141 +1245,139 @@ const CreditCustSplitPayment = (props) => { : 'Debit amount not available'; return ( - Loading features...
}> - <> - -
- { - SplitSelPayMode[`PaymentStatus-0`] !== 'S' && HandleModalClose(); - }} - footer={false} - width={1000} - children={ -
-

Total Amount:{TotalAmount}

- - <>{calculateField()} - {TotalAmount > TotalSplitAmount && - SplitSelPayMode[`PaymentStatus-${count}`] === 'S' && ( - -
- setCount(count + 1)} - /> -
-
- )} -
- } - /> -
- {TotalAmount == 0 && Success && ( -
- -
- )} - {TotalAmount > 0 && - qrCode && - PaymentUpiOptions?.length > 0 && - SelUpiId && ( + <> + +
+ { + SplitSelPayMode[`PaymentStatus-0`] !== 'S' && HandleModalClose(); + }} + footer={false} + width={1000} + children={
- -
- )} - {UpiOpen && ( - { - Upimodel('Cancel'); - }} - footer={false} - children={ -
-
-
- -
+

Total Amount:{TotalAmount}

-
-

RS :{CurrentPayAmount}

-
-
- -
- {(selOption || SelCustId) && ( -
- Sent Payment Link - Your Alt Text{calculateField()} + {TotalAmount > TotalSplitAmount && + SplitSelPayMode[`PaymentStatus-${count}`] === 'S' && ( + +
+ setCount(count + 1)} />
- )} - -
- } - handleSubmit={() => { - Upimodel('Submit'); - }} - /> -
-
-
- } - /> - )} - {addcustomer && ( - - )} - {Object.keys(PrintDatas).length > 0 && ( -
- + )} +
+ } + /> +
+ {TotalAmount == 0 && Success && ( +
+ +
+ )} + {TotalAmount > 0 && + qrCode && + PaymentUpiOptions?.length > 0 && + SelUpiId && ( +
+
)} - - + {UpiOpen && ( + { + Upimodel('Cancel'); + }} + footer={false} + children={ +
+
+
+ +
+ +
+

RS :{CurrentPayAmount}

+
+
+ +
+ {(selOption || SelCustId) && ( +
+ Sent Payment Link + Your Alt Text +
+ )} + +
+ } + handleSubmit={() => { + Upimodel('Submit'); + }} + /> +
+
+
+ } + /> + )} + {addcustomer && ( + + )} + {Object.keys(PrintDatas).length > 0 && ( +
+ +
+ )} + ); }; export default CreditCustSplitPayment; diff --git a/src/Pages/BookingScreen/Forms/DirectSale/DirectSale.jsx b/src/Pages/BookingScreen/Forms/DirectSale/DirectSale.jsx index bfdd03f..450ca02 100644 --- a/src/Pages/BookingScreen/Forms/DirectSale/DirectSale.jsx +++ b/src/Pages/BookingScreen/Forms/DirectSale/DirectSale.jsx @@ -44,6 +44,7 @@ const StickerPrintTemplates = lazy( ); // SCss import '../../../../Styles/BookingScreen/Components/OtherConponents/Reprint/BSReprint.scss'; +import Loader from '../../../../Components/Loader/Loader.jsx'; const DirectSale = ({ UomData = [], TaxData = [], @@ -950,7 +951,7 @@ const DirectSale = ({ }, []); return ( - Loading ...}> + }>
{ style={{ marginTop: '12px' }} >
{UserType !== 'Employee' && ( @@ -542,7 +546,7 @@ const BSLayout1 = () => { )}
-
+
{
{ SelectedSubCatgColor?.['OverallBackgroundColor'], display: BookingSubCategory ? 'block' : 'none', }} + className="BSLayout1-SubCategoryMain" > {Comboglobal === false && !OtherServicesglobal && ( { style={{ marginTop: '9px' }} >
{UserType !== 'Employee' && ( @@ -378,13 +382,11 @@ const BSLayout2 = () => {
)} {!OtherServicesglobal && ( - - - + )} {SessionData?.FeatureAddonData?.FeatureDtls?.find( (item) => @@ -423,32 +425,26 @@ const BSLayout2 = () => { isMobile={isMobile} > {' '} - - - + )} {Kioskopen && ( - - - + )} {SAdminuserPin?.length > 0 && UserType != 'Super Admin User' && ( - -
- -
-
+
+ +
)} {!OtherServicesglobal && ( <> @@ -536,26 +532,22 @@ const BSLayout2 = () => { }} > {!OtherServicesglobal && ( - - - + )} {OtherServicesglobal && ( - - - + )}
{ /> ))} {Comboglobal === true && !OtherServicesglobal && ( - - - + )} {OtherServicesglobal && ( - - - + )}
@@ -618,43 +606,37 @@ const BSLayout2 = () => { {action ? ( ) : ( - - <> - {BSLayout2Data?.BookingBilling?.[0] == 'Billing1' && ( - - )} - {BSLayout2Data?.BookingBilling?.[0] == 'Billing2' && ( - - )} - {BSLayout2Data?.BookingBilling?.[0] == 'Billing3' && ( - - )} - {BSLayout2Data?.BookingBilling?.[0] == 'Billing4' && ( - - )} - {BSLayout2Data?.BookingBilling?.[0] == 'Billing5' && ( - - )} - {BSLayout2Data?.BookingBilling?.[0] == 'Billing6' && ( - - )} - {BSLayout2Data?.BookingBilling?.[0] == 'Billing7' && ( - - )} + <> + {BSLayout2Data?.BookingBilling?.[0] == 'Billing1' && ( + + )} + {BSLayout2Data?.BookingBilling?.[0] == 'Billing2' && ( + + )} + {BSLayout2Data?.BookingBilling?.[0] == 'Billing3' && ( + + )} + {BSLayout2Data?.BookingBilling?.[0] == 'Billing4' && ( + + )} + {BSLayout2Data?.BookingBilling?.[0] == 'Billing5' && ( + + )} + {BSLayout2Data?.BookingBilling?.[0] == 'Billing6' && ( + + )} + {BSLayout2Data?.BookingBilling?.[0] == 'Billing7' && ( + + )} - {BookingBilling == 'Billing8' && ( - - )} - {BSLayout2Data?.BookingBilling?.[0] == - 'StandardBilling' && ( -
- - - -
- )} - -
+ {BookingBilling == 'Billing8' && } + {BSLayout2Data?.BookingBilling?.[0] == + 'StandardBilling' && ( +
+ +
+ )} + )}
@@ -662,20 +644,16 @@ const BSLayout2 = () => {
{BookingModalOpen && ( - - - + )} {ListOfInvoices && ( - - - + )} diff --git a/src/Pages/BookingScreen/Template/BSLayout3/BSLayout3.jsx b/src/Pages/BookingScreen/Template/BSLayout3/BSLayout3.jsx index fd84de0..5d73cac 100644 --- a/src/Pages/BookingScreen/Template/BSLayout3/BSLayout3.jsx +++ b/src/Pages/BookingScreen/Template/BSLayout3/BSLayout3.jsx @@ -336,7 +336,11 @@ const BSLayout3 = () => { >
{UserType !== 'Employee' && ( diff --git a/src/Pages/BookingScreen/Template/BSLayout4/BSLayout4.jsx b/src/Pages/BookingScreen/Template/BSLayout4/BSLayout4.jsx index aad6967..98d2d2c 100644 --- a/src/Pages/BookingScreen/Template/BSLayout4/BSLayout4.jsx +++ b/src/Pages/BookingScreen/Template/BSLayout4/BSLayout4.jsx @@ -347,7 +347,11 @@ const BSLayout4 = () => {
{UserType !== 'Employee' && ( diff --git a/src/Pages/BookingScreen/Template/BSLayout5/BSLayout5.jsx b/src/Pages/BookingScreen/Template/BSLayout5/BSLayout5.jsx index f56e403..5fcd8cb 100644 --- a/src/Pages/BookingScreen/Template/BSLayout5/BSLayout5.jsx +++ b/src/Pages/BookingScreen/Template/BSLayout5/BSLayout5.jsx @@ -343,7 +343,11 @@ const BSLayout5 = () => { >
{UserType !== 'Employee' && ( diff --git a/src/Pages/BookingScreen/Template/BSLayout6/BSLayout6.jsx b/src/Pages/BookingScreen/Template/BSLayout6/BSLayout6.jsx index 93e3e1a..02f47b8 100644 --- a/src/Pages/BookingScreen/Template/BSLayout6/BSLayout6.jsx +++ b/src/Pages/BookingScreen/Template/BSLayout6/BSLayout6.jsx @@ -346,7 +346,11 @@ const BSLayout6 = () => {
{UserType !== 'Employee' && ( diff --git a/src/Pages/BookingScreen/Template/SalesCountComponent.jsx b/src/Pages/BookingScreen/Template/SalesCountComponent.jsx index 28007f4..94dd5c9 100644 --- a/src/Pages/BookingScreen/Template/SalesCountComponent.jsx +++ b/src/Pages/BookingScreen/Template/SalesCountComponent.jsx @@ -5,7 +5,7 @@ import React, { useRef, useCallback, lazy, - Suspense, + } from 'react'; import { Tooltip } from 'antd'; import { @@ -482,8 +482,7 @@ const SalesCountComponent = React.memo( setModalProductDetails([]); }; return ( - Loading…
}> - <> + <> - - ); + ); } ); diff --git a/src/Pages/BookingScreen/Template/SalesCountComponent.scss b/src/Pages/BookingScreen/Template/SalesCountComponent.scss index 68008ce..817443b 100644 --- a/src/Pages/BookingScreen/Template/SalesCountComponent.scss +++ b/src/Pages/BookingScreen/Template/SalesCountComponent.scss @@ -77,7 +77,7 @@ align-items: center; justify-content: space-around; width: 80%; - .missingNumCheckIcon { + .missingNumCheckIcon { color: #1292ee; svg { display: flex; diff --git a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable6/BSBillingTable6.scss b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable6/BSBillingTable6.scss index 99f28c0..1eb70bf 100644 --- a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable6/BSBillingTable6.scss +++ b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable6/BSBillingTable6.scss @@ -32,7 +32,7 @@ .BillingTable6-table-th { padding: 1vh 1vh 1vh 1vh; border: 0.1px solid rgba(168, 168, 168, 0.5019607843); - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; } .BillingTable6-Table1-row { @@ -52,8 +52,8 @@ padding: 5px; border: 0.1px solid #a8a8a880; border-top: none; - font-family: 'Poppins', sans-serif; - font-size: 14px; + font-family: "Poppins", sans-serif; + font-size: 12px; } .BillingTable6Table1-body { diff --git a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.scss b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.scss index 89b7fe1..8a5e2df 100644 --- a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.scss +++ b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.scss @@ -7,10 +7,9 @@ .BSBilling7-tablediv { display: block; - height: 59vh; + height: 53vh; overflow-y: scroll; max-height: 59vh; - // height: 90%; } .BSTable3_overall-6 { height: 71vh; @@ -25,7 +24,6 @@ .Table7-tbody { width: 100%; - // height: 60vh; overflow-y: scroll; } @@ -546,7 +544,7 @@ hr.Table7-Dotted-Line1 { display: flex; gap: 0.2rem; align-items: center; - font-family: 'Poppins'; + font-family: "Poppins"; justify-content: center; cursor: pointer; text-transform: capitalize; @@ -567,7 +565,7 @@ hr.Table7-Dotted-Line1 { display: flex; gap: 0.2rem; align-items: center; - font-family: 'Poppins'; + font-family: "Poppins"; justify-content: center; cursor: pointer; text-transform: capitalize; diff --git a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTables3/BSBillingTable3.scss b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTables3/BSBillingTable3.scss index 618187c..3de9bd6 100644 --- a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTables3/BSBillingTable3.scss +++ b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTables3/BSBillingTable3.scss @@ -327,6 +327,19 @@ width: 100% !important; } } +.BSTable3_overallLayout1 { + display: flex; + flex-direction: column; + justify-content: space-between; + overflow: auto; + scrollbar-width: none; + width: inherit; + height: 85vh; + border-radius: 10px; + @media (max-width: 768px) { + width: 100% !important; + } +} .BSTable3_overall-6 { height: 71vh; diff --git a/src/Styles/BookingScreen/Components/BSCategories/BSCategoryHorizontal.scss b/src/Styles/BookingScreen/Components/BSCategories/BSCategoryHorizontal.scss index 415c771..f7d68e4 100644 --- a/src/Styles/BookingScreen/Components/BSCategories/BSCategoryHorizontal.scss +++ b/src/Styles/BookingScreen/Components/BSCategories/BSCategoryHorizontal.scss @@ -30,6 +30,7 @@ align-items: center; justify-content: center; border: none; + width: max-content; } .CategoryHorizontal-image { diff --git a/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar1.scss b/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar1.scss index 3034877..fa0ab48 100644 --- a/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar1.scss +++ b/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar1.scss @@ -39,7 +39,7 @@ display: flex; align-items: center; width: 100vw; - height: 42px; + height: 45px; box-shadow: var(--BOX_SHADOW_LEVEL2); padding: 1px 6px; gap: 12px; diff --git a/src/Styles/BookingScreen/Components/BSSubCategories/BSSubCategoryHorizontal.scss b/src/Styles/BookingScreen/Components/BSSubCategories/BSSubCategoryHorizontal.scss index 38f9117..da4c09a 100644 --- a/src/Styles/BookingScreen/Components/BSSubCategories/BSSubCategoryHorizontal.scss +++ b/src/Styles/BookingScreen/Components/BSSubCategories/BSSubCategoryHorizontal.scss @@ -10,7 +10,6 @@ .SubCategoryHorizontal-master-container { display: flex; flex-direction: row; - // flex-wrap: wrap; column-gap: 0.7rem; row-gap: 0.7rem; width: max-content; @@ -44,15 +43,13 @@ cursor: pointer; } .SubCategoryHorizontal-scroll-container { - overflow-y: scroll; /* Add a vertical scrollbar when content overflows */ - max-height: 300px; /* Set a maximum height for the container */ - + overflow-y: auto; + max-height: 300px; display: flex; - // flex-direction: row; column-gap: 0.5rem; } .SubCategoryHorizontal-label { - font-family: 'Gilroy'; + font-family: "Gilroy"; font-weight: 600; font-size: 14px; } @@ -61,28 +58,12 @@ display: none !important; } -// ::-webkit-scrollbar-button:start { -// background-color: #333; -// border: 1px solid #666; -// } - -// /* Style the scroll-down button */ -// ::-webkit-scrollbar-button:end { -// background-color: #333; -// border: 1px solid #666; -// } - -// ::-webkit-scrollbar { -// display: none; -// } - .SubCategoryHorizontal-btn-option2 { display: flex; align-items: center; padding: 8px 10px; width: max-content !important; cursor: pointer; - // border-radius: 20px; } .SubCategoryHorizontal-input-style:checked + span { @@ -94,19 +75,12 @@ } } -// .SubCategoryHorizontal-btn-option2 { -// display: flex; -// align-items: center; -// padding: 10px 10px; -// width: max-content !important; -// } .SubCategoryHorizontal-btn-option2-reverse { display: flex; flex-direction: row-reverse; align-items: center; padding: 10px 10px; width: max-content !important; - // border-radius: 20px; } .SubCategoryHorizontal-curved { @@ -124,7 +98,6 @@ .sampleCard { min-width: max-content; - // flex-grow: 1; } .sampleCard:active, @@ -143,17 +116,67 @@ } .sampleCard { - /* Your existing styles for sampleCard */ - /* ... */ - - /* Add this to specify the border style */ border: 1px solid transparent; - cursor: pointer; /* Optional: add a pointer cursor to indicate clickability */ + cursor: pointer; } .sampleCard-border { - border-color: black; /* Specify the border color you want */ + border-color: black; } .SubCategoryHorizontal-text { font-size: 14px; } +.SubCategoryVertical { + height: 90%; + display: flex; + align-items: center; + flex-direction: column; + gap: 4px; +} +.SubCategoryVertical-scroll-container { + display: flex; + align-items: center; + gap: 6px; + flex-direction: column; + width: 100%; + height: clamp(400px, 75dvh, 900px); + overflow: auto; + scrollbar-width: thin; + padding-bottom: 5rem; + padding: 4px; +} +.SubCategoryVertical-sampleCard { + width: 100%; + border-radius: 2px; +} +.SubCategoryVertical-sub-samplecard { + padding: 3px 5px; +} +.SubCategoryVertical-text { + width: 100px; + white-space: nowrap; + overflow: hidden; + font-size: 15px; + font-weight: 400; + -webkit-text-stroke-width: 0.1px; + text-overflow: ellipsis; +} + +.SubCategoryVertical-buttons { + display: flex; + align-items: center; + justify-content: space-around; + width: 100%; + .SubCategoryVertical-icon { + font-size: 15px; + padding: 8px; + border-radius: 6px; + background-color: #d8d8d8; + margin: 3px; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + border: none; + } +} diff --git a/src/Styles/BookingScreen/Template/BSLayout1/BSLayout1.scss b/src/Styles/BookingScreen/Template/BSLayout1/BSLayout1.scss index a766298..e3bdbfd 100644 --- a/src/Styles/BookingScreen/Template/BSLayout1/BSLayout1.scss +++ b/src/Styles/BookingScreen/Template/BSLayout1/BSLayout1.scss @@ -12,7 +12,7 @@ .BSLayout1Standard { overflow: hidden; position: relative; - top: 3.2rem; + top: 2.01rem; height: 100%; @media (max-width: 768px) { @@ -62,7 +62,7 @@ body { height: 98%; } -.BSCategory1-Cardcont { +.BSLayout1-Card-Cat-Sub { overflow: hidden; display: flex; height: 85vh; @@ -77,6 +77,12 @@ body { gap: 6px; padding: 3px 5px; + .CategoryHorizontalNew { + background-color: #f4f4f4; + padding: 6px 6px; + border-radius: 4px; + } + .BsTable2-Master { height: 84vh !important; } @@ -106,7 +112,7 @@ body { opacity: 12% !important; } - .BSCategory1-Cardcont { + .BSLayout1-Card-Cat-Sub { height: 74vh !important; column-gap: 0 !important; } @@ -148,7 +154,7 @@ body { } @media (min-width: 500px) and (max-width: 767px) { - .BSCategory1-Cardcont { + .BSLayout1-Card-Cat-Sub { height: 74vh !important; } @@ -197,6 +203,44 @@ body { flex-wrap: wrap; } } +.Layout-IfNavbar3 { + display: flex; + width: 100%; + justify-content: space-around; + font-weight: 600; + align-items: center; + gap: 2px; + padding: 2px 6px; + background: linear-gradient(to bottom right, #2a3447, #1e2536); + .SalesCountComponent-Master { + color: #fff; + } + .keyboardShortcut { + background-color: #fff; + height: 25px; + border-radius: 4px; + cursor: pointer; + > div { + padding: 3px 10px !important; + } + } + .allpageSettingIcon { + background-color: #fff !important; + } + .price-change-btn { + background-color: #fff; + height: 25px; + width: 45px; + img { + height: 20px !important; + } + } + + @media (max-width: 500px) { + font-size: 10px; + flex-wrap: wrap; + } +} .L .example { width: 80%; @@ -232,7 +276,7 @@ body { align-items: center; } -.custom-search .ant-input-affix-wrapper>input.ant-input { +.custom-search .ant-input-affix-wrapper > input.ant-input { padding: 0; } @@ -253,7 +297,6 @@ body { } @keyframes shake { - 0%, 100% { transform: rotate(0deg); @@ -319,4 +362,4 @@ body { display: flex; align-items: center; gap: 2px; -} \ No newline at end of file +} diff --git a/src/Styles/BookingScreen/Template/BSLayout2/BSLayout2.scss b/src/Styles/BookingScreen/Template/BSLayout2/BSLayout2.scss index da61aa1..66479ea 100644 --- a/src/Styles/BookingScreen/Template/BSLayout2/BSLayout2.scss +++ b/src/Styles/BookingScreen/Template/BSLayout2/BSLayout2.scss @@ -25,7 +25,7 @@ body { .BSLayout2 { overflow: hidden; position: relative; - top: 3.4rem; + top: 2.1rem; height: 100%; @media (max-width: 768px) { @@ -447,6 +447,45 @@ body { flex-wrap: wrap; } } + +.Layout-IfNavbar3 { + display: flex; + width: 100%; + justify-content: space-around; + font-weight: 600; + align-items: center; + gap: 2px; + padding: 2px 6px; + background: linear-gradient(to bottom right, #2a3447, #1e2536); + .SalesCountComponent-Master { + color: #fff; + } + .keyboardShortcut { + background-color: #fff; + height: 25px; + border-radius: 4px; + cursor: pointer; + > div { + padding: 3px 10px !important; + } + } + .allpageSettingIcon { + background-color: #fff !important; + } + .price-change-btn { + background-color: #fff; + height: 25px; + width: 45px; + img { + height: 20px !important; + } + } + + @media (max-width: 500px) { + font-size: 10px; + flex-wrap: wrap; + } +} .pricing-name-details { font-family: "Poppins"; font-size: 12px; diff --git a/src/Styles/BookingScreen/Template/BSLayout3/BSLayout3.scss b/src/Styles/BookingScreen/Template/BSLayout3/BSLayout3.scss index 9dd321b..d253b26 100644 --- a/src/Styles/BookingScreen/Template/BSLayout3/BSLayout3.scss +++ b/src/Styles/BookingScreen/Template/BSLayout3/BSLayout3.scss @@ -21,7 +21,7 @@ .BSLayout3Standard { overflow: hidden; position: relative; - top: 3.3rem; + top: 2.2rem; height: 100%; @media (max-width: 768px) { @@ -52,6 +52,7 @@ overflow: auto; display: flex; height: 100%; + margin-top: 10px; } .BsLayout3-ContentDiv { @@ -66,6 +67,9 @@ margin: 1rem 0.5rem; height: clamp(68vh, 50rem, 50vh); background-color: #fff; + @media (max-width: 768px) { + width: 100% !important; + } } @media (min-width: 280px) and (max-width: 499px) { @@ -458,6 +462,45 @@ flex-wrap: wrap; } } + +.Layout-IfNavbar3 { + display: flex; + width: 100%; + justify-content: space-around; + font-weight: 600; + align-items: center; + gap: 2px; + padding: 2px 6px; + background: linear-gradient(to bottom right, #2a3447, #1e2536); + .SalesCountComponent-Master { + color: #fff; + } + .keyboardShortcut { + background-color: #fff; + height: 25px; + border-radius: 4px; + cursor: pointer; + > div { + padding: 3px 10px !important; + } + } + .allpageSettingIcon { + background-color: #fff !important; + } + .price-change-btn { + background-color: #fff; + height: 25px; + width: 45px; + img { + height: 20px !important; + } + } + + @media (max-width: 500px) { + font-size: 10px; + flex-wrap: wrap; + } +} .pricing-name-details { font-family: "Poppins"; font-size: 12px; diff --git a/src/Styles/BookingScreen/Template/BSLayout4/BSLayout4.scss b/src/Styles/BookingScreen/Template/BSLayout4/BSLayout4.scss index 4dc721f..547c7a0 100644 --- a/src/Styles/BookingScreen/Template/BSLayout4/BSLayout4.scss +++ b/src/Styles/BookingScreen/Template/BSLayout4/BSLayout4.scss @@ -252,6 +252,44 @@ flex-wrap: wrap; } } +.Layout-IfNavbar3 { + display: flex; + width: 100%; + justify-content: space-around; + font-weight: 600; + align-items: center; + gap: 2px; + padding: 2px 6px; + background: linear-gradient(to bottom right, #2a3447, #1e2536); + .SalesCountComponent-Master { + color: #fff; + } + .keyboardShortcut { + background-color: #fff; + height: 25px; + border-radius: 4px; + cursor: pointer; + > div { + padding: 3px 10px !important; + } + } + .allpageSettingIcon { + background-color: #fff !important; + } + .price-change-btn { + background-color: #fff; + height: 25px; + width: 45px; + img { + height: 20px !important; + } + } + + @media (max-width: 500px) { + font-size: 10px; + flex-wrap: wrap; + } +} .pricing-name-details { font-family: "Poppins"; font-size: 12px; diff --git a/src/Styles/BookingScreen/Template/BSLayout5/BSLayout5.scss b/src/Styles/BookingScreen/Template/BSLayout5/BSLayout5.scss index cc03414..3ea579e 100644 --- a/src/Styles/BookingScreen/Template/BSLayout5/BSLayout5.scss +++ b/src/Styles/BookingScreen/Template/BSLayout5/BSLayout5.scss @@ -137,6 +137,45 @@ } } +.Layout-IfNavbar3 { + display: flex; + width: 100%; + justify-content: space-around; + font-weight: 600; + align-items: center; + gap: 2px; + padding: 2px 6px; + background: linear-gradient(to bottom right, #2a3447, #1e2536); + .SalesCountComponent-Master { + color: #fff; + } + .keyboardShortcut { + background-color: #fff; + height: 25px; + border-radius: 4px; + cursor: pointer; + > div { + padding: 3px 10px !important; + } + } + .allpageSettingIcon { + background-color: #fff !important; + } + .price-change-btn { + background-color: #fff; + height: 25px; + width: 45px; + img { + height: 20px !important; + } + } + + @media (max-width: 500px) { + font-size: 10px; + flex-wrap: wrap; + } +} + .pricing-name-details { font-family: "Poppins"; font-size: 12px; diff --git a/src/Styles/BookingScreen/Template/BSLayout6/BSLayout6.scss b/src/Styles/BookingScreen/Template/BSLayout6/BSLayout6.scss index 73cea55..3f85cda 100644 --- a/src/Styles/BookingScreen/Template/BSLayout6/BSLayout6.scss +++ b/src/Styles/BookingScreen/Template/BSLayout6/BSLayout6.scss @@ -240,6 +240,44 @@ } } +.Layout-IfNavbar3 { + display: flex; + width: 100%; + justify-content: space-around; + font-weight: 600; + align-items: center; + gap: 2px; + padding: 2px 6px; + background: linear-gradient(to bottom right, #2a3447, #1e2536); + .SalesCountComponent-Master { + color: #fff; + } + .keyboardShortcut { + background-color: #fff; + height: 25px; + border-radius: 4px; + cursor: pointer; + > div { + padding: 3px 10px !important; + } + } + .allpageSettingIcon { + background-color: #fff !important; + } + .price-change-btn { + background-color: #fff; + height: 25px; + width: 45px; + img { + height: 20px !important; + } + } + + @media (max-width: 500px) { + font-size: 10px; + flex-wrap: wrap; + } +} .pricing-name-details { font-family: "Poppins"; font-size: 12px; diff --git a/src/routesConfig.jsx b/src/routesConfig.jsx index 6a699c7..e20568d 100644 --- a/src/routesConfig.jsx +++ b/src/routesConfig.jsx @@ -684,7 +684,7 @@ const initSession = () => { sessionStorage.setItem( 'auth', - 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiODA3MjMyOTE1MyIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTIiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTQiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiXSwiZXhwIjoxNzcyNzM4MDkxLCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMDEifQ.mz8gjByjlstvHvhKoSbHJsQjBYf7f3w1NatAepRx-Ro' + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiODA3MjMyOTE1MyIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTIiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTQiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiXSwiZXhwIjoxNzczNDI3NTExLCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMDEifQ.Elg8MMqbF4nMYwcWgzrxVaLfYhxdx3drixoV83RbuAM' ); };