From 76c6d44ef33c087fee945ca4ddf9e29c637ee08c Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 25 Feb 2026 16:24:29 +0530 Subject: [PATCH 1/2] Solved Issue --- src/App.jsx | 149 +- .../BSBillingTable1/BSBillingTable1.jsx | 442 +-- .../BSBillingTable2/BsBill2.jsx | 138 +- .../BSBillingTable5/BSBillingTable5.jsx | 1 + .../BSBillingTable5/BsBill.jsx | 765 ++--- .../BSBillingTable7/BSBillingTable7.jsx | 406 +-- .../StandardTable/StandardTablePayment.jsx | 57 +- .../Components/BSCombo/BSC1NavBar.jsx | 313 +- .../Components/BSCombo/BSC1Payment.jsx | 2828 ++++++++--------- .../Components/BSCombo/BSC1Search.jsx | 957 +++--- .../Components/BSItemCards/BSItemCard.jsx | 1008 +++--- .../BSItemCards/BsBookingitemCard.jsx | 622 ++-- .../Components/BSNavbar/BSNavBarUserInfo.jsx | 108 +- .../Components/BSNavbar/BSNavbar1.jsx | 1252 ++++---- .../Components/BSNavbar/BSNavbar2.jsx | 1290 ++++---- .../Components/BSNavbar/BSNavbar3.jsx | 1142 ++++--- .../OtherServiceMobilePrint.jsx | 183 +- .../BookingFunctionality/SplitPayment.jsx | 353 +- .../UtillComponents/AllSalesPageSettings.jsx | 3 +- .../Template/BSLayout1/BSLayout1.jsx | 2 +- .../Template/BSLayout2/BSLayout2.jsx | 4 +- .../Template/BSLayout7/BSCombo1.jsx | 81 +- .../Template/SalesCountForStandard.jsx | 1351 ++++---- src/Pages/DashBoard/RetailDashboard.jsx | 266 +- .../DashBoard/TopSellingProductsChart.jsx | 6 +- src/Pages/StockMaster/StockForm.jsx | 1148 +++---- .../BSBillingEditQuantity.scss | 15 +- .../BSBillingTable1/BSBPayment.scss | 40 +- .../BSBillingTable4/BSBillingTable4.scss | 4 +- .../BSBillingTable5/BSBillingTable15.scss | 52 +- .../BSBillingTable6/BST6Payment.scss | 37 +- .../BSBillingTable7/BSBillingTable7.scss | 42 +- .../BSBillingTables3/BSBillingTable3.scss | 2 + .../Components/BSItemCards/BSItemCard.scss | 114 +- .../Components/BSNavbar/BSNavbar2.scss | 4 + .../Components/BSNavbar/BSNavbar3.scss | 1 + .../Template/BSLayout3/BSLayout3.scss | 4 +- .../Template/BSLayout7/BSC1Search.scss | 64 +- .../Template/BSLayout7/Combo1.scss | 44 +- src/Styles/Stock/StockMaster.scss | 68 +- src/main.jsx | 6 - 41 files changed, 7585 insertions(+), 7787 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index f56faf2..c30c163 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -10,8 +10,12 @@ import { routesConfig } from './routesConfig'; import { GlobalItemCard } from './Features/BookingScreen/BookingData/BookingData.js'; import { clearSession, getSession } from './Services/Others.js'; -const KisokSelBooking = lazy(() => import('./Pages/SelfBooking/KisokSelBooking')); -const IndividualBooking = lazy(() => import('./Pages/SelfBooking/IndividualBooking')); +const KisokSelBooking = lazy( + () => import('./Pages/SelfBooking/KisokSelBooking') +); +const IndividualBooking = lazy( + () => import('./Pages/SelfBooking/IndividualBooking') +); const commonSubDir = import.meta.env.ENV_COMMON_BASE_URL; const subDirectory = import.meta.env.ENV_BASE_URL; @@ -23,13 +27,13 @@ import useSubscriptionManager from './useSubscriptionManager.js'; import useSessionManager from './useSessionManager.js'; import ExtendSubscriptionModal from './Pages/ExtentedModal/ExtendSubscriptionModal.jsx'; -const isCapacitor = () => !!(window.Capacitor?.isNativePlatform?.()); +const isCapacitor = () => !!window.Capacitor?.isNativePlatform?.(); // ✅ Define your home/exit pages here const HOME_PAGES = [ '/landing-page/home', '/home/landing-page/home', - 'app-page/home', // android minimize + 'app-page/home', // android minimize ]; const LOGIN_PAGES = ['signin', 'login', 'auth']; @@ -37,7 +41,14 @@ const LOGIN_PAGES = ['signin', 'login', 'auth']; const AppRoutes = () => { const ItemCard = useSelector(GlobalItemCard); const { sessionData, logout } = useSessionManager(ItemCard); - const { remainingDays, handleCancel, freeExtend, extendModel,handlePay, setExtendModel } = useSubscriptionManager(sessionData, logout); + const { + remainingDays, + handleCancel, + freeExtend, + extendModel, + handlePay, + setExtendModel, + } = useSubscriptionManager(sessionData, logout); const location = useLocation(); const navigate = useNavigate(); @@ -56,7 +67,7 @@ const AppRoutes = () => { const path = location.pathname + (location.search || ''); // Don't track login pages - if (LOGIN_PAGES.some(p => path.includes(p))) return; + if (LOGIN_PAGES.some((p) => path.includes(p))) return; const raw = sessionStorage.getItem('navStack'); let stack = raw ? JSON.parse(raw) : []; @@ -78,7 +89,7 @@ const AppRoutes = () => { const currentPath = location.pathname; // On home page — just stay, don't redirect - if (HOME_PAGES.some(p => currentPath.includes(p))) { + if (HOME_PAGES.some((p) => currentPath.includes(p))) { window.history.go(1); // stay here return; } @@ -104,77 +115,77 @@ const AppRoutes = () => { useEffect(() => { if (!isMobile && !isIOS && !isCapacitor()) return; - const handler = async () => { + let backButtonListener; + + const setupBackButton = async () => { try { - const currentPath = location.pathname + (location.search || ''); - console.log('🔙 Back pressed:', currentPath); + backButtonListener = await CapacitorApp.addListener( + 'backButton', + async () => { + try { + const currentPath = location.pathname + (location.search || ''); + console.log('🔙 Back pressed:', currentPath); - // ✅ On home page - if (HOME_PAGES.some(p => currentPath.includes(p))) { - if (isCapacitor()) { - console.log('📱 Minimizing app'); - await CapacitorApp.minimizeApp(); // minimize — not exit + // 🏠 Home page → minimize + if (HOME_PAGES.some((p) => currentPath.includes(p))) { + if (isCapacitor()) { + await CapacitorApp.minimizeApp(); + } + return; + } + + // 🚪 Login page → exit + if (LOGIN_PAGES.some((p) => currentPath.includes(p))) { + if (isCapacitor()) { + await CapacitorApp.exitApp(); + } + return; + } + + const raw = sessionStorage.getItem('navStack'); + let stack = raw ? JSON.parse(raw) : []; + + while (stack.length && stack[stack.length - 1] === currentPath) { + stack.pop(); + } + + if (stack.length) { + const previous = stack[stack.length - 1]; + + if (LOGIN_PAGES.some((p) => previous.includes(p))) { + const home = '/landing-page/home'; + sessionStorage.setItem('navStack', JSON.stringify([home])); + isBackNav.current = true; + navigate(home); + return; + } + + sessionStorage.setItem('navStack', JSON.stringify(stack)); + isBackNav.current = true; + navigate(previous); + } else { + const home = '/landing-page/home'; + sessionStorage.setItem('navStack', JSON.stringify([home])); + isBackNav.current = true; + navigate(home); + } + } catch (err) { + console.error('Back handler error:', err); + navigate('/landing-page/home'); + } } - return; - } - - // ✅ On login page → exit app - if (LOGIN_PAGES.some(p => currentPath.includes(p))) { - console.log('🚪 Exiting app'); - if (isCapacitor()) await CapacitorApp.exitApp(); - return; - } - - // ✅ Get stack and go back one by one - const raw = sessionStorage.getItem('navStack'); - let stack = raw ? JSON.parse(raw) : []; - - // Remove current path from top - while (stack.length > 0 && stack[stack.length - 1] === currentPath) { - stack.pop(); - } - - if (stack.length > 0) { - const previous = stack[stack.length - 1]; - - // If previous is login → go to home instead - if (LOGIN_PAGES.some(p => previous.includes(p))) { - console.log('⬅️ Previous was login → going home'); - const home = '/landing-page/home'; - sessionStorage.setItem('navStack', JSON.stringify([home])); - isBackNav.current = true; - navigate(home); - return; - } - - console.log('⬅️ Back to:', previous); - sessionStorage.setItem('navStack', JSON.stringify(stack)); - isBackNav.current = true; // ✅ Prevent loop - navigate(previous); - - } else { - // Stack empty → go home - const home = '/landing-page/home'; - console.log('📭 Stack empty → home'); - sessionStorage.setItem('navStack', JSON.stringify([home])); - isBackNav.current = true; - navigate(home); - } - } catch (e) { - console.error('Back error:', e); - navigate('/landing-page/home'); + ); + } catch (err) { + console.error('Listener error:', err); } }; - let listener; - try { - listener = CapacitorApp.addListener('backButton', handler); - } catch (e) {} + setupBackButton(); return () => { try { - if (listener?.remove) listener.remove(); - } catch (e) {} + backButtonListener?.remove(); + } catch (err) {} }; }, [navigate, location.pathname, location.search]); diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBillingTable1.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBillingTable1.jsx index fe5830d..2a99898 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBillingTable1.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBillingTable1.jsx @@ -156,8 +156,8 @@ const BSBillingTable1 = () => { OrderType === 'Hold' ? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway') : tableData?.filter( - (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId - ); + (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId + ); const OldtableDataDinein = tableData?.filter( (a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId @@ -165,8 +165,8 @@ const BSBillingTable1 = () => { const OldtableDataTakeAway = OrderType != 'Hold' ? tableData?.filter( - (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId - ) + (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId + ) : []; const [OpenEditTotalAmt, setOpenEditTotalAmt] = useState(false); const [OpenImeiDetail, setOpenImeiDetail] = useState(false); @@ -1115,9 +1115,9 @@ const BSBillingTable1 = () => { )?.map((item, idx) => idx === 0 ? { - ...item, - FreeQty, - } + ...item, + FreeQty, + } : item ), }; @@ -1470,7 +1470,7 @@ const BSBillingTable1 = () => { OrderQty: isPaidproduct?.OrderQty, CompleteRemove: true, InwardDtlId: item?.InwardDtlId, - OrderRate:item?.OrderRate, + OrderRate: item?.OrderRate, BuyInwardDtlId: null, Offer: item?.Offer, }); @@ -1506,7 +1506,7 @@ const BSBillingTable1 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: null, Offer: item?.Offer, - OrderRate:item?.OrderRate, + OrderRate: item?.OrderRate, }); await ChangeOfferAppliedProdsFn({ inwardDtlId: item?.InwardDtlId, @@ -1536,7 +1536,7 @@ const BSBillingTable1 = () => { OrderQty: isPaidProductAvailableInCart?.OrderQty, CompleteRemove: true, InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId, - OrderRate:isPaidProductAvailableInCart?.OrderRate, + OrderRate: isPaidProductAvailableInCart?.OrderRate, BuyInwardDtlId: null, Offer: 0, }); @@ -1622,7 +1622,7 @@ const BSBillingTable1 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: null, Offer: item?.Offer, - OrderRate:item?.OrderRate, + OrderRate: item?.OrderRate, }); await ChangeFreeprodlistFn({ OverAllFreeQty: freeProdList?.OverAllFreeQty, @@ -1649,7 +1649,7 @@ const BSBillingTable1 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: null, Offer: item?.Offer, - OrderRate:item?.OrderRate, + OrderRate: item?.OrderRate, }); await ChangeFreeprodlistFn({ OverAllFreeQty: freeProdList?.OverAllFreeQty, @@ -1982,7 +1982,7 @@ const BSBillingTable1 = () => { CompleteRemove: true, InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: item?.InwardDtlId, - OrderRate:item?.OrderRate, + OrderRate: item?.OrderRate, Offer: item?.Offer, }); await ChangeFreeprodlistFn({ @@ -2001,7 +2001,7 @@ const BSBillingTable1 = () => { CompleteRemove: true, InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: item?.InwardDtlId, - OrderRate:item?.OrderRate, + OrderRate: item?.OrderRate, Offer: item?.Offer, }); await ChangeFreeprodlistFn({ @@ -2144,7 +2144,7 @@ const BSBillingTable1 = () => { OpenEditTotalAmount(); } }} - // onClick={tableData?.length>0? OpenEditTotalAmount :""} + // onClick={tableData?.length>0? OpenEditTotalAmount :""} > {!isMobile ? ( Qty @@ -2252,10 +2252,11 @@ const BSBillingTable1 = () => { {OldtableDataTakeAway?.map((item, index) => ( { ? item?.SalesId && OrderType !== 'Hold' ? 'rgb(243, 248, 213)' : triggerAnimation && - index === 0 && - !item?.SalesId && - tableDataTakeAway?.length >= - PreviousdataLength + index === 0 && + !item?.SalesId && + tableDataTakeAway?.length >= + PreviousdataLength ? 'wheat' : triggerAnimation && - index === 0 && - tableDataTakeAway?.length >= - PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + index === 0 && + tableDataTakeAway?.length >= + PreviousdataLength && + !HoldOrderDtl && + !UnpaidData ? 'wheat' : 'inherit' : 'none', @@ -2284,18 +2285,18 @@ const BSBillingTable1 = () => { item?.SalesId && OrderType !== 'Hold' ? 'rgb(243, 248, 213)' : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + - ' ' + - item?.BookingTypeName - ) + GlobProdwisedata?.includes( + item?.InwardDtlId + + ' ' + + item?.BookingTypeName + ) ? '#b2d1f7' : index % 2 === 0 ? 'white' : SelectedBillColor?.['OverallBackgroundColor'] ? SelectedBillColor?.[ - 'OverallBackgroundColor' - ] + 'OverallBackgroundColor' + ] : '#d6d6d6', animation: BillOrderPre === 'Y' && !BookingTypeBoth @@ -2348,7 +2349,7 @@ const BSBillingTable1 = () => { }} onClick={() => item.FullProductIdentifierDtls?.length > 0 || - item.ProductIdentifierDtls?.length > 0 + item.ProductIdentifierDtls?.length > 0 ? handleImeiDetails(item) : editField && handleEditQuantity(item) } @@ -2399,21 +2400,21 @@ const BSBillingTable1 = () => { {productBasedExtraCharges?.find( (find) => find.ProdId === item.ProdId ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} )} {tableitem.OptionName == 'MRP' && ( @@ -2508,11 +2509,11 @@ const BSBillingTable1 = () => { > {allowDecimal ? Number( - item?.TotalAmt - (item?.Offer || 0) || 0 - ).toFixed(2) + item?.TotalAmt - (item?.Offer || 0) || 0 + ).toFixed(2) : Number( - item?.TotalAmt - (item?.Offer || 0) || 0 - )} + item?.TotalAmt - (item?.Offer || 0) || 0 + )} )} @@ -2547,10 +2548,11 @@ const BSBillingTable1 = () => { {OldtableDataDinein?.map((item, index) => ( { ? item?.SalesId ? 'rgb(243, 248, 213)' : BookingType === 'Dine In' && - triggerAnimation && - OldtableDataTakeAway?.length + index === 0 && - !item?.SalesId && - tableDataDinein?.length >= PreviousdataLength + triggerAnimation && + OldtableDataTakeAway?.length + index === 0 && + !item?.SalesId && + tableDataDinein?.length >= PreviousdataLength ? 'wheat' : BookingType !== 'Dine In' && - triggerAnimation && - OldtableDataTakeAway?.length + index === - 0 && - tableDataDinein?.length >= - PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + triggerAnimation && + OldtableDataTakeAway?.length + index === + 0 && + tableDataDinein?.length >= + PreviousdataLength && + !HoldOrderDtl && + !UnpaidData ? 'wheat' : 'inherit' : 'none', background: item?.SalesId ? 'rgb(243, 248, 213)' : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + ' ' + item?.BookingTypeName - ) + GlobProdwisedata?.includes( + item?.InwardDtlId + ' ' + item?.BookingTypeName + ) ? '#b2d1f7' : (OldtableDataTakeAway?.length + index) % 2 === 0 ? 'white' @@ -2690,21 +2692,21 @@ const BSBillingTable1 = () => { {productBasedExtraCharges?.find( (find) => find.ProdId === item.ProdId ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} )} {tableitem.OptionName == 'MRP' && ( @@ -2799,11 +2801,11 @@ const BSBillingTable1 = () => { > {allowDecimal ? Number( - item?.TotalAmt - (item?.Offer || 0) || 0 - ).toFixed(2) + item?.TotalAmt - (item?.Offer || 0) || 0 + ).toFixed(2) : Number( - item?.TotalAmt - (item?.Offer || 0) || 0 - )} + item?.TotalAmt - (item?.Offer || 0) || 0 + )} )} @@ -2843,10 +2845,11 @@ const BSBillingTable1 = () => { OldtableDataTakeAway?.length + index } - className={`${BookingType === 'Dine In' && item?.SalesId - ? 'Billing-Table1-row-disabled' - : 'Billing-Table1-row' - } + className={`${ + BookingType === 'Dine In' && item?.SalesId + ? 'Billing-Table1-row-disabled' + : 'Billing-Table1-row' + } `} style={{ @@ -2857,44 +2860,44 @@ const BSBillingTable1 = () => { ? BookingType === 'Dine In' && item?.SalesId ? 'rgb(243, 248, 213)' : BookingType === 'Dine In' && - triggerAnimation && - OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index === - 0 && - !item?.SalesId && - tableDataTakeAway?.length >= - PreviousdataLength - ? 'wheat' - : BookingType !== 'Dine In' && triggerAnimation && OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index === - 0 && + OldtableDataTakeAway?.length + + index === + 0 && + !item?.SalesId && tableDataTakeAway?.length >= - PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + PreviousdataLength + ? 'wheat' + : BookingType !== 'Dine In' && + triggerAnimation && + OldtableDataDinein?.length + + OldtableDataTakeAway?.length + + index === + 0 && + tableDataTakeAway?.length >= + PreviousdataLength && + !HoldOrderDtl && + !UnpaidData ? 'wheat' : (OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index) % - 2 === - 0 + OldtableDataTakeAway?.length + + index) % + 2 === + 0 ? 'white' : SelectedBillColor?.[ - 'OverallBackgroundColor' - ] + 'OverallBackgroundColor' + ] ? SelectedBillColor?.[ - 'OverallBackgroundColor' - ] + 'OverallBackgroundColor' + ] : '#d6d6d6' : (OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index) % - 2 === - 0 + OldtableDataTakeAway?.length + + index) % + 2 === + 0 ? 'white' : SelectedBillColor?.['OverallBackgroundColor'] ? SelectedBillColor?.['OverallBackgroundColor'] @@ -2903,30 +2906,30 @@ const BSBillingTable1 = () => { BookingType === 'Dine In' && item?.SalesId ? 'rgb(243, 248, 213)' : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + - ' ' + - item?.BookingTypeName - ) + GlobProdwisedata?.includes( + item?.InwardDtlId + + ' ' + + item?.BookingTypeName + ) ? '#b2d1f7' : (OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index) % - 2 === - 0 + OldtableDataTakeAway?.length + + index) % + 2 === + 0 ? 'white' : SelectedBillColor?.['OverallBackgroundColor'] ? SelectedBillColor?.[ - 'OverallBackgroundColor' - ] + 'OverallBackgroundColor' + ] : '#d6d6d6', animation: BillOrderPre === 'Y' && !BookingTypeBoth ? triggerAnimation && OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index === - 0 && + OldtableDataTakeAway?.length + + index === + 0 && !item?.SalesId && tableDataTakeAway?.length >= PreviousdataLength && !HoldOrderDtl && @@ -2977,7 +2980,7 @@ const BSBillingTable1 = () => { }} onClick={() => item.FullProductIdentifierDtls?.length > 0 || - item.ProductIdentifierDtls?.length > 0 + item.ProductIdentifierDtls?.length > 0 ? handleImeiDetails(item) : editField && handleEditQuantity(item) } @@ -2998,8 +3001,8 @@ const BSBillingTable1 = () => { {!item?.ProdVariantName?.toLowerCase()?.includes( 'variant' ) && ( - {item?.ProdVariantName} - )} + {item?.ProdVariantName} + )} {item?.Size} {item?.SinglePc == 'Y' ? 'PCS' @@ -3034,21 +3037,21 @@ const BSBillingTable1 = () => { {productBasedExtraCharges?.find( (find) => find.ProdId === item.ProdId ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} )} {tableitem.OptionName == 'MRP' && ( @@ -3143,11 +3146,11 @@ const BSBillingTable1 = () => { > {allowDecimal ? Number( - item?.TotalAmt - (item?.Offer || 0) || 0 - ).toFixed(2) + item?.TotalAmt - (item?.Offer || 0) || 0 + ).toFixed(2) : Number( - item?.TotalAmt - (item?.Offer || 0) || 0 - )} + item?.TotalAmt - (item?.Offer || 0) || 0 + )} )} @@ -3188,10 +3191,11 @@ const BSBillingTable1 = () => { tableDataTakeAway?.length + index } - className={`${BookingType === 'Dine In' && item?.SalesId - ? 'Billing-Table1-row-disabled' - : 'Billing-Table1-row' - } + className={`${ + BookingType === 'Dine In' && item?.SalesId + ? 'Billing-Table1-row-disabled' + : 'Billing-Table1-row' + } `} style={{ @@ -3204,61 +3208,61 @@ const BSBillingTable1 = () => { !BookingTypeBoth ? 'rgb(243, 248, 213)' : BookingType === 'Dine In' && - triggerAnimation && - OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index === - 0 && - !item?.SalesId && - tableDataDinein?.length >= PreviousdataLength - ? 'wheat' - : BookingType !== 'Dine In' && triggerAnimation && OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index === - 0 && - tableDataDinein?.length >= - PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index === + 0 && + !item?.SalesId && + tableDataDinein?.length >= PreviousdataLength + ? 'wheat' + : BookingType !== 'Dine In' && + triggerAnimation && + OldtableDataTakeAway?.length + + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index === + 0 && + tableDataDinein?.length >= + PreviousdataLength && + !HoldOrderDtl && + !UnpaidData ? 'wheat' : 'inherit' : 'none', background: BookingType === 'Dine In' && - item?.SalesId && - !BookingTypeBoth + item?.SalesId && + !BookingTypeBoth ? 'rgb(243, 248, 213)' : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + - ' ' + - item?.BookingTypeName - ) + GlobProdwisedata?.includes( + item?.InwardDtlId + + ' ' + + item?.BookingTypeName + ) ? '#b2d1f7' : (OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index) % - 2 === - 0 + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index) % + 2 === + 0 ? 'white' : SelectedBillColor?.['OverallBackgroundColor'] ? SelectedBillColor?.[ - 'OverallBackgroundColor' - ] + 'OverallBackgroundColor' + ] : '#d6d6d6', animation: BillOrderPre === 'Y' && !BookingTypeBoth ? triggerAnimation && OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index === - 0 && + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index === + 0 && !item?.SalesId && tableDataDinein?.length >= PreviousdataLength && !HoldOrderDtl && @@ -3360,21 +3364,21 @@ const BSBillingTable1 = () => { {productBasedExtraCharges?.find( (find) => find.ProdId === item.ProdId ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} )} {tableitem.OptionName == 'MRP' && ( @@ -3469,11 +3473,11 @@ const BSBillingTable1 = () => { > {allowDecimal ? Number( - item?.TotalAmt - (item?.Offer || 0) || 0 - ).toFixed(2) + item?.TotalAmt - (item?.Offer || 0) || 0 + ).toFixed(2) : Number( - item?.TotalAmt - (item?.Offer || 0) || 0 - )} + item?.TotalAmt - (item?.Offer || 0) || 0 + )} )} diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BsBill2.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BsBill2.jsx index fbe9019..9b77ed9 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BsBill2.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BsBill2.jsx @@ -130,14 +130,24 @@ const BsBill2 = () => { const productBasedExtraCharges = GlobalExtraCharge.filter( (obj) => 'ProdName' in obj ); - const overAllLimitPreferenece = - preferenceDatas?.[0]?.['SettingDtlDetails']?.find( - (item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y'); - const itemWiseLimitPreferenece = - preferenceDatas?.[0]?.['SettingDtlDetails']?.find( - (item) => item.SettingIdName?.toLowerCase() === 'itemwiselimit' && item?.SettingValue === 'Y'); - const maxQtyLimit = itemWiseLimitPreferenece?.SettingCount || overAllLimitPreferenece?.SettingCount || null; - + const overAllLimitPreferenece = preferenceDatas?.[0]?.[ + 'SettingDtlDetails' + ]?.find( + (item) => + item.SettingIdName?.toLowerCase() === 'overalllimit' && + item?.SettingValue === 'Y' + ); + const itemWiseLimitPreferenece = preferenceDatas?.[0]?.[ + 'SettingDtlDetails' + ]?.find( + (item) => + item.SettingIdName?.toLowerCase() === 'itemwiselimit' && + item?.SettingValue === 'Y' + ); + const maxQtyLimit = + itemWiseLimitPreferenece?.SettingCount || + overAllLimitPreferenece?.SettingCount || + null; const tableDataDinein = CartOrderDetails?.filter( (a, b) => a.BookingTypeName === 'Dine In' && !a?.SalesId @@ -283,8 +293,8 @@ const BsBill2 = () => { if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) { if (overAllLimitPreferenece) { const calculatedOverAllQty = calculateOverAllQtyLimit(CartOrderDetails); - if ((calculatedOverAllQty + 1) > maxQtyLimit) { - message.warning(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`) + if (calculatedOverAllQty + 1 > maxQtyLimit) { + message.warning(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`); return; } @@ -1463,31 +1473,23 @@ const BsBill2 = () => {
- {/* decline(item)} /> */} - Loading...}> - decline(item)} /> - + decline(item)} /> + {' '} {item?.StockAvailable === 'Y' ? ( returnCount(item) > 0 && ( - Loading...}> - increase(item)} /> - + increase(item)} /> ) ) : ( - Loading...}> - increase(item)} /> - + increase(item)} /> )} - Loading Edit...}> - handleEditQuantity(item)} - /> - + handleEditQuantity(item)} + />
@@ -1688,30 +1690,22 @@ const BsBill2 = () => {
{/* decline(item)} /> */} - Loading...}> - decline(item)} /> - + decline(item)} /> {' '} {item?.StockAvailable === 'Y' ? ( returnCount(item) > 0 && ( - Loading...}> - increase(item)} /> - + increase(item)} /> ) ) : ( - Loading...}> - increase(item)} /> - + increase(item)} /> )} - Loading Edit...}> - handleEditQuantity(item)} - /> - + handleEditQuantity(item)} + />
@@ -1946,28 +1940,12 @@ const BsBill2 = () => {
- Loading...}> - decline(item)} /> - + decline(item)} /> {' '} {item?.StockAvailable === 'Y' ? ( returnCount(item) > 0 && ( - Loading...}> - - item.Type == 'P' || item.Type == 'C' - ? increase(item) - : item.ServiceType == 'G' - ? increase(item) - : '' - } - /> - - ) - ) : ( - Loading...}> item.Type == 'P' || item.Type == 'C' @@ -1977,15 +1955,23 @@ const BsBill2 = () => { : '' } /> - + ) + ) : ( + + item.Type == 'P' || item.Type == 'C' + ? increase(item) + : item.ServiceType == 'G' + ? increase(item) + : '' + } + /> )} - Loading Edit...}> - handleEditQuantity(item)} - /> - + handleEditQuantity(item)} + />
@@ -2205,30 +2191,22 @@ const BsBill2 = () => {
- Loading...}> - decline(item)} /> - + decline(item)} /> {' '} {item?.StockAvailable === 'Y' ? ( returnCount(item) > 0 && ( - Loading...}> - increase(item)} /> - + increase(item)} /> ) ) : ( - Loading...}> - increase(item)} /> - + increase(item)} /> )} - Loading Edit...}> - handleEditQuantity(item)} - /> - + handleEditQuantity(item)} + />
diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BSBillingTable5.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BSBillingTable5.jsx index 43c2995..f954d9d 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BSBillingTable5.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BSBillingTable5.jsx @@ -14,6 +14,7 @@ import defaultupi from '../../../../../Images/defaultupi.png'; import pozologoimg from '../../../../../Images/pozologoimg.png'; import paydevice from '../../../../../Images/paydevice.png'; import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTable5/BSBillingTable15.scss'; +import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTables3/BSBillingTable3.scss'; import { isMobile } from 'react-device-detect'; import { GlobalSelectedFont, diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BsBill.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BsBill.jsx index 25c95a4..de07fcd 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BsBill.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable5/BsBill.jsx @@ -128,7 +128,8 @@ const BsBill = () => { const GetCustId = useSelector(GlobalCustId); const selectedCustomer = useSelector(GlobalSelOption); - const [customerPriceHistoryOpen, setCustomerPriceHistoryOpen] = useState(false); + const [customerPriceHistoryOpen, setCustomerPriceHistoryOpen] = + useState(false); const [customerProduct, setCustomerProduct] = useState(null); const [PreviousdataLength, setPreviousdataLength] = useState(PreviousOrderLength); @@ -145,14 +146,24 @@ const BsBill = () => { const OrderType = useSelector(GlobalOrderType); const GlobEstBooking = useSelector(GlobalEstimateBooking); const GlobalExtraCharge = useSelector(globalExtraTotalAmount); - const overAllLimitPreferenece = - preferenceDatas?.[0]?.['SettingDtlDetails']?.find( - (item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y'); - const itemWiseLimitPreferenece = - preferenceDatas?.[0]?.['SettingDtlDetails']?.find( - (item) => item.SettingIdName?.toLowerCase() === 'itemwiselimit' && item?.SettingValue === 'Y'); - const maxQtyLimit = itemWiseLimitPreferenece?.SettingCount || overAllLimitPreferenece?.SettingCount || null; - + const overAllLimitPreferenece = preferenceDatas?.[0]?.[ + 'SettingDtlDetails' + ]?.find( + (item) => + item.SettingIdName?.toLowerCase() === 'overalllimit' && + item?.SettingValue === 'Y' + ); + const itemWiseLimitPreferenece = preferenceDatas?.[0]?.[ + 'SettingDtlDetails' + ]?.find( + (item) => + item.SettingIdName?.toLowerCase() === 'itemwiselimit' && + item?.SettingValue === 'Y' + ); + const maxQtyLimit = + itemWiseLimitPreferenece?.SettingCount || + overAllLimitPreferenece?.SettingCount || + null; const OtherServicesglobal = useSelector(GlobalOtherSevices); @@ -163,16 +174,16 @@ const BsBill = () => { OrderType === 'Hold' ? TableData?.filter((a, b) => a.BookingTypeName === 'TakeAway') : TableData?.filter( - (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId - ); + (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId + ); const OldtableDataDinein = TableData?.filter( (a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId ); const OldtableDataTakeAway = OrderType != 'Hold' ? TableData?.filter( - (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId - ) + (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId + ) : []; const BillOrderPre = preferenceDatas?.[0]?.SettingDtlDetails?.find( (item) => item.SettingIdName === 'BillItemsOrder' @@ -827,9 +838,9 @@ const BsBill = () => { )?.map((item, idx) => idx === 0 ? { - ...item, - FreeQty, - } + ...item, + FreeQty, + } : item ), }; @@ -853,7 +864,6 @@ const BsBill = () => { e?.BookingTypeName != item?.BookingTypeName ); - if (TableData?.length <= 1) { await dispatch(changeReorderHoldDetails({})); await dispatch(changeReorderProductDetails([])); @@ -1726,7 +1736,6 @@ const BsBill = () => { } } } - }; // const removeFromCart = async (item) => { // setPreviousdataLength(TableData?.length); @@ -1988,7 +1997,6 @@ const BsBill = () => { event.preventDefault(); handleShortcut('weightAmount'); } - }; window.addEventListener('keydown', handleKeyDown); @@ -2140,11 +2148,10 @@ const BsBill = () => { setMessageType(null); }, []); const increase = async (item) => { - if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) { if (overAllLimitPreferenece) { const calculatedOverAllQty = calculateOverAllQtyLimit(TableData); - if ((calculatedOverAllQty + 1) > maxQtyLimit) { + if (calculatedOverAllQty + 1 > maxQtyLimit) { setMessageData(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`); setMessageType('warning'); return; @@ -2211,26 +2218,26 @@ const BsBill = () => { if (isItemInCart && BookingTypeProd != 'Dine In' && OrderType != 'Hold') { if (BillOrderPre === 'Y') { const UpdatedCartItem = - // if the item is already in the cart, increase the quantity of the item - { - ...isItemInCart, - OrderQty: isItemInCart?.OrderQty + 1, - TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate, - TaxAmt: ( - ((isItemInCart?.OrderQty + 1) * - isItemInCart?.OrderRate * - isItemInCart?.TaxPercentage) / - (100 + isItemInCart?.TaxPercentage) - ).toFixed(2), - WithoutTaxRate: - (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate - - ( + // if the item is already in the cart, increase the quantity of the item + { + ...isItemInCart, + OrderQty: isItemInCart?.OrderQty + 1, + TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate, + TaxAmt: ( ((isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate * isItemInCart?.TaxPercentage) / (100 + isItemInCart?.TaxPercentage) ).toFixed(2), - }; + WithoutTaxRate: + (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate - + ( + ((isItemInCart?.OrderQty + 1) * + isItemInCart?.OrderRate * + isItemInCart?.TaxPercentage) / + (100 + isItemInCart?.TaxPercentage) + ).toFixed(2), + }; const UpdatedData = [UpdatedCartItem, ...OtherorderDataforNormal]; @@ -2241,26 +2248,26 @@ const BsBill = () => { } } else { const UpdatedCartItem = - // if the item is already in the cart, increase the quantity of the item - { - ...isItemInCart, - OrderQty: isItemInCart?.OrderQty + 1, - TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate, - TaxAmt: ( - ((isItemInCart?.OrderQty + 1) * - isItemInCart?.OrderRate * - isItemInCart?.TaxPercentage) / - (100 + isItemInCart?.TaxPercentage) - ).toFixed(2), - WithoutTaxRate: - (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate - - ( + // if the item is already in the cart, increase the quantity of the item + { + ...isItemInCart, + OrderQty: isItemInCart?.OrderQty + 1, + TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate, + TaxAmt: ( ((isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate * isItemInCart?.TaxPercentage) / (100 + isItemInCart?.TaxPercentage) ).toFixed(2), - }; + WithoutTaxRate: + (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate - + ( + ((isItemInCart?.OrderQty + 1) * + isItemInCart?.OrderRate * + isItemInCart?.TaxPercentage) / + (100 + isItemInCart?.TaxPercentage) + ).toFixed(2), + }; const UpdatedData = [...OtherorderDataforNormal, UpdatedCartItem]; @@ -2279,26 +2286,26 @@ const BsBill = () => { ) { if (BillOrderPre === 'Y') { const UpdatedCartItem = - // if the item is already in the cart, increase the quantity of the item - { - ...isItemInCart, - OrderQty: isItemInCart?.OrderQty + 1, - TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate, - TaxAmt: ( - ((isItemInCart?.OrderQty + 1) * - isItemInCart?.OrderRate * - isItemInCart?.TaxPercentage) / - (100 + isItemInCart?.TaxPercentage) - ).toFixed(2), - WithoutTaxRate: - (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate - - ( + // if the item is already in the cart, increase the quantity of the item + { + ...isItemInCart, + OrderQty: isItemInCart?.OrderQty + 1, + TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate, + TaxAmt: ( ((isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate * isItemInCart?.TaxPercentage) / (100 + isItemInCart?.TaxPercentage) ).toFixed(2), - }; + WithoutTaxRate: + (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate - + ( + ((isItemInCart?.OrderQty + 1) * + isItemInCart?.OrderRate * + isItemInCart?.TaxPercentage) / + (100 + isItemInCart?.TaxPercentage) + ).toFixed(2), + }; const UpdatedData = [UpdatedCartItem, ...OtherorderDataforNormal]; @@ -2309,26 +2316,26 @@ const BsBill = () => { } } else { const UpdatedCartItem = - // if the item is already in the cart, increase the quantity of the item - { - ...isItemInCart, - OrderQty: isItemInCart?.OrderQty + 1, - TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate, - TaxAmt: ( - ((isItemInCart?.OrderQty + 1) * - isItemInCart?.OrderRate * - isItemInCart?.TaxPercentage) / - (100 + isItemInCart?.TaxPercentage) - ).toFixed(2), - WithoutTaxRate: - (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate - - ( + // if the item is already in the cart, increase the quantity of the item + { + ...isItemInCart, + OrderQty: isItemInCart?.OrderQty + 1, + TotalAmt: (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate, + TaxAmt: ( ((isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate * isItemInCart?.TaxPercentage) / (100 + isItemInCart?.TaxPercentage) ).toFixed(2), - }; + WithoutTaxRate: + (isItemInCart?.OrderQty + 1) * isItemInCart?.OrderRate - + ( + ((isItemInCart?.OrderQty + 1) * + isItemInCart?.OrderRate * + isItemInCart?.TaxPercentage) / + (100 + isItemInCart?.TaxPercentage) + ).toFixed(2), + }; const UpdatedData = [...OtherorderDataforNormal, UpdatedCartItem]; @@ -2341,27 +2348,27 @@ const BsBill = () => { } else if (isItemInCartHold && OrderType === 'Hold') { if (BillOrderPre === 'Y') { const UpdatedCartItem = - // if the item is already in the cart, increase the quantity of the item - { - ...isItemInCartHold, - OrderQty: isItemInCartHold?.OrderQty + 1, - TotalAmt: - (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate, - TaxAmt: ( - ((isItemInCartHold?.OrderQty + 1) * - isItemInCartHold?.OrderRate * - isItemInCartHold?.TaxPercentage) / - (100 + isItemInCartHold?.TaxPercentage) - ).toFixed(2), - WithoutTaxRate: - (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate - - ( + // if the item is already in the cart, increase the quantity of the item + { + ...isItemInCartHold, + OrderQty: isItemInCartHold?.OrderQty + 1, + TotalAmt: + (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate, + TaxAmt: ( ((isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate * isItemInCartHold?.TaxPercentage) / (100 + isItemInCartHold?.TaxPercentage) ).toFixed(2), - }; + WithoutTaxRate: + (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate - + ( + ((isItemInCartHold?.OrderQty + 1) * + isItemInCartHold?.OrderRate * + isItemInCartHold?.TaxPercentage) / + (100 + isItemInCartHold?.TaxPercentage) + ).toFixed(2), + }; const UpdatedData = [ UpdatedCartItem, @@ -2375,27 +2382,27 @@ const BsBill = () => { } } else { const UpdatedCartItem = - // if the item is already in the cart, increase the quantity of the item - { - ...isItemInCartHold, - OrderQty: isItemInCartHold?.OrderQty + 1, - TotalAmt: - (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate, - TaxAmt: ( - ((isItemInCartHold?.OrderQty + 1) * - isItemInCartHold?.OrderRate * - isItemInCartHold?.TaxPercentage) / - (100 + isItemInCartHold?.TaxPercentage) - ).toFixed(2), - WithoutTaxRate: - (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate - - ( + // if the item is already in the cart, increase the quantity of the item + { + ...isItemInCartHold, + OrderQty: isItemInCartHold?.OrderQty + 1, + TotalAmt: + (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate, + TaxAmt: ( ((isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate * isItemInCartHold?.TaxPercentage) / (100 + isItemInCartHold?.TaxPercentage) ).toFixed(2), - }; + WithoutTaxRate: + (isItemInCartHold?.OrderQty + 1) * isItemInCartHold?.OrderRate - + ( + ((isItemInCartHold?.OrderQty + 1) * + isItemInCartHold?.OrderRate * + isItemInCartHold?.TaxPercentage) / + (100 + isItemInCartHold?.TaxPercentage) + ).toFixed(2), + }; const UpdatedData = [ ...OtherorderDataforNormalWithoutSalesId, @@ -2511,7 +2518,7 @@ const BsBill = () => { const handleCustomerProductPriceHistory = (item) => { setCustomerPriceHistoryOpen(true); setCustomerProduct(item?.ProdId); - } + }; const decline = async (item) => { setPreviousdataLength(TableData?.length); const isItemInCart = TableData?.find( @@ -2587,27 +2594,27 @@ const BsBill = () => { ) { if (BillOrderPre === 'Y') { const UpdatedCartItem = - // if the item is already in the cart, increase the quantity of the item - { - ...isItemInCart, - OrderQty: isItemInCart?.OrderQty - 1, - TotalAmt: - (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate, - TaxAmt: ( - ((isItemInCart?.OrderQty - 1) * - isItemInCart?.OrderRate * - isItemInCart?.TaxPercentage) / - (100 + isItemInCart?.TaxPercentage) - ).toFixed(2), - WithoutTaxRate: - (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate - - ( + // if the item is already in the cart, increase the quantity of the item + { + ...isItemInCart, + OrderQty: isItemInCart?.OrderQty - 1, + TotalAmt: + (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate, + TaxAmt: ( ((isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate * isItemInCart?.TaxPercentage) / (100 + isItemInCart?.TaxPercentage) ).toFixed(2), - }; + WithoutTaxRate: + (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate - + ( + ((isItemInCart?.OrderQty - 1) * + isItemInCart?.OrderRate * + isItemInCart?.TaxPercentage) / + (100 + isItemInCart?.TaxPercentage) + ).toFixed(2), + }; const UpdatedData = [UpdatedCartItem, ...OtherorderDataforNormal]; @@ -2618,27 +2625,27 @@ const BsBill = () => { } } else { const UpdatedCartItem = - // if the item is already in the cart, increase the quantity of the item - { - ...isItemInCart, - OrderQty: isItemInCart?.OrderQty - 1, - TotalAmt: - (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate, - TaxAmt: ( - ((isItemInCart?.OrderQty - 1) * - isItemInCart?.OrderRate * - isItemInCart?.TaxPercentage) / - (100 + isItemInCart?.TaxPercentage) - ).toFixed(2), - WithoutTaxRate: - (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate - - ( + // if the item is already in the cart, increase the quantity of the item + { + ...isItemInCart, + OrderQty: isItemInCart?.OrderQty - 1, + TotalAmt: + (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate, + TaxAmt: ( ((isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate * isItemInCart?.TaxPercentage) / (100 + isItemInCart?.TaxPercentage) ).toFixed(2), - }; + WithoutTaxRate: + (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate - + ( + ((isItemInCart?.OrderQty - 1) * + isItemInCart?.OrderRate * + isItemInCart?.TaxPercentage) / + (100 + isItemInCart?.TaxPercentage) + ).toFixed(2), + }; const UpdatedData = [...OtherorderDataforNormal, UpdatedCartItem]; @@ -2657,27 +2664,27 @@ const BsBill = () => { ) { if (BillOrderPre === 'Y') { const UpdatedCartItem = - // if the item is already in the cart, increase the quantity of the item - { - ...isItemInCart, - OrderQty: isItemInCart?.OrderQty - 1, - TotalAmt: - (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate, - TaxAmt: ( - ((isItemInCart?.OrderQty - 1) * - isItemInCart?.OrderRate * - isItemInCart?.TaxPercentage) / - (100 + isItemInCart?.TaxPercentage) - ).toFixed(2), - WithoutTaxRate: - (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate - - ( + // if the item is already in the cart, increase the quantity of the item + { + ...isItemInCart, + OrderQty: isItemInCart?.OrderQty - 1, + TotalAmt: + (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate, + TaxAmt: ( ((isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate * isItemInCart?.TaxPercentage) / (100 + isItemInCart?.TaxPercentage) ).toFixed(2), - }; + WithoutTaxRate: + (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate - + ( + ((isItemInCart?.OrderQty - 1) * + isItemInCart?.OrderRate * + isItemInCart?.TaxPercentage) / + (100 + isItemInCart?.TaxPercentage) + ).toFixed(2), + }; const UpdatedData = [UpdatedCartItem, ...OtherorderDataforNormal]; if (OfferCheckedInSetup && preferenceOffer) { @@ -2687,27 +2694,27 @@ const BsBill = () => { } } else { const UpdatedCartItem = - // if the item is already in the cart, increase the quantity of the item - { - ...isItemInCart, - OrderQty: isItemInCart?.OrderQty - 1, - TotalAmt: - (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate, - TaxAmt: ( - ((isItemInCart?.OrderQty - 1) * - isItemInCart?.OrderRate * - isItemInCart?.TaxPercentage) / - (100 + isItemInCart?.TaxPercentage) - ).toFixed(2), - WithoutTaxRate: - (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate - - ( + // if the item is already in the cart, increase the quantity of the item + { + ...isItemInCart, + OrderQty: isItemInCart?.OrderQty - 1, + TotalAmt: + (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate, + TaxAmt: ( ((isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate * isItemInCart?.TaxPercentage) / (100 + isItemInCart?.TaxPercentage) ).toFixed(2), - }; + WithoutTaxRate: + (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate - + ( + ((isItemInCart?.OrderQty - 1) * + isItemInCart?.OrderRate * + isItemInCart?.TaxPercentage) / + (100 + isItemInCart?.TaxPercentage) + ).toFixed(2), + }; const UpdatedData = [...OtherorderDataforNormal, UpdatedCartItem]; @@ -2720,29 +2727,29 @@ const BsBill = () => { } else if (isItemInCartHold && OrderType === 'Hold') { if (BillOrderPre === 'Y') { const UpdatedCartItem = - // if the item is already in the cart, increase the quantity of the item - { - ...isItemInCartHold, - OrderQty: isItemInCartHold?.OrderQty - 1, - TotalAmt: - (isItemInCartHold?.OrderQty - 1) * - isItemInCartHold?.OrderRate, - TaxAmt: ( - ((isItemInCartHold?.OrderQty - 1) * - isItemInCartHold?.OrderRate * - isItemInCartHold?.TaxPercentage) / - (100 + isItemInCartHold?.TaxPercentage) - ).toFixed(2), - WithoutTaxRate: - (isItemInCartHold?.OrderQty - 1) * - isItemInCartHold?.OrderRate - - ( + // if the item is already in the cart, increase the quantity of the item + { + ...isItemInCartHold, + OrderQty: isItemInCartHold?.OrderQty - 1, + TotalAmt: + (isItemInCartHold?.OrderQty - 1) * + isItemInCartHold?.OrderRate, + TaxAmt: ( ((isItemInCartHold?.OrderQty - 1) * isItemInCartHold?.OrderRate * isItemInCartHold?.TaxPercentage) / (100 + isItemInCartHold?.TaxPercentage) ).toFixed(2), - }; + WithoutTaxRate: + (isItemInCartHold?.OrderQty - 1) * + isItemInCartHold?.OrderRate - + ( + ((isItemInCartHold?.OrderQty - 1) * + isItemInCartHold?.OrderRate * + isItemInCartHold?.TaxPercentage) / + (100 + isItemInCartHold?.TaxPercentage) + ).toFixed(2), + }; const UpdatedData = [ UpdatedCartItem, @@ -2756,29 +2763,29 @@ const BsBill = () => { } } else { const UpdatedCartItem = - // if the item is already in the cart, increase the quantity of the item - { - ...isItemInCartHold, - OrderQty: isItemInCartHold?.OrderQty - 1, - TotalAmt: - (isItemInCartHold?.OrderQty - 1) * - isItemInCartHold?.OrderRate, - TaxAmt: ( - ((isItemInCartHold?.OrderQty - 1) * - isItemInCartHold?.OrderRate * - isItemInCartHold?.TaxPercentage) / - (100 + isItemInCartHold?.TaxPercentage) - ).toFixed(2), - WithoutTaxRate: - (isItemInCartHold?.OrderQty - 1) * - isItemInCartHold?.OrderRate - - ( + // if the item is already in the cart, increase the quantity of the item + { + ...isItemInCartHold, + OrderQty: isItemInCartHold?.OrderQty - 1, + TotalAmt: + (isItemInCartHold?.OrderQty - 1) * + isItemInCartHold?.OrderRate, + TaxAmt: ( ((isItemInCartHold?.OrderQty - 1) * isItemInCartHold?.OrderRate * isItemInCartHold?.TaxPercentage) / (100 + isItemInCartHold?.TaxPercentage) ).toFixed(2), - }; + WithoutTaxRate: + (isItemInCartHold?.OrderQty - 1) * + isItemInCartHold?.OrderRate - + ( + ((isItemInCartHold?.OrderQty - 1) * + isItemInCartHold?.OrderRate * + isItemInCartHold?.TaxPercentage) / + (100 + isItemInCartHold?.TaxPercentage) + ).toFixed(2), + }; const UpdatedData = [ ...OtherorderDataforNormalWithoutSalesId, @@ -3098,7 +3105,7 @@ const BsBill = () => { style={{ fontFamily: SelectedFont, fontWeight: '600', - fontSize: '16px', + fontSize: '14px', width: '10px', padding: '1px', }} @@ -3118,7 +3125,7 @@ const BsBill = () => { style={{ fontFamily: SelectedFont, fontWeight: '600', - fontSize: '16px', + fontSize: '14px', width: '10px', }} > @@ -3135,7 +3142,7 @@ const BsBill = () => { style={{ fontFamily: SelectedFont, fontWeight: '600', - fontSize: '16px', + fontSize: '14px', }} > {!isMobile ? ( @@ -3151,7 +3158,7 @@ const BsBill = () => { style={{ fontFamily: SelectedFont, fontWeight: '600', - fontSize: '16px', + fontSize: '14px', width: '20px', }} > @@ -3168,7 +3175,7 @@ const BsBill = () => { style={{ fontFamily: SelectedFont, fontWeight: '600', - fontSize: '16px', + fontSize: '14px', width: '20px', }} > @@ -3185,7 +3192,7 @@ const BsBill = () => { style={{ fontFamily: SelectedFont, fontWeight: '600', - fontSize: '16px', + fontSize: '14px', width: '20px', }} // onClick={TableData?.length>0? OpenEditTotalAmount :""} @@ -3208,7 +3215,7 @@ const BsBill = () => { style={{ fontFamily: SelectedFont, fontWeight: '600', - fontSize: '16px', + fontSize: '14px', width: '20px', }} > @@ -3225,7 +3232,7 @@ const BsBill = () => { style={{ fontFamily: SelectedFont, fontWeight: '600', - fontSize: '16px', + fontSize: '14px', width: '20px', }} > @@ -3245,7 +3252,7 @@ const BsBill = () => { padding: '0.5rem', borderBottom: '1.9px solid #000', fontWeight: '600', - fontSize: '16px', + fontSize: '14px', width: '10px', }} > @@ -3312,15 +3319,15 @@ const BsBill = () => { ? item?.SalesId && OrderType !== 'Hold' ? 'rgb(243, 248, 213)' : triggerAnimation && - index === 0 && - !item?.SalesId && - tableDataTakeAway?.length >= PreviousdataLength + index === 0 && + !item?.SalesId && + tableDataTakeAway?.length >= PreviousdataLength ? 'wheat' : triggerAnimation && - index === 0 && - tableDataTakeAway?.length >= PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + index === 0 && + tableDataTakeAway?.length >= PreviousdataLength && + !HoldOrderDtl && + !UnpaidData ? 'wheat' : 'inherit' : 'none', @@ -3328,9 +3335,9 @@ const BsBill = () => { item?.SalesId && OrderType !== 'Hold' ? 'rgb(243, 248, 213)' : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + ' ' + item?.BookingTypeName - ) + GlobProdwisedata?.includes( + item?.InwardDtlId + ' ' + item?.BookingTypeName + ) ? '#b2d1f7' : index % 2 === 0 ? 'white' @@ -3368,7 +3375,7 @@ const BsBill = () => { { className="BSBillingTable5-table-td for-combo" onClick={() => item.FullProductIdentifierDtls?.length > 0 || - item.ProductIdentifierDtls?.length > 0 + item.ProductIdentifierDtls?.length > 0 ? handleImeiDetails(item) : editField && handleEditQuantity(item) } @@ -3447,21 +3454,21 @@ const BsBill = () => { {productBasedExtraCharges?.find( (find) => find.ProdId === item.ProdId ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} )} {tableitem.OptionName == 'MRP' && ( @@ -3632,26 +3639,26 @@ const BsBill = () => { ? item?.SalesId ? 'rgb(243, 248, 213)' : BookingType === 'Dine In' && - triggerAnimation && - OldtableDataTakeAway?.length + index === 0 && - !item?.SalesId && - tableDataDinein?.length >= PreviousdataLength - ? 'wheat' - : BookingType !== 'Dine In' && triggerAnimation && OldtableDataTakeAway?.length + index === 0 && - tableDataDinein?.length >= PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + !item?.SalesId && + tableDataDinein?.length >= PreviousdataLength + ? 'wheat' + : BookingType !== 'Dine In' && + triggerAnimation && + OldtableDataTakeAway?.length + index === 0 && + tableDataDinein?.length >= PreviousdataLength && + !HoldOrderDtl && + !UnpaidData ? 'wheat' : 'inherit' : 'none', background: item?.SalesId ? 'rgb(243, 248, 213)' : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + ' ' + item?.BookingTypeName - ) + GlobProdwisedata?.includes( + item?.InwardDtlId + ' ' + item?.BookingTypeName + ) ? '#b2d1f7' : (OldtableDataTakeAway?.length + index) % 2 === 0 ? 'white' @@ -3689,7 +3696,7 @@ const BsBill = () => { { {productBasedExtraCharges?.find( (find) => find.ProdId === item.ProdId ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} )} {tableitem.OptionName == 'MRP' && ( @@ -3949,38 +3956,38 @@ const BsBill = () => { ? BookingType === 'Dine In' && item?.SalesId ? 'rgb(243, 248, 213)' : BookingType === 'Dine In' && - triggerAnimation && - OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index === - 0 && - !item?.SalesId && - tableDataTakeAway?.length >= PreviousdataLength - ? 'wheat' - : BookingType !== 'Dine In' && triggerAnimation && OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index === - 0 && - tableDataTakeAway?.length >= PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + OldtableDataTakeAway?.length + + index === + 0 && + !item?.SalesId && + tableDataTakeAway?.length >= PreviousdataLength + ? 'wheat' + : BookingType !== 'Dine In' && + triggerAnimation && + OldtableDataDinein?.length + + OldtableDataTakeAway?.length + + index === + 0 && + tableDataTakeAway?.length >= PreviousdataLength && + !HoldOrderDtl && + !UnpaidData ? 'wheat' : (OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index) % - 2 === - 0 + OldtableDataTakeAway?.length + + index) % + 2 === + 0 ? 'white' : SelectedBillColor?.['OverallBackgroundColor'] ? SelectedBillColor?.['OverallBackgroundColor'] : '#d6d6d6' : (OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index) % - 2 === - 0 + OldtableDataTakeAway?.length + + index) % + 2 === + 0 ? 'white' : SelectedBillColor?.['OverallBackgroundColor'] ? SelectedBillColor?.['OverallBackgroundColor'] @@ -3989,15 +3996,15 @@ const BsBill = () => { BookingType === 'Dine In' && item?.SalesId ? 'rgb(243, 248, 213)' : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + ' ' + item?.BookingTypeName - ) + GlobProdwisedata?.includes( + item?.InwardDtlId + ' ' + item?.BookingTypeName + ) ? '#b2d1f7' : (OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index) % - 2 === - 0 + OldtableDataTakeAway?.length + + index) % + 2 === + 0 ? 'white' : SelectedBillColor?.['OverallBackgroundColor'] ? SelectedBillColor?.['OverallBackgroundColor'] @@ -4006,9 +4013,9 @@ const BsBill = () => { BillOrderPre === 'Y' && !BookingTypeBoth ? triggerAnimation && OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index === - 0 && + OldtableDataTakeAway?.length + + index === + 0 && !item?.SalesId && tableDataTakeAway?.length >= PreviousdataLength && !HoldOrderDtl && @@ -4036,7 +4043,7 @@ const BsBill = () => { { className="BSBillingTable5-table-td for-combo" onClick={() => item.FullProductIdentifierDtls?.length > 0 || - item.ProductIdentifierDtls?.length > 0 + item.ProductIdentifierDtls?.length > 0 ? handleImeiDetails(item) : editField && handleEditQuantity(item) } @@ -4080,8 +4087,8 @@ const BsBill = () => { {!item?.ProdVariantName?.toLowerCase()?.includes( 'variant' ) && ( - {item?.ProdVariantName} - )} + {item?.ProdVariantName} + )} {item?.Size} {item?.SinglePc == 'Y' ? 'PCS' @@ -4119,21 +4126,21 @@ const BsBill = () => { {productBasedExtraCharges?.find( (find) => find.ProdId === item.ProdId ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} )} {tableitem.OptionName == 'MRP' && ( @@ -4318,44 +4325,44 @@ const BsBill = () => { !BookingTypeBoth ? 'rgb(243, 248, 213)' : BookingType === 'Dine In' && - triggerAnimation && - OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index === - 0 && - !item?.SalesId && - tableDataDinein?.length >= PreviousdataLength - ? 'wheat' - : BookingType !== 'Dine In' && triggerAnimation && OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index === - 0 && - tableDataDinein?.length >= PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index === + 0 && + !item?.SalesId && + tableDataDinein?.length >= PreviousdataLength + ? 'wheat' + : BookingType !== 'Dine In' && + triggerAnimation && + OldtableDataTakeAway?.length + + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index === + 0 && + tableDataDinein?.length >= PreviousdataLength && + !HoldOrderDtl && + !UnpaidData ? 'wheat' : 'inherit' : 'none', background: BookingType === 'Dine In' && - item?.SalesId && - !BookingTypeBoth + item?.SalesId && + !BookingTypeBoth ? 'rgb(243, 248, 213)' : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + ' ' + item?.BookingTypeName - ) + GlobProdwisedata?.includes( + item?.InwardDtlId + ' ' + item?.BookingTypeName + ) ? '#b2d1f7' : (OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index) % - 2 === - 0 + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index) % + 2 === + 0 ? 'white' : SelectedBillColor?.['OverallBackgroundColor'] ? SelectedBillColor?.['OverallBackgroundColor'] @@ -4364,10 +4371,10 @@ const BsBill = () => { BillOrderPre === 'Y' && !BookingTypeBoth ? triggerAnimation && OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index === - 0 && + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index === + 0 && !item?.SalesId && tableDataDinein?.length >= PreviousdataLength && !HoldOrderDtl && @@ -4395,7 +4402,7 @@ const BsBill = () => { { {productBasedExtraCharges?.find( (find) => find.ProdId === item.ProdId ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} )} {tableitem.OptionName == 'MRP' && ( @@ -4653,7 +4660,7 @@ const BsBill = () => { ProductDetail={Modaldata} /> )} - {(customerPriceHistoryOpen && GetCustId) && + {customerPriceHistoryOpen && GetCustId && ( { setCustomerProduct={setCustomerProduct} selectedCustomer={selectedCustomer} /> - } + )} ); }; diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.jsx index e826e87..dd19d42 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.jsx @@ -139,16 +139,16 @@ const BSBillingTable7 = () => { OrderType === 'Hold' ? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway') : tableData?.filter( - (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId - ); + (a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId + ); const OldtableDataDinein = tableData?.filter( (a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId ); const OldtableDataTakeAway = OrderType != 'Hold' ? tableData?.filter( - (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId - ) + (a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId + ) : []; const productBasedExtraCharges = GlobalExtraCharge.filter( (obj) => 'ProdName' in obj @@ -941,9 +941,9 @@ const BSBillingTable7 = () => { )?.map((item, idx) => idx === 0 ? { - ...item, - FreeQty, - } + ...item, + FreeQty, + } : item ), }; @@ -1044,7 +1044,7 @@ const BSBillingTable7 = () => { InwardDtlId: isPaidproduct?.InwardDtlId, BuyInwardDtlId: null, Offer: 0, - OrderRate: isPaidproduct?.OrderRate + OrderRate: isPaidproduct?.OrderRate, }); } else if (isPaidproduct?.OrderQty > item?.OrderQty) { // Just Decrease Paid Qty @@ -1218,7 +1218,7 @@ const BSBillingTable7 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: null, Offer: item?.Offer, - OrderRate: item?.OrderRate + OrderRate: item?.OrderRate, }); await ChangeFreeprodlistFn({ OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty, @@ -1329,7 +1329,7 @@ const BSBillingTable7 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: null, Offer: item?.Offer, - OrderRate: item?.OrderRate + OrderRate: item?.OrderRate, }); await ChangeOfferAppliedProdsFn({ inwardDtlId: item?.InwardDtlId, @@ -1361,7 +1361,7 @@ const BSBillingTable7 = () => { InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId, BuyInwardDtlId: null, Offer: 0, - OrderRate: isPaidProductAvailableInCart?.OrderRate + OrderRate: isPaidProductAvailableInCart?.OrderRate, }); } else if ( isPaidProductAvailableInCart?.OrderQty > item?.OrderQty @@ -1445,7 +1445,7 @@ const BSBillingTable7 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: null, Offer: item?.Offer, - OrderRate: item?.OrderRate + OrderRate: item?.OrderRate, }); await ChangeFreeprodlistFn({ OverAllFreeQty: freeProdList?.OverAllFreeQty, @@ -1472,7 +1472,7 @@ const BSBillingTable7 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: null, Offer: item?.Offer, - OrderRate: item?.OrderRate + OrderRate: item?.OrderRate, }); await ChangeFreeprodlistFn({ OverAllFreeQty: freeProdList?.OverAllFreeQty, @@ -1819,7 +1819,7 @@ const BSBillingTable7 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: item?.InwardDtlId, Offer: item?.Offer, - OrderRate: item?.OrderRate + OrderRate: item?.OrderRate, }); await ChangeFreeprodlistFn({ OverAllFreeQty: item?.OrderQty, @@ -1998,7 +1998,7 @@ const BSBillingTable7 = () => { fontFamily: SelectedFont, fontWeight: '600', padding: '8px', - fontSize: '16px', + fontSize: '14px', width: '10px', }} > @@ -2017,7 +2017,7 @@ const BSBillingTable7 = () => { fontFamily: SelectedFont, fontWeight: '600', padding: '8px', - fontSize: '16px', + fontSize: '14px', }} > {!isMobile ? ( @@ -2033,7 +2033,7 @@ const BSBillingTable7 = () => { style={{ fontFamily: SelectedFont, padding: '8px', - fontSize: '16px', + fontSize: '14px', width: '5%', }} > @@ -2051,7 +2051,7 @@ const BSBillingTable7 = () => { fontFamily: SelectedFont, fontWeight: '600', padding: '8px', - fontSize: '16px', + fontSize: '14px', width: '5%', }} > @@ -2068,7 +2068,7 @@ const BSBillingTable7 = () => { style={{ fontFamily: SelectedFont, fontWeight: '600', - fontSize: '16px', + fontSize: '14px', padding: '8px', width: '5%', }} @@ -2092,7 +2092,7 @@ const BSBillingTable7 = () => { style={{ fontFamily: SelectedFont, fontWeight: '600', - fontSize: '16px', + fontSize: '14px', width: '5%', padding: '8px', }} @@ -2110,7 +2110,7 @@ const BSBillingTable7 = () => { style={{ fontFamily: SelectedFont, fontWeight: '600', - fontSize: '16px', + fontSize: '14px', width: '5%', padding: '8px', }} @@ -2139,16 +2139,16 @@ const BSBillingTable7 = () => { ? item?.SalesId && OrderType !== 'Hold' ? 'rgb(243, 248, 213)' : triggerAnimation && - index === 0 && - !item?.SalesId && - tableDataTakeAway?.length >= PreviousdataLength + index === 0 && + !item?.SalesId && + tableDataTakeAway?.length >= PreviousdataLength ? 'wheat' : triggerAnimation && - index === 0 && - tableDataTakeAway?.length >= - PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + index === 0 && + tableDataTakeAway?.length >= + PreviousdataLength && + !HoldOrderDtl && + !UnpaidData ? 'wheat' : 'inherit' : 'none', @@ -2156,9 +2156,9 @@ const BSBillingTable7 = () => { item?.SalesId && OrderType !== 'Hold' ? 'rgb(243, 248, 213)' : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + ' ' + item?.BookingTypeName - ) + GlobProdwisedata?.includes( + item?.InwardDtlId + ' ' + item?.BookingTypeName + ) ? '#b2d1f7' : index % 2 === 0 ? 'white' @@ -2183,14 +2183,15 @@ const BSBillingTable7 = () => { ? () => handleEditQuantity(item) : editdelete === 'Delete' ? () => removeFromCart(item) - : () => { } + : () => {} } // onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""} - className={`${item?.SalesId && OrderType !== 'Hold' - ? 'BSBill-Table7-content-disabled' - : 'BSBill-Table7-content' - } + className={`${ + item?.SalesId && OrderType !== 'Hold' + ? 'BSBill-Table7-content-disabled' + : 'BSBill-Table7-content' + } `} > @@ -2274,21 +2275,21 @@ const BSBillingTable7 = () => { {productBasedExtraCharges?.find( (find) => find.ProdId === item.ProdId ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} )} {tableitem.OptionName == 'MRP' && ( @@ -2367,27 +2368,27 @@ const BSBillingTable7 = () => { ? item?.SalesId ? 'rgb(243, 248, 213)' : BookingType === 'Dine In' && - triggerAnimation && - OldtableDataTakeAway?.length + index === 0 && - !item?.SalesId && - tableDataDinein?.length >= PreviousdataLength - ? 'wheat' - : BookingType !== 'Dine In' && triggerAnimation && OldtableDataTakeAway?.length + index === 0 && - tableDataDinein?.length >= - PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + !item?.SalesId && + tableDataDinein?.length >= PreviousdataLength + ? 'wheat' + : BookingType !== 'Dine In' && + triggerAnimation && + OldtableDataTakeAway?.length + index === 0 && + tableDataDinein?.length >= + PreviousdataLength && + !HoldOrderDtl && + !UnpaidData ? 'wheat' : 'inherit' : 'none', background: item?.SalesId ? 'rgb(243, 248, 213)' : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + ' ' + item?.BookingTypeName - ) + GlobProdwisedata?.includes( + item?.InwardDtlId + ' ' + item?.BookingTypeName + ) ? '#b2d1f7' : (OldtableDataTakeAway?.length + index) % 2 === 0 ? 'white' @@ -2412,14 +2413,15 @@ const BSBillingTable7 = () => { ? () => handleEditQuantity(item) : editdelete === 'Delete' ? () => removeFromCart(item) - : () => { } + : () => {} } // onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""} - className={`${item?.SalesId - ? 'BSBill-Table7-content-disabled' - : 'BSBill-Table7-content' - } + className={`${ + item?.SalesId + ? 'BSBill-Table7-content-disabled' + : 'BSBill-Table7-content' + } `} > @@ -2499,21 +2501,21 @@ const BSBillingTable7 = () => { {productBasedExtraCharges?.find( (find) => find.ProdId === item.ProdId ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} )} {tableitem.OptionName == 'MRP' && ( @@ -2592,43 +2594,43 @@ const BSBillingTable7 = () => { ? BookingType === 'Dine In' && item?.SalesId ? 'rgb(243, 248, 213)' : BookingType === 'Dine In' && - triggerAnimation && - OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index === - 0 && - !item?.SalesId && - tableDataTakeAway?.length >= PreviousdataLength - ? 'wheat' - : BookingType !== 'Dine In' && triggerAnimation && OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index === - 0 && - tableDataTakeAway?.length >= - PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + OldtableDataTakeAway?.length + + index === + 0 && + !item?.SalesId && + tableDataTakeAway?.length >= PreviousdataLength + ? 'wheat' + : BookingType !== 'Dine In' && + triggerAnimation && + OldtableDataDinein?.length + + OldtableDataTakeAway?.length + + index === + 0 && + tableDataTakeAway?.length >= + PreviousdataLength && + !HoldOrderDtl && + !UnpaidData ? 'wheat' : (OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index) % - 2 === - 0 + OldtableDataTakeAway?.length + + index) % + 2 === + 0 ? 'white' : SelectedBillColor?.[ - 'OverallBackgroundColor' - ] + 'OverallBackgroundColor' + ] ? SelectedBillColor?.[ - 'OverallBackgroundColor' - ] + 'OverallBackgroundColor' + ] : '#d6d6d6' : (OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index) % - 2 === - 0 + OldtableDataTakeAway?.length + + index) % + 2 === + 0 ? 'white' : SelectedBillColor?.['OverallBackgroundColor'] ? SelectedBillColor?.['OverallBackgroundColor'] @@ -2637,15 +2639,15 @@ const BSBillingTable7 = () => { BookingType === 'Dine In' && item?.SalesId ? 'rgb(243, 248, 213)' : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + ' ' + item?.BookingTypeName - ) + GlobProdwisedata?.includes( + item?.InwardDtlId + ' ' + item?.BookingTypeName + ) ? '#b2d1f7' : (OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index) % - 2 === - 0 + OldtableDataTakeAway?.length + + index) % + 2 === + 0 ? 'white' : SelectedBillColor?.['OverallBackgroundColor'] ? SelectedBillColor?.['OverallBackgroundColor'] @@ -2654,9 +2656,9 @@ const BSBillingTable7 = () => { BillOrderPre === 'Y' && !BookingTypeBoth ? triggerAnimation && OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index === - 0 && + OldtableDataTakeAway?.length + + index === + 0 && !item?.SalesId && tableDataTakeAway?.length >= PreviousdataLength && !HoldOrderDtl && @@ -2673,21 +2675,22 @@ const BSBillingTable7 = () => { onClick={ editdelete === 'Edit' ? () => - item.Type == 'P' || item.Type == 'C' - ? handleEditQuantity(item) - : item.ServiceType == 'G' + item.Type == 'P' || item.Type == 'C' ? handleEditQuantity(item) - : '' + : item.ServiceType == 'G' + ? handleEditQuantity(item) + : '' : editdelete === 'Delete' ? () => removeFromCart(item) - : () => { } + : () => {} } // onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""} - className={`${BookingType === 'Dine In' && item?.SalesId - ? 'BSBill-Table7-content-disabled' - : 'BSBill-Table7-content' - } + className={`${ + BookingType === 'Dine In' && item?.SalesId + ? 'BSBill-Table7-content-disabled' + : 'BSBill-Table7-content' + } `} > @@ -2747,8 +2750,8 @@ const BSBillingTable7 = () => { {!item?.ProdVariantName?.toLowerCase()?.includes( 'variant' ) && ( - {item?.ProdVariantName} - )} + {item?.ProdVariantName} + )} {item?.Size} {item?.SinglePc == 'Y' ? 'PCS' @@ -2782,21 +2785,21 @@ const BSBillingTable7 = () => { {productBasedExtraCharges?.find( (find) => find.ProdId === item.ProdId ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} )} {tableitem.OptionName == 'MRP' && ( @@ -2877,45 +2880,45 @@ const BSBillingTable7 = () => { !BookingTypeBoth ? 'rgb(243, 248, 213)' : BookingType === 'Dine In' && - triggerAnimation && - OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index === - 0 && - !item?.SalesId && - tableDataDinein?.length >= PreviousdataLength - ? 'wheat' - : BookingType !== 'Dine In' && triggerAnimation && OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index === - 0 && - tableDataDinein?.length >= - PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index === + 0 && + !item?.SalesId && + tableDataDinein?.length >= PreviousdataLength + ? 'wheat' + : BookingType !== 'Dine In' && + triggerAnimation && + OldtableDataTakeAway?.length + + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index === + 0 && + tableDataDinein?.length >= + PreviousdataLength && + !HoldOrderDtl && + !UnpaidData ? 'wheat' : 'inherit' : 'none', background: BookingType === 'Dine In' && - item?.SalesId && - !BookingTypeBoth + item?.SalesId && + !BookingTypeBoth ? 'rgb(243, 248, 213)' : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + ' ' + item?.BookingTypeName - ) + GlobProdwisedata?.includes( + item?.InwardDtlId + ' ' + item?.BookingTypeName + ) ? '#b2d1f7' : (OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index) % - 2 === - 0 + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index) % + 2 === + 0 ? 'white' : SelectedBillColor?.['OverallBackgroundColor'] ? SelectedBillColor?.['OverallBackgroundColor'] @@ -2924,10 +2927,10 @@ const BSBillingTable7 = () => { BillOrderPre === 'Y' && !BookingTypeBoth ? triggerAnimation && OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index === - 0 && + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index === + 0 && !item?.SalesId && tableDataDinein?.length >= PreviousdataLength && !HoldOrderDtl && @@ -2947,14 +2950,15 @@ const BSBillingTable7 = () => { ? () => handleEditQuantity(item) : editdelete === 'Delete' ? () => removeFromCart(item) - : () => { } + : () => {} } // onClick={editdelete === "Edit" ? () => handleEditQuantity(item) : editdelete === "Delete" ? () => removeFromCart(item) : ""} - className={`${BookingType === 'Dine In' && item?.SalesId - ? 'BSBill-Table7-content-disabled' - : 'BSBill-Table7-content' - } + className={`${ + BookingType === 'Dine In' && item?.SalesId + ? 'BSBill-Table7-content-disabled' + : 'BSBill-Table7-content' + } `} > @@ -3038,21 +3042,21 @@ const BSBillingTable7 = () => { {productBasedExtraCharges?.find( (find) => find.ProdId === item.ProdId ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} )} {tableitem.OptionName == 'MRP' && ( diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx index 8554720..5a39a5b 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx @@ -205,9 +205,8 @@ const OtherServicePrintStyle1 = lazy( () => import('../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx') ); -const OtherServiceMobilePrint = lazy( - () => import('../../BookingFunctionality/OtherServiceMobilePrint.jsx') -); +import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx'; + const QrinScreen = lazy( () => import('../../BookingFunctionality/DynamicScreenQr.jsx') ); @@ -3605,13 +3604,6 @@ const StandardTablePayment = () => { title="Share on WhatsApp" /> )} - {/* */} {(filteredSettingNames?.includes('Print') || !MobileNoWhatsApp || @@ -4196,30 +4188,27 @@ const StandardTablePayment = () => { } /> )} - { - OtherServicesPrintDetails?.length > 0 && ( - // PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => ( -
- -
- ) - // )) - } + {OtherServicesPrintDetails?.length > 0 && ( + // PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => ( +
+ +
+ )} ); diff --git a/src/Pages/BookingScreen/Components/BSCombo/BSC1NavBar.jsx b/src/Pages/BookingScreen/Components/BSCombo/BSC1NavBar.jsx index ca41261..1c387da 100644 --- a/src/Pages/BookingScreen/Components/BSCombo/BSC1NavBar.jsx +++ b/src/Pages/BookingScreen/Components/BSCombo/BSC1NavBar.jsx @@ -1,6 +1,5 @@ import React, { lazy, - Suspense, useCallback, useEffect, useRef, @@ -11,13 +10,9 @@ import { useDispatch, useSelector } from 'react-redux'; import { useNavigate } from 'react-router-dom'; import { TiLocation } from 'react-icons/ti'; import { BsFillPersonFill } from 'react-icons/bs'; -import { PiStorefrontFill } from 'react-icons/pi'; import { BiSolidDashboard, BiSolidReport } from 'react-icons/bi'; -import { FaUserLarge } from 'react-icons/fa6'; -import { BiSolidPhoneCall } from 'react-icons/bi'; import { CgMenuGridR } from 'react-icons/cg'; import { MdTableChart } from 'react-icons/md'; -import { MdEdit } from 'react-icons/md'; import MyTime, { DateDisplay, TimeDisplay } from './BSTimer.jsx'; import '../../../../Styles/BookingScreen/Template/BSLayout7/BSC1NavBar.scss'; import { @@ -31,7 +26,6 @@ import { sessionStore, } from '../../../../Services/Others'; import PozoHomeIcon from '../UtillComponents/Pozo retail icons/PozoHomeIcon.jsx'; -import { GlobalCompBranchData } from '../../../../Features/BrachLogin/BranchLogin.js'; import { isMobile } from 'react-device-detect'; import { FaDisplay } from 'react-icons/fa6'; import { @@ -233,166 +227,161 @@ const BSC1NavBar = () => { } }, [isFullscreen]); return ( - Loading...}> - <> -
-
-
- - - {' '} -
-
- - - - - - - - - - - - - - - -
-
-
- -
- {/* */} - - - {branchData.branchName} - {' '} - - {branchData.city && ( - - {' '} - - - {branchData.city} - {' '} - - )} -
- -
- {ScanLayoutScreen?.SettingValue === 'Y' && ( - - - - )} -
- -
-
-
-
- {/* {formattedDate} */} - - - -
- - -
- {isFullscreen ? : } -
-
- - {FeatureAddonData?.FeatureDtls?.find( - (item) => - item?.FeatureAddonName?.toLowerCase() === 'customer display' - ) && ( - -
- -
-
- )} - - {!isMobile && ( -
- -
- )} - -
- -
- - -
-
-
- {isAccOpen && ( - } - Logout={Logout} + <> +
+
+
+ + + {' '} +
+
+ + + + + + + + + + + + + + + +
+
+
+ +
+ + + {branchData.branchName} + {' '} + + {branchData.city && ( + + {' '} + + + {branchData.city} + {' '} + )}
+ +
+ {ScanLayoutScreen?.SettingValue === 'Y' && ( + + + + )} +
+ +
- - +
+
+ {/* {formattedDate} */} + + + +
+ + +
+ {isFullscreen ? : } +
+
+ + {FeatureAddonData?.FeatureDtls?.find( + (item) => + item?.FeatureAddonName?.toLowerCase() === 'customer display' + ) && ( + +
+ +
+
+ )} + + {!isMobile && ( +
+ +
+ )} + +
+ +
+ + +
+
+
+ {isAccOpen && ( + } + Logout={Logout} + /> + )} +
+
+ ); }; diff --git a/src/Pages/BookingScreen/Components/BSCombo/BSC1Payment.jsx b/src/Pages/BookingScreen/Components/BSCombo/BSC1Payment.jsx index 7fc34ed..6418b95 100644 --- a/src/Pages/BookingScreen/Components/BSCombo/BSC1Payment.jsx +++ b/src/Pages/BookingScreen/Components/BSCombo/BSC1Payment.jsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState, useRef, lazy, Suspense } from 'react'; +import React, { useEffect, useState, useRef, lazy } from 'react'; import { FaWhatsapp, FaPrint, FaParking, FaCartPlus } from 'react-icons/fa'; import { useDispatch, useSelector } from 'react-redux'; import { useNavigate } from 'react-router-dom'; @@ -3479,892 +3479,726 @@ const BSC1Payment = (props) => { }; return ( - Loading...
}> - <> -
- -
-
- {BSComboNavbar?.[1]?.map((item) => ( - <> - {item?.OptionName == 'QuickAdd' && ( - - -
- -
- Quick Add - {!isAltPressed && ( - - (Alt + N) - - )} -
-
-
-
- )} - {item?.OptionName == 'DineIn' && - DineInPreference?.SettingValue === 'Y' && - dinePreference && ( - -
- - DINE IN -
-
- )} - {item?.OptionName == 'TakeAway' && takeAwayPreference && ( - + <> +
+ +
+
+ {BSComboNavbar?.[1]?.map((item) => ( + <> + {item?.OptionName == 'QuickAdd' && ( + +
- BookingType !== 'TakeAway' && ChangeTakeAway() - } + className="BSC1Payment-div1-btns" + onClick={setQuickOpen} style={{ pointerEvents: OrderType === 'Failed' ? 'none' : 'auto', }} > - - {/* TAKE AWAY */} - Take Away -
-
- )} - - ))} - - {OtherServiceStatus && ( -
- -
- - Other Services -
-
-
- )} -
- -
- {BSComboNavbar?.[1]?.map((item) => ( - <> - {item?.OptionName == 'Offer' && ( -
- -
- )} - {item?.OptionName == 'ExtraCharge' && ( - - +
-
- - {/* EXTRA CHARGE */} - Extra Charge -
- + Quick Add {!isAltPressed && ( -
- (Alt + A) -
+ (Alt + N) + )}
-
-
+
+ + + )} + {item?.OptionName == 'DineIn' && + DineInPreference?.SettingValue === 'Y' && + dinePreference && ( + +
+ + DINE IN +
+
)} - {item?.OptionName == 'RePrint' && ( - +
+ BookingType !== 'TakeAway' && ChangeTakeAway() + } + style={{ + pointerEvents: OrderType === 'Failed' ? 'none' : 'auto', + }} > - -
+ + {/* TAKE AWAY */} + Take Away +
+
+ )} + + ))} + + {OtherServiceStatus && ( +
+ +
+ + Other Services +
+
+
+ )} +
+ +
+ {BSComboNavbar?.[1]?.map((item) => ( + <> + {item?.OptionName == 'Offer' && ( +
+ +
+ )} + {item?.OptionName == 'ExtraCharge' && ( + + +
+
+ + {/* EXTRA CHARGE */} + Extra Charge +
+ + {!isAltPressed && (
- - Re-Print - {!isAltPressed && ( - - (Alt + R) - - )} + (Alt + A)
+ )} +
+
+
+ )} + {item?.OptionName == 'RePrint' && ( + + +
+
+ + Re-Print + {!isAltPressed && ( + + (Alt + R) + + )}
- - - )} - - ))} - {/* {reprint1 && ( +
+
+
+ )} + + ))} + {/* {reprint1 && ( )} */} - {extraCharges && ( - - )} - {QuickAdd && ( - - )} - {creditCustomerOpen && ( - - )} - {TotalAmount == 0 && Success && ( -
- -
- )} - {TotalAmount > 0 && - qrCode && - PaymentUpiOptions?.length > 0 && - SelectedUpiOption && ( -
- -
- )} - - {PaymentUpiOptions?.length > 0 && OrderId && ( + {extraCharges && ( + + )} + {QuickAdd && ( + + )} + {creditCustomerOpen && ( + + )} + {TotalAmount == 0 && Success && ( +
+ +
+ )} + {TotalAmount > 0 && + qrCode && + PaymentUpiOptions?.length > 0 && + SelectedUpiOption && (
)} -
-
-
-
-
setIsFloatMenuOpen(!isFloatMenuOpen)} - > - 0 && OrderId && ( +
+
- - {isFloatMenuOpen && ( -
- {!OtherServiceStatus && ( -
- -
- -

Parking

-
-
-
- )} - {BSComboNavbar?.[1]?.map((item) => ( - <> - {item?.OptionName == 'QuickAdd' && ( -
- -
- -

- Quick Add
(Alt +N) -

-
-
-
- )} - {item?.OptionName == 'DineIn' && - DineInPreference?.SettingValue === 'Y' && ( - <> -
- -
- -

Dine In

-
-
-
- {FirstPaymentclick === false && - !addnewAccess && - !OrderStatus && ( -
- -
- )} - - )} - {item?.OptionName == 'TakeAway' && ( -
- -
- -

Take Away

-
-
-
- )} - {item?.OptionName == 'Offer' && ( -
- -
- )} - {item?.OptionName == 'ExtraCharge' && ( -
- -
- -

Extra Charge

-
-
-
- )} - {item?.OptionName == 'RePrint' && ( -
- -
- -

Re Print

-
-
-
- )} - - ))} -
- )} -
+ )}
+
-
- +
+
0) && - !unpaidFlow && - OrderStatus - ? 'none' - : 'auto', - opacity: - (BookingType === 'Dine In' || - BookingTypeBoth || - CheckOrderType?.length > 0) && - !unpaidFlow && - OrderStatus - ? 0.5 - : 1, - }} + className="custom-float-trigger" + onClick={() => setIsFloatMenuOpen(!isFloatMenuOpen)} > - {paybtns?.length > 0 && - currentOrderNetAmount >= previousNetAmount ? ( - paybtns?.map((payment) => ( -
- -
- )) - ) : currentOrderNetAmount < previousNetAmount && - salesBillEdit && - refundPayBtns.length > 0 ? ( - refundPayBtns.map((payment) => ( -
- -
- )) - ) : ( -
- Please Set Payment Options -
- )} - - {paybtns?.length > 1 && ( -
0) && - !unpaidFlow && - OrderStatus - ? 'none' - : 'auto', - opacity: - (BookingType === 'Dine In' || - BookingTypeBoth || - CheckOrderType?.length > 0) && - !unpaidFlow && - OrderStatus - ? 0.5 - : 1, - }} - > - - {' '} -
-
- - Split Pay -
-
-
-
- )} +
- - {/*
- -
*/} + {isFloatMenuOpen && ( +
+ {!OtherServiceStatus && ( +
+ +
+ +

Parking

+
+
+
+ )} + {BSComboNavbar?.[1]?.map((item) => ( + <> + {item?.OptionName == 'QuickAdd' && ( +
+ +
+ +

+ Quick Add
(Alt +N) +

+
+
+
+ )} + {item?.OptionName == 'DineIn' && + DineInPreference?.SettingValue === 'Y' && ( + <> +
+ +
+ +

Dine In

+
+
+
+ {FirstPaymentclick === false && + !addnewAccess && + !OrderStatus && ( +
+ +
+ )} + + )} + {item?.OptionName == 'TakeAway' && ( +
+ +
+ +

Take Away

+
+
+
+ )} + {item?.OptionName == 'Offer' && ( +
+ +
+ )} + {item?.OptionName == 'ExtraCharge' && ( +
+ +
+ +

Extra Charge

+
+
+
+ )} + {item?.OptionName == 'RePrint' && ( +
+ +
+ +

Re Print

+
+
+
+ )} + + ))} +
+ )} +
+
-
+
+ +
0) && + !unpaidFlow && + OrderStatus + ? 'none' + : 'auto', + opacity: + (BookingType === 'Dine In' || + BookingTypeBoth || + CheckOrderType?.length > 0) && + !unpaidFlow && + OrderStatus + ? 0.5 + : 1, + }} + > + {paybtns?.length > 0 && + currentOrderNetAmount >= previousNetAmount ? ( + paybtns?.map((payment) => ( +
+ +
+ )) + ) : currentOrderNetAmount < previousNetAmount && + salesBillEdit && + refundPayBtns.length > 0 ? ( + refundPayBtns.map((payment) => ( +
+ +
+ )) + ) : ( +
+ Please Set Payment Options +
+ )} + + {paybtns?.length > 1 && (
0) && + !unpaidFlow && + OrderStatus + ? 'none' + : 'auto', + opacity: + (BookingType === 'Dine In' || + BookingTypeBoth || + CheckOrderType?.length > 0) && + !unpaidFlow && + OrderStatus + ? 0.5 + : 1, }} > -
-
Items
-
:
-
- {' '} - {TotalItems}{' '} + {' '} +
+
+ + Split Pay +
+ +
+ )} +
+ + +
+ +
+
+
+
+
Items
+
:
+
+ {' '} + {TotalItems}{' '}
-
-
Qty
-
:
-
- {' '} - {Qty}{' '} -
-
-
-
Dis
-
:
-
- {' '} - {Discount}{' '} -
+
+
+
Qty
+
:
+
{Qty}
+
+
+
Dis
+
:
+
+ {' '} + {Discount}{' '}
-
+
+
-
- {(addcustomer || hold) && ( - setHold(false)} - /> - )} -
- {Estimation?.SettingValue == 'Y' && - BookingType !== 'Dine In' && - !BookingTypeBoth && ( -
- -
- )} - {BSComboData?.BookingBilling?.[1]?.map((item) => ( - <> - {/* {item?.OptionName=="Hold" && */} - {unpaidFlow == false - ? item?.OptionName == 'Hold' && - BookingType !== 'Dine In' && - !BookingTypeBoth && - OrderCardDetail?.length != 0 && - CheckOrderType?.length === 0 && - OrderType != 'Failed' && - CheckBookingStatus != 'Close' && - !addnewAccess && ( - - - {' '} -
- AddBookingDetails('Hold')} - style={{ - cursor: 'pointer', - // color: '' ? '#52c41a' : '#1292EE', - }} - />{' '} - {/*

Hold

*/} -
-
-
- ) - : ''} - - {unpaidFlow == false - ? item?.OptionName == 'Hold' && - BookingType !== 'Dine In' && - !BookingTypeBoth && - Holddata?.length > 0 && - OrderCardDetail?.length == 0 && - CheckBookingStatus != 'Close' && - !addnewAccess && ( - - {' '} - -
- HandleholdModelOpen()} - style={{ - cursor: 'pointer', - // color: Holddata ? '#52c41a' : 'default', - pointerEvents: - OrderType === 'Failed' ? 'none' : 'auto', - }} - /> -
-
-
- ) - : ''} - {tabledata?.length > 0 && dinePreference && ( - <> - {item?.OptionName == 'UnpaidBill' && ( - +
+ {(addcustomer || hold) && ( + setHold(false)} + /> + )} +
+ {Estimation?.SettingValue == 'Y' && + BookingType !== 'Dine In' && + !BookingTypeBoth && ( +
+ +
+ )} + {BSComboData?.BookingBilling?.[1]?.map((item) => ( + <> + {/* {item?.OptionName=="Hold" && */} + {unpaidFlow == false + ? item?.OptionName == 'Hold' && + BookingType !== 'Dine In' && + !BookingTypeBoth && + OrderCardDetail?.length != 0 && + CheckOrderType?.length === 0 && + OrderType != 'Failed' && + CheckBookingStatus != 'Close' && + !addnewAccess && ( + + {' '}
- { - (setUnpaidOpen(true), getUnpaiddatas()); - }} - /> -
-
- )} - - )} - - ))} - {BSComboData?.BookingBilling?.[1]?.filter( - (item) => item.OptionName === 'AddCustomer' - ).length === 1 ? ( - <> - {Object.keys(useOptions)?.length > 0 && - useOptions?.some((flow) => - flow.OptionDetails.some( - (option) => - option.OptionName === 'Pay at the counter' && - option.ModeDetails.some( - (mode) => mode.ModeName === 'Credit' - ) - ) - ) && ( - - -
0 || - (selOption?.value === undefined && - GlobalAddCustomerDetails1?.length === 0 && - GetCustId?.CustMobile === undefined) - ? 'gray' - : '#1292eeff', - color: '#fff', + backgroundColor: '' ? '#52c41a' : '#1292EE', + color: '' ? '#52c41a' : '#ffffffff', height: '40px', width: '45px', borderRadius: '6px', @@ -4373,669 +4207,803 @@ const BSC1Payment = (props) => { justifyContent: 'center', padding: '8px 8px 12px 8px', }} - className="AsAmtCombo" > - {' '} - AddBookingDetails('Hold')} style={{ - cursor: - OrderCardDetail?.length > 0 && 'not-allowed', - fontSize: '28px', + cursor: 'pointer', + // color: '' ? '#52c41a' : '#1292EE', }} />{' '} -

Adv Amt

+ {/*

Hold

*/}
-
- )} - - ) : ( - '' - )} - {FeatureAddonData?.FeatureDtls?.find( - (item) => item?.FeatureAddonName?.toLowerCase() === 'preorder' - ) && ( - <> - { -
0 || OrderType === 'Failed' - ? 'none' - : 'auto', - opacity: OrderCardDetail?.length > 0 ? 0.5 : 1, - }} - > - + + ) + : ''} + + {unpaidFlow == false + ? item?.OptionName == 'Hold' && + BookingType !== 'Dine In' && + !BookingTypeBoth && + Holddata?.length > 0 && + OrderCardDetail?.length == 0 && + CheckBookingStatus != 'Close' && + !addnewAccess && ( + + {' '} - { - openPreOrder(); +
+ > + HandleholdModelOpen()} + style={{ + cursor: 'pointer', + // color: Holddata ? '#52c41a' : 'default', + pointerEvents: + OrderType === 'Failed' ? 'none' : 'auto', + }} + /> +
-
- } - - )} - {/* Customer Orders */} - {SelCustId && ( - - {' '} -
{ - 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', - }} - > - -
-
- )} - {preOrderOpen && } - {sportsAppPreference && } - {dinePreference && - (BookingType === 'Dine In' || - BookingTypeBoth || - CheckOrderType?.length > 0) && - !unpaidFlow && ( + ) + : ''} + {tabledata?.length > 0 && dinePreference && ( <> - - {' '} - - FirstPaymentclick === false && !addnewAccess - ? changeOrderStatus() - : '' - } - style={{ - pointerEvents: - OrderType === 'Failed' ? 'none' : 'auto', - }} - /> - - {FirstPaymentclick === false && - !addnewAccess && - !OrderStatus && } + {item?.OptionName == 'UnpaidBill' && ( + + {' '} +
+ { + (setUnpaidOpen(true), getUnpaiddatas()); + }} + /> +
+
+ )} )} - {OrderCardDetail?.length > 0 && ParkingDisplay && ( + + ))} + {BSComboData?.BookingBilling?.[1]?.filter( + (item) => item.OptionName === 'AddCustomer' + ).length === 1 ? ( + <> + {Object.keys(useOptions)?.length > 0 && + useOptions?.some((flow) => + flow.OptionDetails.some( + (option) => + option.OptionName === 'Pay at the counter' && + option.ModeDetails.some( + (mode) => mode.ModeName === 'Credit' + ) + ) + ) && ( + + +
0 || + (selOption?.value === undefined && + GlobalAddCustomerDetails1?.length === 0 && + GetCustId?.CustMobile === undefined) + ? 'gray' + : '#1292eeff', + color: '#fff', + height: '40px', + width: '45px', + borderRadius: '6px', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + padding: '8px 8px 12px 8px', + }} + className="AsAmtCombo" + > + {' '} + 0 && 'not-allowed', + fontSize: '28px', + }} + />{' '} +

Adv Amt

+
+
+
+ )} + + ) : ( + '' + )} + {FeatureAddonData?.FeatureDtls?.find( + (item) => item?.FeatureAddonName?.toLowerCase() === 'preorder' + ) && ( + <> + { +
0 || OrderType === 'Failed' + ? 'none' + : 'auto', + opacity: OrderCardDetail?.length > 0 ? 0.5 : 1, + }} + > + + + { + openPreOrder(); + }} + /> + + +
+ } + + )} + {/* Customer Orders */} + {SelCustId && ( + + {' '}
{ + if ( + CheckBookingStatus !== 'Close' && + !addnewAccess && + !(OrderCardDetail?.length > 0) + ) { + setCustomerPreviesOrders(true); + } + }} style={{ - width: '1.5rem', - color: 'rgb(18, 146, 238)', + 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', }} > - +
- )} - {unpaidFlow == true ? ( - - { - Recipt(); - }} - /> - - ) : ( - '' - )} - {paymentfeataddon && ( - -
{ - paymentFailedStatusFun(); - }} - style={{ - width: '27px', - cursor: 'pointer', - fontWeight: '600', - color: 'rgb(18, 146, 238)', - }} - > - -
-
- )} - {OpenFailData && ( - - )} -
-
-
- {BSComboData?.BookingBilling?.[1]?.map((item) => ( - <> - {item?.OptionName == 'AddCustomer' && !preOrderOpen && ( - -
- - -
- -
-
-
-
- )} - - ))} - -
- - - - - - - - - - - } - trigger="click" - open={open} - onOpenChange={handleOpenChange} + )} + {preOrderOpen && } + {sportsAppPreference && } + {dinePreference && + (BookingType === 'Dine In' || + BookingTypeBoth || + CheckOrderType?.length > 0) && + !unpaidFlow && ( + <> + + {' '} + + FirstPaymentclick === false && !addnewAccess + ? changeOrderStatus() + : '' + } + style={{ + pointerEvents: OrderType === 'Failed' ? 'none' : 'auto', + }} + /> + + {FirstPaymentclick === false && + !addnewAccess && + !OrderStatus && } + + )} + {OrderCardDetail?.length > 0 && ParkingDisplay && ( +
- +
+ )} + {unpaidFlow == true ? ( + + { + Recipt(); + }} + /> + + ) : ( + '' + )} + {paymentfeataddon && ( + +
{ + paymentFailedStatusFun(); + }} + style={{ + width: '27px', + cursor: 'pointer', + fontWeight: '600', + color: 'rgb(18, 146, 238)', + }} > - - - -
+ +
+ + )} + {OpenFailData && ( + + )}
- {PrintOrderDetails?.length > 0 && - PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => ( -
- +
+ {BSComboData?.BookingBilling?.[1]?.map((item) => ( + <> + {item?.OptionName == 'AddCustomer' && !preOrderOpen && ( + +
+ + +
+ +
+
+
+
+ )} + + ))} + +
+ + +
- ))} - {PrintOrderDetails?.length > 0 && - (TokenOnly?.SettingValue === 'Y' || - IndividualToken?.SettingValue === 'Y') && - PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => ( -
- { + // (qrCode && SelectedUPIPayOption === "Default") ? UpiPayment() : OrderStatus ? AddBookingDetails("Dine-In") : AddBookingDetails(BookingType, true); + // }} + onClick={handleButtonClick} + style={{ borderRadius: '6px 0 0 6px' }} + > + {!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 + )} + /> +
+ )} + + ) - } - CreatedDate={orderDetail?.CreatedDate} - PaymentStatus={PrintOrderDetails?.[0]?.PaymentOrderDtl} + ) : ( +
ORDER
+ )} + + + + + + + + + + } + trigger="click" + open={open} + onOpenChange={handleOpenChange} + > + + -
- ))} - {CreditCustomer && ( + + +
+
+ {PrintOrderDetails?.length > 0 && + PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => (
- { - handleCreditCustomer('Cancel'); - }} - handleOk={() => { - handleCreditCustomer('Submit'); - }} +
- )} -
- {UpiOpen && ( - { - Upimodel('Cancel'); - }} - footer={false} - children={ -
- {/*

UPI PAYMENT

*/} + ))} + {PrintOrderDetails?.length > 0 && + (TokenOnly?.SettingValue === 'Y' || + IndividualToken?.SettingValue === 'Y') && + PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => ( +
+ +
+ ))} + {CreditCustomer && ( +
+ { + handleCreditCustomer('Cancel'); + }} + handleOk={() => { + handleCreditCustomer('Submit'); + }} + /> +
+ )} +
+ {UpiOpen && ( + { + Upimodel('Cancel'); + }} + footer={false} + children={ +
+ {/*

UPI PAYMENT

*/} + +
+
+ +
+ +
+

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

+
+
+ +
+ {(selOption || SelCustId) && ( +
+ Sent Payment Link + Your Alt Text + {/* */} +
+ )}
-
- -
- -
-

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

-
-
- -
- {(selOption || SelCustId) && ( -
- Sent Payment Link - Your Alt Text - {/* */} -
- )} - -
} + handleSubmit={() => { + Upimodel('Submit'); }} - > - } - handleSubmit={() => { - Upimodel('Submit'); - }} - /> -
+ />
- } - /> - )} - {unpaidopen && ( - { - setUnpaidOpen(false); - }} - footer={false} - children={ -
- -
- } - /> - )} - {/* - - */} - {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} - /> - )} - {Splitpayment && ( - data?.TotalAmt + acc, - 0 - ) - - ((OverAllSales > 0 ? OverAllSales : 0) + - (OverAllEstimate > 0 ? OverAllEstimate : 0) + - (Discount > 0 ? Discount : 0)) - ) - } - failedOrderData={failedOrderData} - /> - )} - {PrintOrderDetails?.length > 0 && ( -
- {filteredSettingNames?.includes('whatsapp') && - MobileNoWhatsApp?.value && ( - - )} - - - - {filteredSettingNames?.includes('SMS') && isMobile && ( - - )} - {/* WhatsAppShare modal/component */} - {showWhatsAppShare && ( - closePrintOption(false)} - /> - )} - {showSMSShare && isMobile && ( - closePrintOption(false)} - /> - )} -
- )} - { - dispatch(changeSalesPaymentoption(false)); - }} - footer={false} - children={ -
-
} /> + )} + {unpaidopen && ( setShowCancelConfirm(true)} + open={unpaidopen} + title="UNPAID BILL'S" + width={1000} + handleCancel={() => { + setUnpaidOpen(false); + }} footer={false} + children={ +
+ +
+ } + /> + )} + {/* + + */} + {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} + /> + )} + {Splitpayment && ( + data?.TotalAmt + acc, + 0 + ) - + ((OverAllSales > 0 ? OverAllSales : 0) + + (OverAllEstimate > 0 ? OverAllEstimate : 0) + + (Discount > 0 ? Discount : 0)) + ) + } + failedOrderData={failedOrderData} + /> + )} + {PrintOrderDetails?.length > 0 && ( +
+ {filteredSettingNames?.includes('whatsapp') && + MobileNoWhatsApp?.value && ( + + )} + + + + {filteredSettingNames?.includes('SMS') && isMobile && ( + + )} + {/* WhatsAppShare modal/component */} + {showWhatsAppShare && ( + closePrintOption(false)} + /> + )} + {showSMSShare && isMobile && ( + closePrintOption(false)} + /> + )} +
+ )} + { + dispatch(changeSalesPaymentoption(false)); + }} + footer={false} + children={ +
+ +
+ } + /> + setShowCancelConfirm(true)} + footer={false} + width={500} + children={ + <> + + + } + /> + {showCancelConfirm && ( + { + 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)} /> } /> - {showCancelConfirm && ( - { - 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)} - /> - - } - /> - )} - - + )} + ); }; diff --git a/src/Pages/BookingScreen/Components/BSCombo/BSC1Search.jsx b/src/Pages/BookingScreen/Components/BSCombo/BSC1Search.jsx index 51e558f..101773c 100644 --- a/src/Pages/BookingScreen/Components/BSCombo/BSC1Search.jsx +++ b/src/Pages/BookingScreen/Components/BSCombo/BSC1Search.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 moment from 'moment'; import { BiBarcodeReader } from 'react-icons/bi'; @@ -133,13 +126,24 @@ export default function BSC1Search(props) { const FeatureAddonData = useSelector(GlobalFeatAddOnData); useSaleswiseOfferWatcher(); const preferenceDatas = useSelector(PreferenceData); - const overAllLimitPreferenece = - preferenceDatas?.[0]?.['SettingDtlDetails']?.find( - (item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y'); - const itemWiseLimitPreferenece = - preferenceDatas?.[0]?.['SettingDtlDetails']?.find( - (item) => item.SettingIdName?.toLowerCase() === 'itemwiselimit' && item?.SettingValue === 'Y'); - const maxQtyLimit = itemWiseLimitPreferenece?.SettingCount || overAllLimitPreferenece?.SettingCount || null; + const overAllLimitPreferenece = preferenceDatas?.[0]?.[ + 'SettingDtlDetails' + ]?.find( + (item) => + item.SettingIdName?.toLowerCase() === 'overalllimit' && + item?.SettingValue === 'Y' + ); + const itemWiseLimitPreferenece = preferenceDatas?.[0]?.[ + 'SettingDtlDetails' + ]?.find( + (item) => + item.SettingIdName?.toLowerCase() === 'itemwiselimit' && + item?.SettingValue === 'Y' + ); + const maxQtyLimit = + itemWiseLimitPreferenece?.SettingCount || + overAllLimitPreferenece?.SettingCount || + null; const preferenceOffer = preferenceDatas?.[0]?.['SettingDtlDetails']?.find( (item) => item.SettingIdName === 'Offer' @@ -253,22 +257,27 @@ export default function BSC1Search(props) { document.activeElement.tagName !== 'INPUT' && document.activeElement.tagName !== 'TEXTAREA' ) { - event.preventDefault(); // Stops "S" from being typed + event.preventDefault(); inputRef?.current?.focus(); } } }; - const handleClickOutside = () => { - inputRef?.current?.blur(); + const handleClickOutside = (event) => { + if ( + containerRef.current && + !containerRef.current.contains(event.target) + ) { + inputRef?.current?.blur(); + } }; window.addEventListener('keydown', handleKeyPress); - window.addEventListener('mousedown', handleClickOutside); + document.addEventListener('mousedown', handleClickOutside); return () => { window.removeEventListener('keydown', handleKeyPress); - window.removeEventListener('mousedown', handleClickOutside); + document.removeEventListener('mousedown', handleClickOutside); }; }, []); //dhana @@ -711,7 +720,7 @@ export default function BSC1Search(props) { WithoutTaxRate: availableFreeQty * item.OrderRate - (availableFreeQty * item.OrderRate * item.TaxPercentage) / - 100, + 100, Offer: availableFreeQty * item.OrderRate, }; @@ -760,7 +769,7 @@ export default function BSC1Search(props) { ((existingPaidItem.OrderQty + excessQty) * item.OrderRate * item.TaxPercentage) / - 100, + 100, }; ModifiedData.push(mergedPaidItem); @@ -795,7 +804,7 @@ export default function BSC1Search(props) { data?.InwardDtlId === item?.InwardDtlId && data?.ProdId === item?.ProdId && data?.OfferMessage?.[0]?.OfferId === - item?.OfferMessage?.[0]?.OfferId + item?.OfferMessage?.[0]?.OfferId ); if (isAlreadyExists !== -1) { @@ -815,11 +824,11 @@ export default function BSC1Search(props) { ).toFixed(2), WithoutTaxRate: (ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) * - item.OrderRate - + item.OrderRate - ((ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) * item.OrderRate * item.TaxPercentage) / - 100, + 100, Offer: (ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) * item.OrderRate, @@ -845,10 +854,10 @@ export default function BSC1Search(props) { const appliedOfferAlreadyExists = AppliedOffers.findIndex( (offer) => offer?.FreeProductsList?.FreeProdId === - matchingFreeProduct?.FreeProdId && + matchingFreeProduct?.FreeProdId && offer?.TableName === matchingFreeProduct?.TableName && offer?.TableUniqueName === - matchingFreeProduct?.TableUniqueName && + matchingFreeProduct?.TableUniqueName && offer?.OfferId === matchingFreeProduct?.OfferId && offer?.OfferMode === matchingFreeProduct?.OfferMode && offer?.FreeProductsList?.ProdVariantDetails?.[0] @@ -1679,7 +1688,7 @@ export default function BSC1Search(props) { 0 || - record.StockCount === 'Stock Not Maintained' + record.StockCount === 'Stock Not Maintained' ? { color: '#000', cursor: 'pointer' } : { color: '#f49898', cursor: 'not-allowed' } } @@ -1709,7 +1718,7 @@ export default function BSC1Search(props) { 0 || - record.StockCount === 'Stock Not Maintained' + record.StockCount === 'Stock Not Maintained' ? { color: '#000', cursor: 'pointer' } : { color: '#f49898', cursor: 'not-allowed' } } @@ -1739,7 +1748,7 @@ export default function BSC1Search(props) { 0 || - record.StockCount === 'Stock Not Maintained' + record.StockCount === 'Stock Not Maintained' ? { color: '#000', cursor: 'pointer' } : { color: '#f49898', cursor: 'not-allowed' } } @@ -1903,11 +1912,11 @@ export default function BSC1Search(props) { StockCount: qtydata?.ProductDetail?.[0]?.StockAvailable === 'Y' ? returnVariantStock( - qtydata?.ProductDetail?.[QtyIndex]?.ProdId, - item?.OverAllQty, - CartOrderDetails, - item?.ProdVariantName - ) + qtydata?.ProductDetail?.[QtyIndex]?.ProdId, + item?.OverAllQty, + CartOrderDetails, + item?.ProdVariantName + ) : 'Stock Not Maintained', }); }); @@ -1923,17 +1932,17 @@ export default function BSC1Search(props) { 'Batch No': item?.BatchRef, StockCount: onePeiceFlow ? returnCountStock( - item?.ProdId, - item?.BalanceQty, - CartOrderDetails, - item?.InwardDtlId - ) * item?.NoOfPcs + item?.ProdId, + item?.BalanceQty, + CartOrderDetails, + item?.InwardDtlId + ) * item?.NoOfPcs : returnCountStock( - item?.ProdId, - item?.BalanceQty, - CartOrderDetails, - item?.InwardDtlId - ), + item?.ProdId, + item?.BalanceQty, + CartOrderDetails, + item?.InwardDtlId + ), 'Stock Date': StockDate(item?.InwardDate), Price: onePeiceFlow ? item?.OnePcsPrice : item?.SellPrice, ExpDate: @@ -1987,13 +1996,13 @@ export default function BSC1Search(props) { (cartItem) => cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.SellPrice && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -2002,9 +2011,9 @@ export default function BSC1Search(props) { (cartItem) => cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -2046,11 +2055,11 @@ export default function BSC1Search(props) { (cartItem) => cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[0]?.InwardDtlId && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] + ?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[0]?.SellPrice && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] + ?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -2059,9 +2068,9 @@ export default function BSC1Search(props) { (cartItem) => cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -2139,13 +2148,13 @@ export default function BSC1Search(props) { (cartItem) => cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -2153,11 +2162,11 @@ export default function BSC1Search(props) { let Isincartonepc = CartOrderDetails?.filter( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -2221,11 +2230,11 @@ export default function BSC1Search(props) { (cartItem) => cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[index.key] - ?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[index.key] + ?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[index.key] - ?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[index.key] + ?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -2234,9 +2243,9 @@ export default function BSC1Search(props) { (cartItem) => cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -2311,15 +2320,15 @@ export default function BSC1Search(props) { let Isincart = CartOrderDetails?.find( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -2327,11 +2336,11 @@ export default function BSC1Search(props) { let Isincartonepc = CartOrderDetails?.filter( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndexs - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndexs + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -2409,15 +2418,15 @@ export default function BSC1Search(props) { let Isincart = CartOrderDetails?.find( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -2425,11 +2434,11 @@ export default function BSC1Search(props) { let Isincartonepc = CartOrderDetails?.filter( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -2549,7 +2558,7 @@ export default function BSC1Search(props) { const isKgsProduct = (a?.ProductDetail?.[QtyIndex]?.UomName?.toLowerCase() === 'kgs' || a?.ProductDetail?.[QtyIndex]?.UomName?.toLowerCase() === - 'kg'?.toLowerCase()) && + 'kg'?.toLowerCase()) && a?.ProductDetail?.[QtyIndex]?.Size === '1'; if ( @@ -2562,11 +2571,11 @@ export default function BSC1Search(props) { parseFloat( onePcs ? (a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[stockIndex]?.OnePcsPrice / - 1000) * - (parseFloat(WeightScaleWeight) * 1000) + ?.StockDetails?.[stockIndex]?.OnePcsPrice / + 1000) * + (parseFloat(WeightScaleWeight) * 1000) : a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[stockIndex]?.SellPrice / 1000 + ?.StockDetails?.[stockIndex]?.SellPrice / 1000 ) * (parseFloat(WeightScaleWeight) * 1000); let data = { @@ -2622,9 +2631,9 @@ export default function BSC1Search(props) { ?.StockDetails?.[stockIndex]?.InwardId, MRP: onePcs ? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[stockIndex]?.OnePcsPrice + ?.StockDetails?.[stockIndex]?.OnePcsPrice : a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[stockIndex]?.MRP, + ?.StockDetails?.[stockIndex]?.MRP, FullProductIdentifierDtls: a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] ?.StockDetails?.[stockIndex]?.ProductIdentifierDtls, @@ -2732,19 +2741,19 @@ export default function BSC1Search(props) { ?.StockDetails?.[stockIndex]?.InwardId, MRP: onePcs ? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[stockIndex]?.OnePcsPrice + ?.StockDetails?.[stockIndex]?.OnePcsPrice : a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[stockIndex]?.MRP, + ?.StockDetails?.[stockIndex]?.MRP, OrderRate: onePcs ? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[stockIndex]?.OnePcsPrice + ?.StockDetails?.[stockIndex]?.OnePcsPrice : a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[stockIndex]?.SellPrice, + ?.StockDetails?.[stockIndex]?.SellPrice, SellingPrice: onePcs ? a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[stockIndex]?.OnePcsPrice + ?.StockDetails?.[stockIndex]?.OnePcsPrice : a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[stockIndex]?.SellPrice, + ?.StockDetails?.[stockIndex]?.SellPrice, SuppId: a?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] ?.StockDetails?.[stockIndex]?.SuppId, @@ -2827,11 +2836,10 @@ export default function BSC1Search(props) { }; const AddOrderDetails = async (item) => { - if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) { if (overAllLimitPreferenece) { const calculatedOverAllQty = calculateOverAllQtyLimit(CartOrderDetails); - if ((calculatedOverAllQty + 1) > maxQtyLimit) { + if (calculatedOverAllQty + 1 > maxQtyLimit) { setMessageData(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`); setMessageType('warning'); return; @@ -2929,15 +2937,15 @@ export default function BSC1Search(props) { const isExistsInFreeProdList = hasOffer ? FreeProdList?.filter( - (f) => - f?.FreeProdId === item?.ProdId && - f?.ProdVariantDetails?.some((variant) => - variant?.StockDetails?.some( - (stock) => stock?.FreeInwardDtlId === item?.InwardDtlId - ) - ) && - f?.RemainingQty > 0 - ) + (f) => + f?.FreeProdId === item?.ProdId && + f?.ProdVariantDetails?.some((variant) => + variant?.StockDetails?.some( + (stock) => stock?.FreeInwardDtlId === item?.InwardDtlId + ) + ) && + f?.RemainingQty > 0 + ) : []; const calculateTaxAmounts = (qty, rate, taxPercentage) => { @@ -3004,10 +3012,10 @@ export default function BSC1Search(props) { ((cartItem?.OfferModeType && cartItem?.OfferMode === 'B' ? true : cartItem?.OfferMode !== 'B') && - cartItem?.OfferMode !== 'P' && - cartItem?.OfferMode !== 'C' && - cartItem?.OfferMode !== 'O' && - cartItem?.OfferMode !== 'L' + cartItem?.OfferMode !== 'P' && + cartItem?.OfferMode !== 'C' && + cartItem?.OfferMode !== 'O' && + cartItem?.OfferMode !== 'L' ? true : cartItem?.Offer === 0) ); @@ -3024,10 +3032,10 @@ export default function BSC1Search(props) { (cartItem) => itemMatchCondition(cartItem) && (cartItem?.OfferMode !== 'B' && - cartItem?.OfferMode !== 'P' && - cartItem?.OfferMode !== 'C' && - cartItem?.OfferMode !== 'O' && - cartItem?.OfferMode !== 'L' + cartItem?.OfferMode !== 'P' && + cartItem?.OfferMode !== 'C' && + cartItem?.OfferMode !== 'O' && + cartItem?.OfferMode !== 'L' ? true : cartItem?.Offer === 0) ); @@ -3041,10 +3049,10 @@ export default function BSC1Search(props) { ((cartItem?.OfferModeType && cartItem?.OfferMode === 'B' ? true : cartItem?.OfferMode !== 'B') && - cartItem?.OfferMode !== 'P' && - cartItem?.OfferMode !== 'L' && - cartItem?.OfferMode !== 'C' && - cartItem?.OfferMode !== 'O' + cartItem?.OfferMode !== 'P' && + cartItem?.OfferMode !== 'L' && + cartItem?.OfferMode !== 'C' && + cartItem?.OfferMode !== 'O' ? true : cartItem?.Offer === 0) ) @@ -3055,10 +3063,10 @@ export default function BSC1Search(props) { !( itemMatchCondition(cartItem) && (cartItem?.OfferMode !== 'B' && - cartItem?.OfferMode !== 'P' && - cartItem?.OfferMode !== 'L' && - cartItem?.OfferMode !== 'C' && - cartItem?.OfferMode !== 'O' + cartItem?.OfferMode !== 'P' && + cartItem?.OfferMode !== 'L' && + cartItem?.OfferMode !== 'C' && + cartItem?.OfferMode !== 'O' ? true : cartItem?.Offer === 0) ) @@ -3131,8 +3139,8 @@ export default function BSC1Search(props) { isItemInCart, item?.OtherProduct === 'Others' || item?.ScaleType === 'weight' ? ( - (item?.OrderQty || 0) + parseFloat(isItemInCart?.OrderQty) - )?.toFixed(3) + (item?.OrderQty || 0) + parseFloat(isItemInCart?.OrderQty) + )?.toFixed(3) : null ); const updatedData = addFirst @@ -3259,9 +3267,9 @@ export default function BSC1Search(props) { isItemInCartHold, item?.OtherProduct === 'Others' || item?.ScaleType === 'weight' ? ( - (item?.OrderQty || 0) + - parseFloat(isItemInCartHold?.OrderQty) - )?.toFixed(3) + (item?.OrderQty || 0) + + parseFloat(isItemInCartHold?.OrderQty) + )?.toFixed(3) : null ); const updatedData = addFirst @@ -3513,14 +3521,14 @@ export default function BSC1Search(props) { updatedCartData = cartData.map((item, idx) => idx === indexToCheck ? { - ...item, - Offer: null, - OfferMessage: undefined, - OfferMode: undefined, - OfferModeType: false, - OfferType: undefined, - OfferValue: null, - } + ...item, + Offer: null, + OfferMessage: undefined, + OfferMode: undefined, + OfferModeType: false, + OfferType: undefined, + OfferValue: null, + } : item ); } @@ -3571,8 +3579,8 @@ export default function BSC1Search(props) { ...item, Offer: sameProduct || - bestOffer?.OfferMode === 'I' || - bestOffer?.OfferMode === 'Q' + bestOffer?.OfferMode === 'I' || + bestOffer?.OfferMode === 'Q' ? bestOffer?.OfferAmount || item.Offer : item.Offer || bestOffer?.OfferAmount, OfferType: item?.OfferType || bestOffer?.OfferType, @@ -3589,10 +3597,10 @@ export default function BSC1Search(props) { ((c?.OfferModeType && c?.OfferMode === 'B' ? true : c?.OfferMode !== 'B') && - c?.OfferMode !== 'P' && - c?.OfferMode !== 'C' && - c?.OfferMode !== 'O' && - c?.OfferMode !== 'L' + c?.OfferMode !== 'P' && + c?.OfferMode !== 'C' && + c?.OfferMode !== 'O' && + c?.OfferMode !== 'L' ? true : c?.Offer === 0); @@ -3900,10 +3908,10 @@ export default function BSC1Search(props) { return FreeProdList.map((f, i) => i === index ? { - ...existing, - ...newFreeProd, - ProdVariantDetails: existing.ProdVariantDetails, - } + ...existing, + ...newFreeProd, + ProdVariantDetails: existing.ProdVariantDetails, + } : f ); } else { @@ -3973,7 +3981,7 @@ export default function BSC1Search(props) { const cycleSize = buyQty + getQty; const fullCycles = Math.floor( freeCartItem?.reduce((acc, fc) => acc + (fc?.OrderQty || 0), 0) / - cycleSize + cycleSize ); const totalFreeQty = fullCycles * getQty; @@ -4535,141 +4543,248 @@ export default function BSC1Search(props) { const widthBasedOnProdVariantDetails = getMaxBrandWidth(); return ( - Loading...
}> - <> + <> +
+
OnfocusTrue()} > - -
OnfocusTrue()} - > -
- - ({ - value: option.ProdName, - label: ( -
-
{ - setOnePeiceFlow(false); - }} - > - {option.ProdName} -
-
- {option.ProductDetail?.filter( - (item) => item.OnePcsAvailable == 'Y' - ).length !== 0 && ( - { - setOnePeiceFlow(true); - }} - /> - )} -
+ + + ({ + value: option.ProdName, + label: ( +
+
{ + setOnePeiceFlow(false); + }} + > + {option.ProdName}
- ), - })) - } - className="Search-auto-field" - ref={inputRef} - onChange={ProductNameOnChange} - onSelect={ProductOnSelect} - placeholder="Product Name (SHIFT + S)" - allowClear={{ - clearIcon: , - }} - autoFocus={autoCompleteVisible} - onFocus={handleFocus} - /> - - - {isMobile && screenWidth <= 768 && ( - // handleQrcode()} - // // onClick={() => OnfocusTrue()} - // /> - { - ProductNameOnChange(value, true); +
+ {option.ProductDetail?.filter( + (item) => item.OnePcsAvailable == 'Y' + ).length !== 0 && ( + { + setOnePeiceFlow(true); + }} + /> + )} +
+
+ ), + })) + } + className="Search-auto-field" + ref={inputRef} + onChange={ProductNameOnChange} + onSelect={ProductOnSelect} + placeholder="Product Name (SHIFT + S)" + allowClear={{ + clearIcon: , }} + autoFocus={autoCompleteVisible} + onFocus={handleFocus} /> - )} - - OnfocusTrue()} +
+ + {isMobile && screenWidth <= 768 && ( + // handleQrcode()} + // // onClick={() => OnfocusTrue()} + // /> + { + ProductNameOnChange(value, true); + }} /> -
- {ProductSearch?.length > 5 && - QuickAdd && - GetmultipleSearchDatas.some( - (e) => e.toLowerCase() === 'qrcode' - ) && ( -
- -
- )} - {BSComboData == 'Combo1' && - FeatureAddonData?.FeatureDtls?.find( - (item) => item?.FeatureAddonName?.toLowerCase() === 'weight scale' - ) && } -
- {expireModal?.open && ( - { - expireModal.onOk?.(); - closeExpireModal(); - }} - onCancel={() => { - expireModal.onCancel?.(); - closeExpireModal(); - }} - /> - )} + )} - - + OnfocusTrue()} + /> +
+ {ProductSearch?.length > 5 && + QuickAdd && + GetmultipleSearchDatas.some((e) => e.toLowerCase() === 'qrcode') && ( +
+
- } - open={modelQty} - width={widthBasedOnProdVariantDetails} - footer={null} - handleCancel={CloseModal} - > -
-
+ )} + {BSComboData == 'Combo1' && + FeatureAddonData?.FeatureDtls?.find( + (item) => item?.FeatureAddonName?.toLowerCase() === 'weight scale' + ) && } +
+ {expireModal?.open && ( + { + expireModal.onOk?.(); + closeExpireModal(); + }} + onCancel={() => { + expireModal.onCancel?.(); + closeExpireModal(); + }} + /> + )} + + + +
+ } + open={modelQty} + width={widthBasedOnProdVariantDetails} + footer={null} + handleCancel={CloseModal} + > +
+
+
+

Item Name:

+
+
+

{qtydata?.ProdName}

+
+
+
+ {Object.keys(brandMapping)?.map((brandId) => ( +
+
+

+ {' '} + {brandId !== 'null' && brandId !== 'undefined' + ? brandId + : ''} +

+
+ +
+ {brandMapping[brandId]?.map((item, index) => ( +
+
+ 0 || item?.StockAvailable !== 'Y' + ? 'ItemQtyCard' + : 'ItemQtyCard-disabled' + } + onClick={() => VarientFun(item)} + > +
+ {`Product +
+ +
+

+ {item?.Size + ' ' + item?.UomName} +

+ {returnQtyCount( + item?.ProdId, + item, + CartOrderDetails + ) > 0 || item?.StockAvailable !== 'Y' ? ( +

+ +   + { + item?.ProdVariantDetails?.[0]?.StockDetails?.[0] + ?.SellPrice + } +

+ ) : ( + '' + )} +
+
+
+ ))} +
+ {brandId !== 'null' && brandId !== 'undefined' ?
: ''} +
+ ))} + + {Object.keys(brandMapping).length === 0 && ( +

No product details available

+ )} +
+
+ + + +
+ } + open={modelstock} + // width={500} + footer={null} + handleCancel={CloseModal1} + > +
+
+

Item Name:

@@ -4680,204 +4795,82 @@ export default function BSC1Search(props) {

{qtydata?.ProdName}

-
- {Object.keys(brandMapping)?.map((brandId) => ( -
-
-

- {' '} - {brandId !== 'null' && brandId !== 'undefined' - ? brandId - : ''} -

-
- -
- {brandMapping[brandId]?.map((item, index) => ( -
-
0 || item?.StockAvailable !== 'Y' - ? 'ItemQtyCard' - : 'ItemQtyCard-disabled' - } - onClick={() => VarientFun(item)} - > -
- {`Product -
- -
-

- {item?.Size + ' ' + item?.UomName} -

- {returnQtyCount( - item?.ProdId, - item, - CartOrderDetails - ) > 0 || item?.StockAvailable !== 'Y' ? ( -

- -   - { - item?.ProdVariantDetails?.[0] - ?.StockDetails?.[0]?.SellPrice - } -

- ) : ( - '' - )} -
-
-
- ))} -
- {brandId !== 'null' && brandId !== 'undefined' ? ( -
- ) : ( - '' - )} -
- ))} - - {Object.keys(brandMapping).length === 0 && ( -

No product details available

- )} +
+
+

Item Quantity:

+
+
+

+ {qtydata?.ProductDetail?.[QtyIndex]?.Size}{' '} + {onePeiceFlow + ? 'PCS' + : qtydata?.ProductDetail?.[QtyIndex]?.UomName} +

+
- - - -
- } - open={modelstock} - // width={500} - footer={null} - handleCancel={CloseModal1} - > -
-
-
-
-

Item Name:

-
-
-

- {qtydata?.ProdName} -

-
+
+ +
+
+ + + +
+ } + open={ModalVarient} + width={500} + footer={null} + handleCancel={CloseVarientModal} + > +
+
+
+
+

Item Name:

-
-
-

Item Quantity:

-
-
-

- {qtydata?.ProductDetail?.[QtyIndex]?.Size}{' '} - {onePeiceFlow - ? 'PCS' - : qtydata?.ProductDetail?.[QtyIndex]?.UomName} -

-
+
+

{qtydata?.ProdName}

-
- +
+
+

Item Quantity:

+
+
+

+ {qtydata?.ProductDetail?.[QtyIndex]?.Size}{' '} + {onePeiceFlow + ? 'PCS' + : qtydata?.ProductDetail?.[QtyIndex]?.UomName} +

+
- - - -
- } - open={ModalVarient} - width={500} - footer={null} - handleCancel={CloseVarientModal} - > -
-
-
-
-

Item Name:

-
-
-

- {qtydata?.ProdName} -

-
-
-
-
-

Item Quantity:

-
-
-

- {qtydata?.ProductDetail?.[QtyIndex]?.Size}{' '} - {onePeiceFlow - ? 'PCS' - : qtydata?.ProductDetail?.[QtyIndex]?.UomName} -

-
-
-
-
- -
+
+
- - - +
+ + ); } diff --git a/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx b/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx index 256816a..210ccaa 100644 --- a/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx +++ b/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx @@ -165,13 +165,24 @@ const BSItemCard = (props) => { // const applyOffer = useApplyOfferto_CardDetail(); const preferenceDatas = useSelector(PreferenceData, shallowEqual); const { selectedDate } = useDateStore(); - const overAllLimitPreferenece = - preferenceDatas?.[0]?.['SettingDtlDetails']?.find( - (item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y'); - const itemWiseLimitPreferenece = - preferenceDatas?.[0]?.['SettingDtlDetails']?.find( - (item) => item.SettingIdName?.toLowerCase() === 'itemwiselimit' && item?.SettingValue === 'Y'); - const maxQtyLimit = itemWiseLimitPreferenece?.SettingCount || overAllLimitPreferenece?.SettingCount || null; + const overAllLimitPreferenece = preferenceDatas?.[0]?.[ + 'SettingDtlDetails' + ]?.find( + (item) => + item.SettingIdName?.toLowerCase() === 'overalllimit' && + item?.SettingValue === 'Y' + ); + const itemWiseLimitPreferenece = preferenceDatas?.[0]?.[ + 'SettingDtlDetails' + ]?.find( + (item) => + item.SettingIdName?.toLowerCase() === 'itemwiselimit' && + item?.SettingValue === 'Y' + ); + const maxQtyLimit = + itemWiseLimitPreferenece?.SettingCount || + overAllLimitPreferenece?.SettingCount || + null; const preferenceOffer = preferenceDatas?.[0]?.['SettingDtlDetails']?.find( (item) => item.SettingIdName === 'Offer' @@ -625,7 +636,7 @@ const BSItemCard = (props) => { WithoutTaxRate: availableFreeQty * item.OrderRate - (availableFreeQty * item.OrderRate * item.TaxPercentage) / - 100, + 100, Offer: availableFreeQty * item.OrderRate, }; @@ -674,7 +685,7 @@ const BSItemCard = (props) => { ((existingPaidItem.OrderQty + excessQty) * item.OrderRate * item.TaxPercentage) / - 100, + 100, }; ModifiedData.push(mergedPaidItem); @@ -709,7 +720,7 @@ const BSItemCard = (props) => { data?.InwardDtlId === item?.InwardDtlId && data?.ProdId === item?.ProdId && data?.OfferMessage?.[0]?.OfferId === - item?.OfferMessage?.[0]?.OfferId + item?.OfferMessage?.[0]?.OfferId ); if (isAlreadyExists !== -1) { @@ -729,11 +740,11 @@ const BSItemCard = (props) => { ).toFixed(2), WithoutTaxRate: (ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) * - item.OrderRate - + item.OrderRate - ((ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) * item.OrderRate * item.TaxPercentage) / - 100, + 100, Offer: (ModifiedData[isAlreadyExists].OrderQty + item.OrderQty) * item.OrderRate, @@ -759,10 +770,10 @@ const BSItemCard = (props) => { const appliedOfferAlreadyExists = AppliedOffers.findIndex( (offer) => offer?.FreeProductsList?.FreeProdId === - matchingFreeProduct?.FreeProdId && + matchingFreeProduct?.FreeProdId && offer?.TableName === matchingFreeProduct?.TableName && offer?.TableUniqueName === - matchingFreeProduct?.TableUniqueName && + matchingFreeProduct?.TableUniqueName && offer?.OfferId === matchingFreeProduct?.OfferId && offer?.OfferMode === matchingFreeProduct?.OfferMode && offer?.FreeProductsList?.ProdVariantDetails?.[0] @@ -1008,7 +1019,7 @@ const BSItemCard = (props) => { ? [] : SelectedDatas : ItemCard?.length == 0 || - (ItemCard?.[0]?.AppId === 0 && ItemCard?.[0]?.CompId === 0) + (ItemCard?.[0]?.AppId === 0 && ItemCard?.[0]?.CompId === 0) ? noSubcatCardData : ItemCard : ''; @@ -1113,14 +1124,14 @@ const BSItemCard = (props) => { ProdSubCat: ProdSubCat, ...(AvailableDate && selectedDate ? { - date: Array.isArray(selectedDate) - ? selectedDate - .map((d) => (d?.format ? d.format('YYYY-MM-DD') : d)) - .join(',') - : selectedDate?.format - ? selectedDate.format('YYYY-MM-DD') - : selectedDate, - } + date: Array.isArray(selectedDate) + ? selectedDate + .map((d) => (d?.format ? d.format('YYYY-MM-DD') : d)) + .join(',') + : selectedDate?.format + ? selectedDate.format('YYYY-MM-DD') + : selectedDate, + } : {}), }; //mohan @@ -1167,14 +1178,14 @@ const BSItemCard = (props) => { prodCat: ProdCat, ...(AvailableDate && selectedDate ? { - date: Array.isArray(selectedDate) - ? selectedDate - .map((d) => (d?.format ? d.format('YYYY-MM-DD') : d)) - .join(',') - : selectedDate?.format - ? selectedDate.format('YYYY-MM-DD') - : selectedDate, - } + date: Array.isArray(selectedDate) + ? selectedDate + .map((d) => (d?.format ? d.format('YYYY-MM-DD') : d)) + .join(',') + : selectedDate?.format + ? selectedDate.format('YYYY-MM-DD') + : selectedDate, + } : {}), }; @@ -1299,7 +1310,7 @@ const BSItemCard = (props) => { SinglePc: otherscarddata?.SinglePc, CounterName: '', //sri }; - AddOrderDetails(data,otherscarddata?.Quantity); + AddOrderDetails(data, otherscarddata?.Quantity); } // data["OrderRate"] = otherscarddata?.SellPrice }, [otherscarddata]); @@ -1380,13 +1391,13 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.SellPrice && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1395,9 +1406,9 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -1439,11 +1450,11 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[0]?.InwardDtlId && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] + ?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] - ?.StockDetails?.[0]?.SellPrice && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex] + ?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1452,9 +1463,9 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === item?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -1535,13 +1546,13 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1549,11 +1560,11 @@ const BSItemCard = (props) => { let Isincartonepc = CartOrderDetails?.filter( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -1621,13 +1632,13 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1636,9 +1647,9 @@ const BSItemCard = (props) => { (cartItem) => cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -1806,15 +1817,15 @@ const BSItemCard = (props) => { let Isincart = CartOrderDetails?.find( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1822,11 +1833,11 @@ const BSItemCard = (props) => { let Isincartonepc = CartOrderDetails?.filter( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -1905,15 +1916,15 @@ const BSItemCard = (props) => { let Isincart = CartOrderDetails?.find( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1921,11 +1932,11 @@ const BSItemCard = (props) => { let Isincartonepc = CartOrderDetails?.filter( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -2080,11 +2091,11 @@ const BSItemCard = (props) => { return dateVal; }; - const AddOrderDetails = async (item,Qty=1) => { + const AddOrderDetails = async (item, Qty = 1) => { if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) { if (overAllLimitPreferenece) { const calculatedOverAllQty = calculateOverAllQtyLimit(CartOrderDetails); - if ((calculatedOverAllQty + Qty) > maxQtyLimit) { + if (calculatedOverAllQty + Qty > maxQtyLimit) { setMessageData(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`); setMessageType('warning'); return; @@ -2184,15 +2195,15 @@ const BSItemCard = (props) => { const isExistsInFreeProdList = hasOffer ? FreeProdList?.filter( - (f) => - f?.FreeProdId === item?.ProdId && - f?.ProdVariantDetails?.some((variant) => - variant?.StockDetails?.some( - (stock) => stock?.FreeInwardDtlId === item?.InwardDtlId - ) - ) && - f?.RemainingQty > 0 - ) + (f) => + f?.FreeProdId === item?.ProdId && + f?.ProdVariantDetails?.some((variant) => + variant?.StockDetails?.some( + (stock) => stock?.FreeInwardDtlId === item?.InwardDtlId + ) + ) && + f?.RemainingQty > 0 + ) : []; const calculateTaxAmounts = (qty, rate, taxPercentage) => { @@ -2259,10 +2270,10 @@ const BSItemCard = (props) => { ((cartItem?.OfferModeType && cartItem?.OfferMode === 'B' ? true : cartItem?.OfferMode !== 'B') && - cartItem?.OfferMode !== 'P' && - cartItem?.OfferMode !== 'C' && - cartItem?.OfferMode !== 'O' && - cartItem?.OfferMode !== 'L' + cartItem?.OfferMode !== 'P' && + cartItem?.OfferMode !== 'C' && + cartItem?.OfferMode !== 'O' && + cartItem?.OfferMode !== 'L' ? true : cartItem?.Offer === 0) ); @@ -2273,10 +2284,10 @@ const BSItemCard = (props) => { ((cartItem?.OfferModeType && cartItem?.OfferMode === 'B' ? true : cartItem?.OfferMode !== 'B') && - cartItem?.OfferMode !== 'P' && - cartItem?.OfferMode !== 'C' && - cartItem?.OfferMode !== 'O' && - cartItem?.OfferMode !== 'L' + cartItem?.OfferMode !== 'P' && + cartItem?.OfferMode !== 'C' && + cartItem?.OfferMode !== 'O' && + cartItem?.OfferMode !== 'L' ? true : cartItem?.Offer === 0) ); @@ -2290,10 +2301,10 @@ const BSItemCard = (props) => { ((cartItem?.OfferModeType && cartItem?.OfferMode === 'B' ? true : cartItem?.OfferMode !== 'B') && - cartItem?.OfferMode !== 'P' && - cartItem?.OfferMode !== 'C' && - cartItem?.OfferMode !== 'O' && - cartItem?.OfferMode !== 'L' + cartItem?.OfferMode !== 'P' && + cartItem?.OfferMode !== 'C' && + cartItem?.OfferMode !== 'O' && + cartItem?.OfferMode !== 'L' ? true : cartItem?.Offer === 0) ) @@ -2306,10 +2317,10 @@ const BSItemCard = (props) => { ((cartItem?.OfferModeType && cartItem?.OfferMode === 'B' ? true : cartItem?.OfferMode !== 'B') && - cartItem?.OfferMode !== 'P' && - cartItem?.OfferMode !== 'C' && - cartItem?.OfferMode !== 'O' && - cartItem?.OfferMode !== 'L' + cartItem?.OfferMode !== 'P' && + cartItem?.OfferMode !== 'C' && + cartItem?.OfferMode !== 'O' && + cartItem?.OfferMode !== 'L' ? true : cartItem?.Offer === 0) ) @@ -2330,8 +2341,8 @@ const BSItemCard = (props) => { isItemInCart, item?.OtherProduct === 'Others' || item?.ScaleType === 'weight' ? ( - (item?.OrderQty || 0) + parseFloat(isItemInCart?.OrderQty) - )?.toFixed(3) + (item?.OrderQty || 0) + parseFloat(isItemInCart?.OrderQty) + )?.toFixed(3) : null ); const updatedData = addFirst @@ -2357,8 +2368,8 @@ const BSItemCard = (props) => { isItemInCartHold, item?.OtherProduct === 'Others' || item?.ScaleType === 'weight' ? ( - (item?.OrderQty || 0) + parseFloat(isItemInCartHold?.OrderQty) - )?.toFixed(3) + (item?.OrderQty || 0) + parseFloat(isItemInCartHold?.OrderQty) + )?.toFixed(3) : null ); const updatedData = addFirst @@ -2585,14 +2596,14 @@ const BSItemCard = (props) => { updatedCartData = cartData.map((item, idx) => idx === indexToCheck ? { - ...item, - Offer: null, - OfferMessage: undefined, - OfferMode: undefined, - OfferModeType: false, - OfferType: undefined, - OfferValue: null, - } + ...item, + Offer: null, + OfferMessage: undefined, + OfferMode: undefined, + OfferModeType: false, + OfferType: undefined, + OfferValue: null, + } : item ); } @@ -2643,8 +2654,8 @@ const BSItemCard = (props) => { ...item, Offer: sameProduct || - bestOffer?.OfferMode === 'I' || - bestOffer?.OfferMode === 'Q' + bestOffer?.OfferMode === 'I' || + bestOffer?.OfferMode === 'Q' ? bestOffer?.OfferAmount || item.Offer : item.Offer || bestOffer?.OfferAmount, OfferType: item?.OfferType || bestOffer?.OfferType, @@ -2661,10 +2672,10 @@ const BSItemCard = (props) => { ((c?.OfferModeType && c?.OfferMode === 'B' ? true : c?.OfferMode !== 'B') && - c?.OfferMode !== 'P' && - c?.OfferMode !== 'C' && - c?.OfferMode !== 'O' && - c?.OfferMode !== 'L' + c?.OfferMode !== 'P' && + c?.OfferMode !== 'C' && + c?.OfferMode !== 'O' && + c?.OfferMode !== 'L' ? true : c?.Offer === 0); @@ -3051,10 +3062,10 @@ const BSItemCard = (props) => { return FreeProdList.map((f, i) => i === index ? { - ...existing, - ...newFreeProd, - ProdVariantDetails: existing.ProdVariantDetails, - } + ...existing, + ...newFreeProd, + ProdVariantDetails: existing.ProdVariantDetails, + } : f ); } else { @@ -3124,7 +3135,7 @@ const BSItemCard = (props) => { const cycleSize = buyQty + getQty; const fullCycles = Math.floor( freeCartItem?.reduce((acc, fc) => acc + (fc?.OrderQty || 0), 0) / - cycleSize + cycleSize ); const totalFreeQty = fullCycles * getQty; @@ -3682,7 +3693,7 @@ const BSItemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) { } + } catch (_) {} let getCurrentProdDtl = orderDetails?.filter( (a) => a?.ProdName === ProdName ); @@ -3883,7 +3894,7 @@ const BSItemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) { } + } catch (_) {} let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId); let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => { return ( @@ -3919,7 +3930,7 @@ const BSItemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) { } + } catch (_) {} let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( parseInt(ItemQuantity) > @@ -4005,7 +4016,7 @@ const BSItemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) { } + } catch (_) {} let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId); let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => { return ( @@ -4044,7 +4055,7 @@ const BSItemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) { } + } catch (_) {} let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( parseInt(ItemQuantity) > @@ -4136,7 +4147,7 @@ const BSItemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) { } + } catch (_) {} let getCurrentProdDtl = orderDetails?.filter( (a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId ); @@ -4179,7 +4190,7 @@ const BSItemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) { } + } catch (_) {} let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( @@ -4263,7 +4274,7 @@ const BSItemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) { } + } catch (_) {} let getCurrentProdDtl = orderDetails?.filter( (a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId ); @@ -4310,7 +4321,7 @@ const BSItemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) { } + } catch (_) {} let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( @@ -4488,7 +4499,7 @@ const BSItemCard = (props) => { 0 || - record.StockCount === 'Stock Not Maintained' + record.StockCount === 'Stock Not Maintained' ? { color: '#000', cursor: 'pointer' } : { color: '#f49898', cursor: 'not-allowed' } } @@ -4518,7 +4529,7 @@ const BSItemCard = (props) => { 0 || - record.StockCount === 'Stock Not Maintained' + record.StockCount === 'Stock Not Maintained' ? { color: '#000', cursor: 'pointer' } : { color: '#f49898', cursor: 'not-allowed' } } @@ -4548,7 +4559,7 @@ const BSItemCard = (props) => { 0 || - record.StockCount === 'Stock Not Maintained' + record.StockCount === 'Stock Not Maintained' ? { color: '#000', cursor: 'pointer' } : { color: '#f49898', cursor: 'not-allowed' } } @@ -4723,17 +4734,17 @@ const BSItemCard = (props) => { qtydata?.ProductDetail?.[QtyIndex]?.StockAvailable === 'Y' ? onePeiceFlow ? returnVariantStock( - qtydata?.ProductDetail?.[QtyIndex]?.ProdId, - item?.OverAllPcs, - CartOrderDetails, - item?.ProdVariantName - ) + qtydata?.ProductDetail?.[QtyIndex]?.ProdId, + item?.OverAllPcs, + CartOrderDetails, + item?.ProdVariantName + ) : returnVariantStock( - qtydata?.ProductDetail?.[QtyIndex]?.ProdId, - item?.OverAllQty, - CartOrderDetails, - item?.ProdVariantName - ) + qtydata?.ProductDetail?.[QtyIndex]?.ProdId, + item?.OverAllQty, + CartOrderDetails, + item?.ProdVariantName + ) : 'Stock Not Maintained', VariantAvailableFrom: item?.AvailableFrom, VariantAvailableTo: item?.AvailableTo, @@ -4755,20 +4766,20 @@ const BSItemCard = (props) => { 'Batch No': item?.BatchRef, StockCount: onePeiceFlow ? returnCountStock( - item?.ProdId, - item?.OverAllPcs, - CartOrderDetails, - item?.InwardDtlId, - 'Y' - ) + item?.ProdId, + item?.OverAllPcs, + CartOrderDetails, + item?.InwardDtlId, + 'Y' + ) : returnCountStock( - item?.ProdId, - item?.BalanceQty, - CartOrderDetails, - item?.InwardDtlId, - 'N', - item?.OverAllPcs - ), + item?.ProdId, + item?.BalanceQty, + CartOrderDetails, + item?.InwardDtlId, + 'N', + item?.OverAllPcs + ), 'Stock Date': ExtractDateFormate(item?.InwardDate), Price: onePeiceFlow ? item?.OnePcsPrice : item?.SellPrice, ExpDate: @@ -5918,9 +5929,9 @@ const BSItemCard = (props) => { allProducts.forEach((product) => { const brandName = product.BrandName && - product.BrandName !== 'null' && - product.BrandName !== 'undefined' && - product.BrandName.trim() !== '' + product.BrandName !== 'null' && + product.BrandName !== 'undefined' && + product.BrandName.trim() !== '' ? product.BrandName : 'Others'; @@ -5954,13 +5965,13 @@ const BSItemCard = (props) => { const result = prodname ? (cardData || [])?.filter( - (item) => - normalize(item.ProdName).includes(normalize(prodname)) || - normalize(item.ProdCatName).includes(normalize(prodname)) || - item.ProductDetail?.some((detail) => - normalize(detail.ProdName).includes(normalize(prodname)) - ) - ) + (item) => + normalize(item.ProdName).includes(normalize(prodname)) || + normalize(item.ProdCatName).includes(normalize(prodname)) || + item.ProductDetail?.some((detail) => + normalize(detail.ProdName).includes(normalize(prodname)) + ) + ) : cardData; console.log(prodQty, 'cardDatacardData', result, prodname); @@ -5980,8 +5991,8 @@ const BSItemCard = (props) => { CardOnclick( result?.[0], result?.[0]?.OnePcsAvailable === 'Y' && - preferenceSingleSales && - 'OnePeiceProduct' + preferenceSingleSales && + 'OnePeiceProduct' ); // AddOrderDetails2(result?.[0]) } else if (item?.OverAllQty < prodQty) { @@ -6040,8 +6051,8 @@ const BSItemCard = (props) => { zIndex: '12', top: templateData?.BookingLayout?.[0] === 'Layout5' || - templateData?.BookingLayout?.[0] === 'Layout4' || - templateData?.BookingLayout?.[0] === 'Layout6' + templateData?.BookingLayout?.[0] === 'Layout4' || + templateData?.BookingLayout?.[0] === 'Layout6' ? '2.5rem' : '', }} @@ -6121,21 +6132,21 @@ const BSItemCard = (props) => { }} className={ (item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllQty, - CartOrderDetails, - item?.OverAllPcs - ) + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllQty, + CartOrderDetails, + item?.OverAllPcs + ) : returnOnepcCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || - item?.ProductDetail?.some( - (item) => item?.StockAvailable !== 'Y' - ) + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || + item?.ProductDetail?.some( + (item) => item?.StockAvailable !== 'Y' + ) ? 'BkPrdCardActive' : 'BkPrdCardDeActive' } @@ -6173,39 +6184,39 @@ const BSItemCard = (props) => { cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), padding: !cardFunction?.ImageUp && - !cardFunction?.ImageDown + !cardFunction?.ImageDown ? cardFunction?.SmallImage && - '5px 9px' + '5px 9px' : '8px 2px', flexDirection: cardFunction?.ImageRight && - 'row-reverse' + 'row-reverse' ? cardFunction?.ImageRight && - 'row-reverse' + 'row-reverse' : cardFunction?.ImageUp && 'column' ? cardFunction?.ImageUp && - 'column' + 'column' : cardFunction?.ImageDown && - 'column-reverse' + 'column-reverse' ? cardFunction?.ImageDown && - 'column-reverse' + 'column-reverse' : cardFunction?.ImageLeft && - 'row', + 'row', borderRadius: cardFunction?.EdgeCurve && '6px', width: !cardFunction?.ImageUp && - !cardFunction?.ImageDown && - !cardFunction?.BigImage && - !cardFunction?.ImageRight && - cardFunction?.SmallImage && - (cardFunction?.ImageUp || - cardFunction?.ImageDown) + !cardFunction?.ImageDown && + !cardFunction?.BigImage && + !cardFunction?.ImageRight && + cardFunction?.SmallImage && + (cardFunction?.ImageUp || + cardFunction?.ImageDown) ? '6rem' : cardFunction?.BigImage && '9rem', height: @@ -6238,19 +6249,19 @@ const BSItemCard = (props) => { if ( !( (item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails - ) + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails + ) : returnOnepcCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || item?.ProductDetail?.some( (item) => item?.StockAvailable !== 'Y' @@ -6262,8 +6273,8 @@ const BSItemCard = (props) => { CardOnclick( item, item?.OnePcsAvailable === 'Y' && - preferenceSingleSales && - 'OnePeiceProduct' + preferenceSingleSales && + 'OnePeiceProduct' ); } }} @@ -6272,39 +6283,39 @@ const BSItemCard = (props) => { > {(cardFunction?.BigImage || cardFunction?.SmallImage) && ( - - )} + ? item?.ProductDetail?.[0] + ?.ProdLogo + : defaultimage + } + alt="" + /> + )}
{ cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), position: !cardFunction?.BigImage @@ -6338,7 +6349,7 @@ const BSItemCard = (props) => { height: cardFunction?.SmallImage ? '5.5rem' : !cardFunction?.BigImage && - '5.5rem', + '5.5rem', alignItems: !cardFunction?.BigImage && !cardFunction?.SmallImage && @@ -6361,11 +6372,11 @@ const BSItemCard = (props) => { 'uppercase', width: !cardFunction?.SmallImage ? cardFunction?.BigImage && - '120px' + '120px' : cardFunction?.SmallImage && - !cardFunction?.ImageUp && - !cardFunction?.ImageDown && - '85px', + !cardFunction?.ImageUp && + !cardFunction?.ImageDown && + '85px', // Width: cardFunction?.BigImage && "70px", fontSize: !cardFunction?.BigImage && @@ -6387,24 +6398,24 @@ const BSItemCard = (props) => { > {item?.ProdName}{' '} {(item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails, - item - ) + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails, + item + ) : returnOnepcCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || - item?.ProductDetail?.some( - (item) => - item?.StockAvailable !== 'Y' - ) ? ( + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || + item?.ProductDetail?.some( + (item) => + item?.StockAvailable !== 'Y' + ) ? ( '' ) : (

{ fontSize: !cardFunction?.SmallImage ? cardFunction?.BigImage && - '12px' + '12px' : '12px', textAlign: 'center', lineHeight: '2', @@ -6443,8 +6454,8 @@ const BSItemCard = (props) => { : '', color: SelectedCardColor ? SelectedCardColor?.[ - 'FontColor' - ] + 'FontColor' + ] : '', }} > @@ -6492,19 +6503,19 @@ const BSItemCard = (props) => { count={ !preferenceSingleSales ? returnCount( - item - ?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails - ) + item + ?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails + ) : returnOnepcCount( - item - ?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) + item + ?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) } overflowCount={10000} > @@ -6556,14 +6567,14 @@ const BSItemCard = (props) => { item?.OverAllPcs, CartOrderDetails ) > 0 || - item?.ProductDetail?.some( - (product) => - product?.StockAvailable !== - 'Y' - ) + item?.ProductDetail?.some( + (product) => + product?.StockAvailable !== + 'Y' + ) ? cardFunction?.Background ? SelectedCardColor?.BackgroundColor || - '#000000' + '#000000' : '#fff' : '#ff4d4f', }} @@ -6605,39 +6616,39 @@ const BSItemCard = (props) => { cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), padding: !cardFunction?.ImageUp && - !cardFunction?.ImageDown + !cardFunction?.ImageDown ? cardFunction?.SmallImage && - '5px 9px' + '5px 9px' : '8px 2px', flexDirection: cardFunction?.ImageRight && - 'row-reverse' + 'row-reverse' ? cardFunction?.ImageRight && - 'row-reverse' + 'row-reverse' : cardFunction?.ImageUp && 'column' ? cardFunction?.ImageUp && - 'column' + 'column' : cardFunction?.ImageDown && - 'column-reverse' + 'column-reverse' ? cardFunction?.ImageDown && - 'column-reverse' + 'column-reverse' : cardFunction?.ImageLeft && - 'row', + 'row', borderRadius: cardFunction?.EdgeCurve && '6px', width: !cardFunction?.ImageUp && - !cardFunction?.ImageDown && - !cardFunction?.BigImage && - !cardFunction?.ImageRight && - cardFunction?.SmallImage && - (cardFunction?.ImageUp || - cardFunction?.ImageDown) + !cardFunction?.ImageDown && + !cardFunction?.BigImage && + !cardFunction?.ImageRight && + cardFunction?.SmallImage && + (cardFunction?.ImageUp || + cardFunction?.ImageDown) ? '6rem' : cardFunction?.BigImage && '9rem', height: @@ -6655,19 +6666,19 @@ const BSItemCard = (props) => { if ( !( (item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails - ) + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails + ) : returnOnepcCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || item?.ProductDetail?.some( (item) => item?.StockAvailable !== 'Y' @@ -6679,48 +6690,48 @@ const BSItemCard = (props) => { CardOnclick( item, item?.OnePcsAvailable === 'Y' && - preferenceSingleSales && - 'OnePeiceProduct' + preferenceSingleSales && + 'OnePeiceProduct' ); } }} - // data-aos="zoom-in" data-aos-duration="600" + // data-aos="zoom-in" data-aos-duration="600" > {(cardFunction?.BigImage || cardFunction?.SmallImage) && ( - - )} + ? item?.ProductDetail?.[0] + ?.ProdLogo + : defaultimage + } + alt="" + /> + )}

{ cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), position: !cardFunction?.BigImage @@ -6754,7 +6765,7 @@ const BSItemCard = (props) => { height: cardFunction?.SmallImage ? '5.5rem' : !cardFunction?.BigImage && - '4.5rem', + '4.5rem', alignItems: !cardFunction?.BigImage && !cardFunction?.SmallImage && @@ -6774,11 +6785,11 @@ const BSItemCard = (props) => { 'uppercase', width: !cardFunction?.SmallImage ? cardFunction?.BigImage && - '120px' + '120px' : cardFunction?.SmallImage && - !cardFunction?.ImageUp && - !cardFunction?.ImageDown && - '85px', + !cardFunction?.ImageUp && + !cardFunction?.ImageDown && + '85px', // Width: cardFunction?.BigImage && "70px", fontSize: !cardFunction?.BigImage && @@ -6800,24 +6811,24 @@ const BSItemCard = (props) => { > {item?.ProdName}{' '} {(item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails, - item - ) + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails, + item + ) : returnOnepcCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || - item?.ProductDetail?.some( - (item) => - item?.StockAvailable !== 'Y' - ) ? ( + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || + item?.ProductDetail?.some( + (item) => + item?.StockAvailable !== 'Y' + ) ? ( '' ) : (

{ fontSize: !cardFunction?.SmallImage ? cardFunction?.BigImage && - '12px' + '12px' : '12px', textAlign: 'center', lineHeight: '2', @@ -6856,8 +6867,8 @@ const BSItemCard = (props) => { : '', color: SelectedCardColor ? SelectedCardColor?.[ - 'FontColor' - ] + 'FontColor' + ] : '', }} > @@ -6902,19 +6913,19 @@ const BSItemCard = (props) => { count={ !preferenceSingleSales ? returnCount( - item - ?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails - ) + item + ?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails + ) : returnOnepcCount( - item - ?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) + item + ?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) } overflowCount={10000} > @@ -6965,14 +6976,14 @@ const BSItemCard = (props) => { item?.OverAllPcs, CartOrderDetails ) > 0 || - item?.ProductDetail?.some( - (product) => - product?.StockAvailable !== - 'Y' - ) + item?.ProductDetail?.some( + (product) => + product?.StockAvailable !== + 'Y' + ) ? cardFunction?.Background ? SelectedCardColor?.BackgroundColor || - '#000000' + '#000000' : '#fff' : '#ff4d4f', }} @@ -6987,21 +6998,21 @@ const BSItemCard = (props) => {

0) || - item?.ProductDetail?.some( - (item) => item?.StockAvailable !== 'Y' - ) + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || + item?.ProductDetail?.some( + (item) => item?.StockAvailable !== 'Y' + ) ? 'card4Main card4Main-active' : 'card4Main card4Main-deactive' } @@ -7024,17 +7035,17 @@ const BSItemCard = (props) => { if ( !( (item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllQty, - CartOrderDetails - ) + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllQty, + CartOrderDetails + ) : returnOnepcCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || item?.ProductDetail?.some( (item) => item?.StockAvailable !== 'Y' ) @@ -7049,8 +7060,8 @@ const BSItemCard = (props) => { CardOnclick( item, item?.OnePcsAvailable === 'Y' && - preferenceSingleSales && - 'OnePeiceProduct' + preferenceSingleSales && + 'OnePeiceProduct' ); // This will trigger if you're clicking outside the "One Piece" button } @@ -7092,7 +7103,7 @@ const BSItemCard = (props) => { height={60} src={ item?.ProductDetail?.[0]?.ProdLogo === - '' + '' ? defaultimage : item?.ProductDetail?.[0]?.ProdLogo ? item?.ProductDetail?.[0]?.ProdLogo @@ -7107,21 +7118,21 @@ const BSItemCard = (props) => {
{item?.ProdName} {(item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllQty, - CartOrderDetails, - item - ) + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllQty, + CartOrderDetails, + item + ) : returnOnepcCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || - item?.ProductDetail?.some( - (item) => item?.StockAvailable !== 'Y' - ) ? ( + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || + item?.ProductDetail?.some( + (item) => item?.StockAvailable !== 'Y' + ) ? ( '' ) : (

{ )}

{((item?.OverAllQty !== undefined && - !preferenceSingleSales + !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllQty, - CartOrderDetails, - item - ) + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllQty, + CartOrderDetails, + item + ) : returnOnepcCount( - item?.ProductDetail?.[0]?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) > 0) || + item?.ProductDetail?.[0]?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) > 0) || item?.ProductDetail?.some( (item) => item?.StockAvailable !== 'Y' )) && ( -
-
- ₹ {ItemSellingPrice(item)} -
- -
- <> - ({ItemSize(item)} {ItemUomName(item)}) - -
+
+
+ ₹ {ItemSellingPrice(item)}
- )} + +
+ <> + ({ItemSize(item)} {ItemUomName(item)}) + +
+
+ )}
{/* Stock Count Badge */} @@ -7187,17 +7198,17 @@ const BSItemCard = (props) => { count={ !preferenceSingleSales ? returnCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllQty, - CartOrderDetails - ) + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllQty, + CartOrderDetails + ) : returnOnepcCount( - item?.ProductDetail?.[0] - ?.ProdName, - item?.OverAllPcs, - CartOrderDetails - ) + item?.ProductDetail?.[0] + ?.ProdName, + item?.OverAllPcs, + CartOrderDetails + ) } overflowCount={10000} > @@ -7246,13 +7257,13 @@ const BSItemCard = (props) => { item?.OverAllPcs, CartOrderDetails ) > 0 || - item?.ProductDetail?.some( - (product) => - product?.StockAvailable !== 'Y' - ) + item?.ProductDetail?.some( + (product) => + product?.StockAvailable !== 'Y' + ) ? cardFunction?.Background ? SelectedCardColor?.BackgroundColor || - '#000000' + '#000000' : '#fff' : '#ff4d4f', }} @@ -7433,16 +7444,6 @@ const BSItemCard = (props) => { onTouchStart={handleTouchStart} onTouchMove={handleTouchMove} onTouchEnd={handleTouchEnd} - // style={{ - // marginTop: "1rem", - // display: "flex", - // gap: "1rem", - // overflowX: "auto", - // cursor: "grab", - // pointerEvents: OrderType === "Failed" ? "none" : "auto", - // scrollBehavior: "smooth", - // padding: "0 2rem", // space for arrows - // }} style={{ cursor: 'grab', overflowX: 'auto', @@ -7469,7 +7470,8 @@ const BSItemCard = (props) => { userSelect: 'none', textAlign: 'center', fontWeight: - selectedBrand === brand ? 'bold' : 'normal', + selectedBrand === brand ? '600' : 'normal', + fontFamily: 'Poppins', }} > {brand === 'Others' ? 'Others' : brand} @@ -7643,16 +7645,16 @@ const BSItemCard = (props) => { ]?.ProdVariantName?.toLowerCase()?.includes( 'variant' ) && ( - - ( - { - qtydata?.ProductDetail?.[QtyIndex] - ?.ProdVariantDetails?.[VarientIndex] - ?.ProdVariantName - } - ){' '} - - )} + + ( + { + qtydata?.ProductDetail?.[QtyIndex] + ?.ProdVariantDetails?.[VarientIndex] + ?.ProdVariantName + } + ){' '} + + )}

diff --git a/src/Pages/BookingScreen/Components/BSItemCards/BsBookingitemCard.jsx b/src/Pages/BookingScreen/Components/BSItemCards/BsBookingitemCard.jsx index 3f4c2bd..3944866 100644 --- a/src/Pages/BookingScreen/Components/BSItemCards/BsBookingitemCard.jsx +++ b/src/Pages/BookingScreen/Components/BSItemCards/BsBookingitemCard.jsx @@ -428,9 +428,9 @@ const BsBookingitemCard = (props) => { AppId: AppId, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; await dispatch(getSelectedFavItems(data)).unwrap(); @@ -663,9 +663,9 @@ const BsBookingitemCard = (props) => { AppId: AppId, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; await dispatch(getSelectedFavItems(data)).unwrap(); @@ -757,9 +757,9 @@ const BsBookingitemCard = (props) => { AppId: AppId, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; await dispatch(getSelectedFavItems(data)).unwrap(); @@ -1004,7 +1004,7 @@ const BsBookingitemCard = (props) => { ? [] : SelectedDatas : ItemCard?.length == 0 || - (ItemCard?.[0]?.AppId === 0 && ItemCard?.[0]?.CompId === 0) + (ItemCard?.[0]?.AppId === 0 && ItemCard?.[0]?.CompId === 0) ? noSubcatCardData : ItemCard : ''; @@ -1108,9 +1108,9 @@ const BsBookingitemCard = (props) => { AppId: AppId, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; dispatch(getSelectedFavItems(data)).unwrap(); @@ -1172,9 +1172,9 @@ const BsBookingitemCard = (props) => { ProdSubCat: currentProdSubCat, ...(AvailableDate && currentDateRef ? { - fromDate: currentDateRef?.[0], - toDate: currentDateRef?.[1], - } + fromDate: currentDateRef?.[0], + toDate: currentDateRef?.[1], + } : {}), }; //mohan @@ -1195,9 +1195,9 @@ const BsBookingitemCard = (props) => { prodCat: currentProdCat, ...(AvailableDate && currentDateRef ? { - fromDate: currentDateRef?.[0], - toDate: currentDateRef?.[1], - } + fromDate: currentDateRef?.[0], + toDate: currentDateRef?.[1], + } : {}), }; @@ -1221,9 +1221,9 @@ const BsBookingitemCard = (props) => { prodCat: currentProdCat, ...(AvailableDate && currentDateRef ? { - fromDate: currentDateRef?.[0], - toDate: currentDateRef?.[1], - } + fromDate: currentDateRef?.[0], + toDate: currentDateRef?.[1], + } : {}), }; @@ -1271,9 +1271,9 @@ const BsBookingitemCard = (props) => { AppId: AppId, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; let res = await dispatch(getEditFavItems(data)).unwrap(); @@ -1480,13 +1480,13 @@ const BsBookingitemCard = (props) => { (cartItem) => cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1494,11 +1494,11 @@ const BsBookingitemCard = (props) => { let Isincartonepc = CartOrderDetails?.filter( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -1591,13 +1591,13 @@ const BsBookingitemCard = (props) => { (cartItem) => cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1606,9 +1606,9 @@ const BsBookingitemCard = (props) => { (cartItem) => cartItem?.ProdId === qtydata?.ProductDetail?.[QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ - index.key - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[ + index.key + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -1756,15 +1756,15 @@ const BsBookingitemCard = (props) => { let Isincart = CartOrderDetails?.find( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1772,11 +1772,11 @@ const BsBookingitemCard = (props) => { let Isincartonepc = CartOrderDetails?.filter( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -1855,15 +1855,15 @@ const BsBookingitemCard = (props) => { let Isincart = CartOrderDetails?.find( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && cartItem?.OrderRate === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.SellPrice && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.SellPrice && !cartItem?.SalesId ); @@ -1871,11 +1871,11 @@ const BsBookingitemCard = (props) => { let Isincartonepc = CartOrderDetails?.filter( (cartItem) => cartItem?.ProdId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdId && cartItem?.InwardDtlId === - qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ - item?.VarientIndex - ]?.StockDetails?.[0]?.InwardDtlId && + qtydata?.ProductDetail?.[item?.QtyIndex]?.ProdVariantDetails?.[ + item?.VarientIndex + ]?.StockDetails?.[0]?.InwardDtlId && // (cartItem?.OrderRate === item?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[VarientIndex]?.StockDetails?.[0]?.SellPrice) !cartItem?.SalesId ); @@ -2310,7 +2310,7 @@ const BsBookingitemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) { } + } catch (_) {} let getCurrentProdDtl = orderDetails?.filter( (a) => a?.ProdName === ProdName ); @@ -2511,7 +2511,7 @@ const BsBookingitemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) { } + } catch (_) {} let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId); let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => { return ( @@ -2547,7 +2547,7 @@ const BsBookingitemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) { } + } catch (_) {} let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( parseInt(ItemQuantity) > @@ -2633,7 +2633,7 @@ const BsBookingitemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) { } + } catch (_) {} let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId); let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => { return ( @@ -2672,7 +2672,7 @@ const BsBookingitemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) { } + } catch (_) {} let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( parseInt(ItemQuantity) > @@ -2764,7 +2764,7 @@ const BsBookingitemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) { } + } catch (_) {} let getCurrentProdDtl = orderDetails?.filter( (a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId ); @@ -2807,7 +2807,7 @@ const BsBookingitemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) { } + } catch (_) {} let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( @@ -2891,7 +2891,7 @@ const BsBookingitemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) { } + } catch (_) {} let getCurrentProdDtl = orderDetails?.filter( (a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId ); @@ -2938,7 +2938,7 @@ const BsBookingitemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) { } + } catch (_) {} let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( @@ -2977,7 +2977,7 @@ const BsBookingitemCard = (props) => { const same = item?.InwardDtlId === data?.InwardDtlId && item?.ProdVariantName?.toLowerCase() === - data?.VarientName?.toLowerCase() && + data?.VarientName?.toLowerCase() && item?.VariantAvailableFrom === data?.VariantAvailableFrom && item?.VariantAvailableTo === data?.VariantAvailableTo && item?.BookedDate && @@ -3002,7 +3002,7 @@ const BsBookingitemCard = (props) => { 0 || - record.StockCount === 'Stock Not Maintained' + record.StockCount === 'Stock Not Maintained' ? { color: '#000', cursor: 'pointer' } : { color: '#f49898', cursor: 'not-allowed' } } @@ -3032,7 +3032,7 @@ const BsBookingitemCard = (props) => { 0 || - record.StockCount === 'Stock Not Maintained' + record.StockCount === 'Stock Not Maintained' ? { color: '#000', cursor: 'pointer' } : { color: '#f49898', cursor: 'not-allowed' } } @@ -3062,7 +3062,7 @@ const BsBookingitemCard = (props) => { 0 || - record.StockCount === 'Stock Not Maintained' + record.StockCount === 'Stock Not Maintained' ? { color: '#000', cursor: 'pointer' } : { color: '#f49898', cursor: 'not-allowed' } } @@ -3316,20 +3316,20 @@ const BsBookingitemCard = (props) => { 'Batch No': item?.BatchRef, StockCount: onePeiceFlow ? returnCountStock( - item?.ProdId, - item?.OverAllPcs, - CartOrderDetails, - item?.InwardDtlId, - 'Y' - ) + item?.ProdId, + item?.OverAllPcs, + CartOrderDetails, + item?.InwardDtlId, + 'Y' + ) : returnCountStock( - item?.ProdId, - item?.BalanceQty, - CartOrderDetails, - item?.InwardDtlId, - 'N', - item?.OverAllPcs - ), + item?.ProdId, + item?.BalanceQty, + CartOrderDetails, + item?.InwardDtlId, + 'N', + item?.OverAllPcs + ), 'Stock Date': ExtractDateFormate(item?.InwardDate), Price: onePeiceFlow ? item?.OnePcsPrice : item?.SellPrice, ExpDate: @@ -3633,9 +3633,9 @@ const BsBookingitemCard = (props) => { AppId, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; @@ -3667,9 +3667,9 @@ const BsBookingitemCard = (props) => { prodCat: ProdCat, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; @@ -4495,9 +4495,9 @@ const BsBookingitemCard = (props) => { allProducts.forEach((product) => { const brandName = product.BrandName && - product.BrandName !== 'null' && - product.BrandName !== 'undefined' && - product.BrandName.trim() !== '' + product.BrandName !== 'null' && + product.BrandName !== 'undefined' && + product.BrandName.trim() !== '' ? product.BrandName : 'Others'; @@ -4531,13 +4531,13 @@ const BsBookingitemCard = (props) => { const result = prodname ? (cardData || [])?.filter( - (item) => - normalize(item.ProdName).includes(normalize(prodname)) || - normalize(item.ProdCatName).includes(normalize(prodname)) || - item.ProductDetail?.some((detail) => - normalize(detail.ProdName).includes(normalize(prodname)) - ) - ) + (item) => + normalize(item.ProdName).includes(normalize(prodname)) || + normalize(item.ProdCatName).includes(normalize(prodname)) || + item.ProductDetail?.some((detail) => + normalize(detail.ProdName).includes(normalize(prodname)) + ) + ) : cardData; const getDatePickerValue = (selectedDate) => { @@ -4594,8 +4594,8 @@ const BsBookingitemCard = (props) => { zIndex: '12', top: templateData?.BookingLayout?.[0] === 'Layout5' || - templateData?.BookingLayout?.[0] === 'Layout4' || - templateData?.BookingLayout?.[0] === 'Layout6' + templateData?.BookingLayout?.[0] === 'Layout4' || + templateData?.BookingLayout?.[0] === 'Layout6' ? '2.5rem' : '', }} @@ -4707,39 +4707,39 @@ const BsBookingitemCard = (props) => { cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), padding: !cardFunction?.ImageUp && - !cardFunction?.ImageDown + !cardFunction?.ImageDown ? cardFunction?.SmallImage && - '5px 9px' + '5px 9px' : '8px 2px', flexDirection: cardFunction?.ImageRight && - 'row-reverse' + 'row-reverse' ? cardFunction?.ImageRight && - 'row-reverse' + 'row-reverse' : cardFunction?.ImageUp && 'column' ? cardFunction?.ImageUp && - 'column' + 'column' : cardFunction?.ImageDown && - 'column-reverse' + 'column-reverse' ? cardFunction?.ImageDown && - 'column-reverse' + 'column-reverse' : cardFunction?.ImageLeft && - 'row', + 'row', borderRadius: cardFunction?.EdgeCurve && '6px', width: !cardFunction?.ImageUp && - !cardFunction?.ImageDown && - !cardFunction?.BigImage && - !cardFunction?.ImageRight && - cardFunction?.SmallImage && - (cardFunction?.ImageUp || - cardFunction?.ImageDown) + !cardFunction?.ImageDown && + !cardFunction?.BigImage && + !cardFunction?.ImageRight && + cardFunction?.SmallImage && + (cardFunction?.ImageUp || + cardFunction?.ImageDown) ? '6rem' : cardFunction?.BigImage && '9rem', height: @@ -4761,39 +4761,39 @@ const BsBookingitemCard = (props) => { > {(cardFunction?.BigImage || cardFunction?.SmallImage) && ( - - )} + ? item?.ProductDetail?.[0] + ?.ProdLogo + : defaultimage + } + alt="" + /> + )}
{ cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), position: !cardFunction?.BigImage @@ -4827,7 +4827,7 @@ const BsBookingitemCard = (props) => { height: cardFunction?.SmallImage ? '5.5rem' : !cardFunction?.BigImage && - '5.5rem', + '5.5rem', alignItems: !cardFunction?.BigImage && !cardFunction?.SmallImage && @@ -4850,11 +4850,11 @@ const BsBookingitemCard = (props) => { 'uppercase', width: !cardFunction?.SmallImage ? cardFunction?.BigImage && - '120px' + '120px' : cardFunction?.SmallImage && - !cardFunction?.ImageUp && - !cardFunction?.ImageDown && - '85px', + !cardFunction?.ImageUp && + !cardFunction?.ImageDown && + '85px', // Width: cardFunction?.BigImage && "70px", fontSize: !cardFunction?.BigImage && @@ -4875,7 +4875,7 @@ const BsBookingitemCard = (props) => { className="BSItemCard-itemName" > {item?.ProdName} - { } + {}

{cardFunction?.Price && (

{ fontSize: !cardFunction?.SmallImage ? cardFunction?.BigImage && - '12px' + '12px' : '12px', textAlign: 'center', lineHeight: '2', @@ -4893,8 +4893,8 @@ const BsBookingitemCard = (props) => { : '', color: SelectedCardColor ? SelectedCardColor?.[ - 'FontColor' - ] + 'FontColor' + ] : '', }} > @@ -4980,39 +4980,39 @@ const BsBookingitemCard = (props) => { cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), padding: !cardFunction?.ImageUp && - !cardFunction?.ImageDown + !cardFunction?.ImageDown ? cardFunction?.SmallImage && - '5px 9px' + '5px 9px' : '8px 2px', flexDirection: cardFunction?.ImageRight && - 'row-reverse' + 'row-reverse' ? cardFunction?.ImageRight && - 'row-reverse' + 'row-reverse' : cardFunction?.ImageUp && 'column' ? cardFunction?.ImageUp && - 'column' + 'column' : cardFunction?.ImageDown && - 'column-reverse' + 'column-reverse' ? cardFunction?.ImageDown && - 'column-reverse' + 'column-reverse' : cardFunction?.ImageLeft && - 'row', + 'row', borderRadius: cardFunction?.EdgeCurve && '6px', width: !cardFunction?.ImageUp && - !cardFunction?.ImageDown && - !cardFunction?.BigImage && - !cardFunction?.ImageRight && - cardFunction?.SmallImage && - (cardFunction?.ImageUp || - cardFunction?.ImageDown) + !cardFunction?.ImageDown && + !cardFunction?.BigImage && + !cardFunction?.ImageRight && + cardFunction?.SmallImage && + (cardFunction?.ImageUp || + cardFunction?.ImageDown) ? '6rem' : cardFunction?.BigImage && '9rem', height: @@ -5029,43 +5029,43 @@ const BsBookingitemCard = (props) => { onClick={(e) => { CardOnclick(item, index); }} - // data-aos="zoom-in" data-aos-duration="600" + // data-aos="zoom-in" data-aos-duration="600" > {(cardFunction?.BigImage || cardFunction?.SmallImage) && ( - - )} + ? item?.ProductDetail?.[0] + ?.ProdLogo + : defaultimage + } + alt="" + /> + )}

{ cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), position: !cardFunction?.BigImage @@ -5099,7 +5099,7 @@ const BsBookingitemCard = (props) => { height: cardFunction?.SmallImage ? '5.5rem' : !cardFunction?.BigImage && - '4.5rem', + '4.5rem', alignItems: !cardFunction?.BigImage && !cardFunction?.SmallImage && @@ -5119,11 +5119,11 @@ const BsBookingitemCard = (props) => { 'uppercase', width: !cardFunction?.SmallImage ? cardFunction?.BigImage && - '120px' + '120px' : cardFunction?.SmallImage && - !cardFunction?.ImageUp && - !cardFunction?.ImageDown && - '85px', + !cardFunction?.ImageUp && + !cardFunction?.ImageDown && + '85px', // Width: cardFunction?.BigImage && "70px", fontSize: !cardFunction?.BigImage && @@ -5159,7 +5159,7 @@ const BsBookingitemCard = (props) => { fontSize: !cardFunction?.SmallImage ? cardFunction?.BigImage && - '12px' + '12px' : '12px', textAlign: 'center', lineHeight: '2', @@ -5168,8 +5168,8 @@ const BsBookingitemCard = (props) => { : '', color: SelectedCardColor ? SelectedCardColor?.[ - 'FontColor' - ] + 'FontColor' + ] : '', }} > @@ -5268,7 +5268,7 @@ const BsBookingitemCard = (props) => { height={60} src={ item?.ProductDetail?.[0]?.ProdLogo === - '' + '' ? defaultimage : item?.ProductDetail?.[0]?.ProdLogo ? item?.ProductDetail?.[0]?.ProdLogo @@ -5285,15 +5285,15 @@ const BsBookingitemCard = (props) => {
{item?.ProductDetail?.[0]?.ProdVariantDetails ?.length > 0 && ( -
-
- ₹ {ItemSellingPrice(item)} -
-
- {ItemSize(item)} {ItemUomName(item)} -
+
+
+ ₹ {ItemSellingPrice(item)}
- )} +
+ {ItemSize(item)} {ItemUomName(item)} +
+
+ )}
{/* Stock Count Badge */} @@ -5618,7 +5618,8 @@ const BsBookingitemCard = (props) => { userSelect: 'none', textAlign: 'center', fontWeight: - selectedBrand === brand ? 'bold' : 'normal', + selectedBrand === brand ? '600' : 'normal', + fontFamily: 'Poppins', }} > {brand === 'Others' ? 'Others' : brand} @@ -5993,30 +5994,30 @@ const BsBookingitemCard = (props) => { {slots.map((timeSlot, idx) => { const isBooked = timeSlot?.SlotStatus?.toLowerCase() == - 'booked' || false; + 'booked' || false; const isBlocked = timeSlot?.SlotStatus?.toLowerCase() == - 'blocked' || false; + 'blocked' || false; const isPartiallyBooked = timeSlot?.SlotStatus?.toLowerCase() === - 'partially booked' || false; + 'partially booked' || false; const isPartiallyBlocked = timeSlot?.SlotStatus?.toLowerCase() === - 'partially blocked' || false; + 'partially blocked' || false; const isSelected = CartOrderDetails?.some( (selected) => selected.ProdId === - timeSlot?.ProdId && + timeSlot?.ProdId && selected.InwardDtlId === - timeSlot?.InwardDtlId && + timeSlot?.InwardDtlId && selected.VariantAvailableFrom === - timeSlot?.VariantAvailableFrom && + timeSlot?.VariantAvailableFrom && selected.VariantAvailableTo === - timeSlot?.VariantAvailableTo && + timeSlot?.VariantAvailableTo && selected.BookedDate === - timeSlot?.BookedDate + timeSlot?.BookedDate ); const isAlreadyAdded = @@ -6024,25 +6025,25 @@ const BsBookingitemCard = (props) => { const itemDate = item?.BookedDate ? new Date( - item?.BookedDate - ).toLocaleDateString() + item?.BookedDate + ).toLocaleDateString() : null; return ( item?.InwardDtlId === - timeSlot?.InwardDtlId && + timeSlot?.InwardDtlId && item?.VariantAvailableFrom === - timeSlot?.VariantAvailableFrom && + timeSlot?.VariantAvailableFrom && item?.VariantAvailableTo === - timeSlot?.VariantAvailableTo && + timeSlot?.VariantAvailableTo && item?.ProdVariantName?.toLowerCase() === - timeSlot?.VarientName?.toLowerCase() && + timeSlot?.VarientName?.toLowerCase() && itemDate === dataDate && (item?.SinglePc === 'Y' ? returnVariantStock( - data, - CartOrderDetails - ) === 0 + data, + CartOrderDetails + ) === 0 : true) ); }); @@ -6055,13 +6056,13 @@ const BsBookingitemCard = (props) => { selectedSlots?.some( (selected) => selected.InwardDtlId === - timeSlot?.InwardDtlId && + timeSlot?.InwardDtlId && selected.VariantAvailableFrom === - timeSlot?.VariantAvailableFrom && + timeSlot?.VariantAvailableFrom && selected.VariantAvailableTo === - timeSlot?.VariantAvailableTo && + timeSlot?.VariantAvailableTo && selected.TempDate === - timeSlot?.BookedDate + timeSlot?.BookedDate ); const isDisabled = isBooked || @@ -6074,25 +6075,26 @@ const BsBookingitemCard = (props) => { return (
{ @@ -6111,7 +6113,7 @@ const BsBookingitemCard = (props) => { timeSlot, product, onePeiceFlow || - isPartiallyBooked, + isPartiallyBooked, !slotEnded ); } @@ -6129,7 +6131,7 @@ const BsBookingitemCard = (props) => {
₹ {onePeiceFlow || - isPartiallyBooked + isPartiallyBooked ? timeSlot?.OnePcsPrice : timeSlot?.SellPrice || 0}
@@ -6155,15 +6157,15 @@ const BsBookingitemCard = (props) => { !CartOrderDetails?.some( (selected) => selected.ProdId === - timeSlot.ProdId && + timeSlot.ProdId && selected.InwardDtlId === - timeSlot.InwardDtlId && + timeSlot.InwardDtlId && selected.VariantAvailableFrom === - timeSlot.VariantAvailableFrom && + timeSlot.VariantAvailableFrom && selected.VariantAvailableTo === - timeSlot.VariantAvailableTo && + timeSlot.VariantAvailableTo && selected.BookedDate === - timeSlot.BookedDate + timeSlot.BookedDate ) } icon={ @@ -6227,26 +6229,26 @@ const BsBookingitemCard = (props) => { {(timeSlot?.SlotStatus === 'Partially Booked' || timeSlot?.SlotStatus === - 'Booked') && ( -
{ - e.stopPropagation(); - handleBookedDetails({ - ...timeSlot, - ProdName: - product - ?.ProductDetail?.[0] - ?.ProdName, - ProdSubCatName: - product?.ProdSubCatName, - }); - }} - > - - {timeSlot?.SlotStatus} - -
- )} + 'Booked') && ( +
{ + e.stopPropagation(); + handleBookedDetails({ + ...timeSlot, + ProdName: + product + ?.ProductDetail?.[0] + ?.ProdName, + ProdSubCatName: + product?.ProdSubCatName, + }); + }} + > + + {timeSlot?.SlotStatus} + +
+ )}
); })} @@ -6413,7 +6415,7 @@ const BsBookingitemCard = (props) => { {customer.CustMobile || 'N/A'} {customer?.CustBookDetails?.length > - 1 ? ( + 1 ? ( ) : customer?.CustBookDetails - ?.length === 1 ? ( + ?.length === 1 ? ( <> - )} - {preferenceshortcutkey && ( -
- -
- )} - -
- {Customisebillno && } - {SessionData?.FeatureAddonData?.FeatureDtls?.find( - (item) => item?.FeatureAddonName?.toLowerCase() === 'kiosk sales' - ) && - !sportsAppPreference && ( -
0 ? 'none' : 'auto', - opacity: OrderStatus > 0 ? 0.5 : 1, - }} - > - {!OtherServicesglobal && ( - - - openModalKiosk()} - style={{ cursor: 'pointer', fontSize: '1.5rem' }} - className="iconsize" - /> - - - )} -
- )} - {Kioskopen && ( - - )} - - {!OtherServicesglobal && !sportsAppPreference && ( - - {' '} - - - )} - - {!OtherServicesglobal && ( - <> - {CheckBookingStatus == 'Open' ? ( -
- - {' '} - - -
- ) : ( -
- - BookingOpenFun('Open')} - > - - - - - -
- )} - {!sportsAppPreference && ( -
- - {''} - - -
- )} - - )} - - {BookingModalOpen && ( - - )} - {ListOfInvoices && ( - - )} -
- - {/* Modal with table for multiple bookings */} - - setIsModalOpen(false)} - handleSubmit={() => setIsModalOpen(false)} - width={700} - footer={false} - > -
- + (OverAllOrderCount || 0) > 0 && setIsModalOpen(true) + } + > + +
+ {isMobile ? 'Count' : 'Sales Count'} : {OverAllOrderCount} +
+ + )} + + + + {/* Rest of your component remains the same */} + {DineInAccess?.SettingValue === 'Y' && + takeAwayPreference && + (TakeAwayOrderCount || SelfTakeAwayOrderCount || PreOrderAmount) > + 0 && ( + +
-
- - - - - - {/* */} - - - - +
{isMobile ? 'TA' : 'Take Away'} :
+
{`₹ ${safeRound(totalTakeAway)}`}
+ + + )} - - {currentData?.length > 0 ? ( - currentData?.map((item, index) => ( - - (e.currentTarget.style.backgroundColor = '#d6e4ff') - } - onMouseLeave={(e) => - (e.currentTarget.style.backgroundColor = - index % 2 === 0 ? '#f7faff' : '#e9f1ff') - } - > - - - - - {/* + + + )} + +
- S.No - - Order ID - - Customer - - Mobile - Booked By - Payment Type - - Amount (₹) -
- {startIndex + index + 1} - - {extractLastNumberOrderId(item.OrderId)} - - {item.CustName || '—'} - - {item.CustMobile || '—'} - + {DineInAccess?.SettingValue === 'Y' && + dinePreference && + (DineInOrderCount || SelfDineInOrderCount) > 0 && ( + +
+
{isMobile ? 'DI' : 'Dine In'} :
+
{`₹ ${safeRound(totalDineIn)}`}
+
+
+ )} + +
+
netAmount > 0 && setIsNetAmtModalOpen(true)} + style={{ cursor: 'pointer' }} + > + +
+ {isMobile ? 'NA' : 'Net Amount'} : ₹ {safeRound(netAmount)} +
+
+
+ {TableData?.length > 0 && !sportsAppPreference && AutoReceiveStock && ( + + )} + {preferenceshortcutkey && ( +
+ +
+ )} + +
+ {Customisebillno && } + {SessionData?.FeatureAddonData?.FeatureDtls?.find( + (item) => item?.FeatureAddonName?.toLowerCase() === 'kiosk sales' + ) && + !sportsAppPreference && ( +
0 ? 'none' : 'auto', + opacity: OrderStatus > 0 ? 0.5 : 1, + }} + > + {!OtherServicesglobal && ( + + + openModalKiosk()} + style={{ cursor: 'pointer', fontSize: '1.5rem' }} + className="iconsize" + /> + + + )} +
+ )} + {Kioskopen && ( + + )} + + {!OtherServicesglobal && !sportsAppPreference && ( + + {' '} + + + )} + + {!OtherServicesglobal && ( + <> + {CheckBookingStatus == 'Open' ? ( +
+ + {' '} + + +
+ ) : ( +
+ + BookingOpenFun('Open')} + > + + + + + +
+ )} + {!sportsAppPreference && ( +
+ + {''} + + +
+ )} + + )} + + {BookingModalOpen && ( + + )} + {ListOfInvoices && ( + + )} +
+ + {/* Modal with table for multiple bookings */} + + setIsModalOpen(false)} + handleSubmit={() => setIsModalOpen(false)} + width={700} + footer={false} + > +
+ + + + + + + + {/* */} + + + + + + + {currentData?.length > 0 ? ( + currentData?.map((item, index) => ( + + (e.currentTarget.style.backgroundColor = '#d6e4ff') + } + onMouseLeave={(e) => + (e.currentTarget.style.backgroundColor = + index % 2 === 0 ? '#f7faff' : '#e9f1ff') + } + > + + + + + {/* */} - - - - )) - ) : ( - + - )} - -
+ S.No + + Order ID + + Customer + + Mobile + Booked By + Payment Type + + Amount (₹) +
+ {startIndex + index + 1} + + {extractLastNumberOrderId(item.OrderId)} + + {item.CustName || '—'} + + {item.CustMobile || '—'} + {item.BookedBy || "—"} - {item.PaymentTypeName || '—'} - - ₹{item.Amount?.toLocaleString()} -
+ {item.PaymentTypeName || '—'} + - No booking data available + ₹{item.Amount?.toLocaleString()}
- - {/* Pagination */} - {totalPages > 1 && ( -
- {currentPage == 1 ? ( - '' - ) : ( -
- Prev - - )} - - - Page {currentPage} of {totalPages} - + No booking data available +
+ {/* Pagination */} + {totalPages > 1 && ( +
+ {currentPage == 1 ? ( + '' + ) : ( -
- )} -
-
+ )} - {/* Modal with table for multiple Net Amt */} + + Page {currentPage} of {totalPages} + - setIsNetAmtModalOpen(false)} - handleSubmit={() => setIsNetAmtModalOpen(false)} - width={800} - footer={false} - > -
- - - - - - - - - + + + + + + + + + + + ); + })} + +
- Cash - - UPI - - Card - - Credit - - Business UPI - + setCurrentPage((p) => Math.min(p + 1, totalPages)) + } + disabled={currentPage === totalPages} + style={{ + padding: '5px 10px', + backgroundColor: '#003366', + color: '#fff', + border: 'none', + borderRadius: '4px', + cursor: + currentPage === totalPages ? 'not-allowed' : 'pointer', + opacity: currentPage === totalPages ? 0.5 : 1, + }} + > + Next + + + )} + + + + {/* Modal with table for multiple Net Amt */} + + setIsNetAmtModalOpen(false)} + handleSubmit={() => setIsNetAmtModalOpen(false)} + width={800} + footer={false} + > +
+ + + + + + + + + + + + + + + + + + + + + + + + + + {orderDetails?.map((item, index) => { + const total = + (item.CashAmount || 0) + + (item.UpiAmount || 0) + + (item.CardAmount || 0) + + (item.CreditAmount || 0); + + return ( + + (e.currentTarget.style.backgroundColor = '#e6f2ff') + } + onMouseLeave={(e) => + (e.currentTarget.style.backgroundColor = + index % 2 === 0 ? '#f7faff' : '#ffffff') + } > - Total - - - - - - - - - - - - - - - - - - {orderDetails?.map((item, index) => { - const total = - (item.CashAmount || 0) + - (item.UpiAmount || 0) + - (item.CardAmount || 0) + - (item.CreditAmount || 0); - - return ( - - (e.currentTarget.style.backgroundColor = '#e6f2ff') - } - onMouseLeave={(e) => - (e.currentTarget.style.backgroundColor = - index % 2 === 0 ? '#f7faff' : '#ffffff') - } > - - - - - - - - - - - - - ); - })} - -
+ Cash + + UPI + + Card + + Credit + + Business UPI + + Total +
+ Count + + Amt + + Count + + Amt + + Count + + Amt + + Count + + Amt + + Count + + Amt +
- Count - - Amt - - Count - - Amt - - Count - - Amt - - Count - - Amt - - Count - - Amt -
- {item.CashCount} - - {item.CashAmount} - - {item.UpiCount} - - {item.UpiAmount} - - {item.CardCount} - - {item.CardAmount} - - {item.CreditCount} - - {item.CreditAmount} - - {item.BusinessUpiCount} - - {item.BusinessUpiAmount} - - {total} -
-
-
+ {item.CashCount} + +
+ {item.CashAmount} + + {item.UpiCount} + + {item.UpiAmount} + + {item.CardCount} + + {item.CardAmount} + + {item.CreditCount} + + {item.CreditAmount} + + {item.BusinessUpiCount} + + {item.BusinessUpiAmount} + + {total} +
+
+
- { - setIsReceivedModelOpen(false); - }} - columns={columns} - tableData={TableData} - handlePageChange={handlePageChange} - customTable={false} - /> + { + setIsReceivedModelOpen(false); + }} + columns={columns} + tableData={TableData} + handlePageChange={handlePageChange} + customTable={false} + /> - setModalProductDetails(d)} - onSubmit={handleModalSubmit} - /> -
- + setModalProductDetails(d)} + onSubmit={handleModalSubmit} + /> +
); }); diff --git a/src/Pages/DashBoard/RetailDashboard.jsx b/src/Pages/DashBoard/RetailDashboard.jsx index 61bf02e..b4ce21e 100644 --- a/src/Pages/DashBoard/RetailDashboard.jsx +++ b/src/Pages/DashBoard/RetailDashboard.jsx @@ -1,32 +1,20 @@ -import { - useCallback, - useEffect, - useRef, - useState, - lazy, - Suspense, -} from 'react'; +import { useCallback, useEffect, useRef, useState, lazy } from 'react'; import { useNavigate, useOutletContext } from 'react-router-dom'; import { shallowEqual, useDispatch } from 'react-redux'; import { useSelector } from 'react-redux'; - import { DatePicker, Tooltip } from 'antd'; import dayjs from 'dayjs'; - import '../../Styles/DashBoard/RetailDashBoard.scss'; - const GraphChart = lazy(() => import('./Chart/GraphChart')); const TopSellingProductsChart = lazy( () => import('./TopSellingProductsChart.jsx') ); - import sandClock from '../../Images/sandClock.webp'; import Add from '../../Images/dashboard/Add.webp'; import AddPurchase from '../../Images/dashboard/AddPurchase.webp'; import invoice from '../../Images/dashboard/invoice.webp'; import user from '../../Images/dashboard/user.webp'; import report from '../../Images/dashboard/report.webp'; - import { GlobalPricingAppPricingName, StoredSessionData, @@ -78,13 +66,11 @@ const DefaultModal = lazy(() => default: m.DefaultModal, })) ); - const RadioGrpButton = lazy(() => import('../../Components/Forms/RadioGroup.jsx').then((m) => ({ default: m.RadioGrpButton, })) ); - const DropDowns = lazy(() => import('../../Components/Forms/DropDown.jsx').then((m) => ({ default: m.DropDowns, @@ -1436,18 +1422,16 @@ const RetailDashboard = () => { ?.toUpperCase()}
{userprofile && ( - - - + )}
@@ -1464,22 +1448,20 @@ const RetailDashboard = () => { {/* Branch Filter Dropdown */} {CompBranchData?.length > 1 && selection !== 'top-selling-products' && (
- Loading...
}> - ({ - value: option.BrId, - label: option.BrName, - })), - ]} - className="branch-filter-select" - onChangeFunction={onChangeBranchFilter} - valueData={selectedBranchForFilter} - defaultValue="all" - placeholder="All Branches" - /> - + ({ + value: option.BrId, + label: option.BrName, + })), + ]} + className="branch-filter-select" + onChangeFunction={onChangeBranchFilter} + valueData={selectedBranchForFilter} + defaultValue="all" + placeholder="All Branches" + />
)} @@ -1500,9 +1482,7 @@ const RetailDashboard = () => {
- }> - - +
@@ -2375,110 +2355,104 @@ const RetailDashboard = () => { ) : ( <> - }> - - + )} - - - <> -
- ({ - value: option?.UserId, - label: option?.UserName, - }))} - label={} - className="field-DropDown" - onChangeFunction={(e) => UserDropDownChange(e)} - isOnchanges={selectedUserData ? true : false} - valueData={selectedUserData} - disabled={disabled} - /> -
-
- Loading...
}> - ChangeMethod(e)} - /> - -
-
- - {pinInput && ( -
- {[0, 1, 2, 3].map((i) => ( - (inputRefs.current[i] = el)} - className="inputNumber" - type="text" - inputMode="numeric" - pattern="[0-9]" - maxLength={1} - onChange={(e) => handleChange(i, e)} - onKeyDown={(e) => handleKeyDown(i, e)} - style={{ - textAlign: 'center', - width: '40px', - fontSize: '20px', - }} - /> - ))} -
- )} - -
- + + <> +
+ ({ + value: option?.UserId, + label: option?.UserName, + }))} + label={} + className="field-DropDown" + onChangeFunction={(e) => UserDropDownChange(e)} + isOnchanges={selectedUserData ? true : false} + valueData={selectedUserData} + disabled={disabled} + /> +
+
+ ChangeMethod(e)} + />
- - - + + {pinInput && ( +
+ {[0, 1, 2, 3].map((i) => ( + (inputRefs.current[i] = el)} + className="inputNumber" + type="text" + inputMode="numeric" + pattern="[0-9]" + maxLength={1} + onChange={(e) => handleChange(i, e)} + onKeyDown={(e) => handleKeyDown(i, e)} + style={{ + textAlign: 'center', + width: '40px', + fontSize: '20px', + }} + /> + ))} +
+ )} + +
+ +
+
+ +
); }; diff --git a/src/Pages/DashBoard/TopSellingProductsChart.jsx b/src/Pages/DashBoard/TopSellingProductsChart.jsx index cb8ca69..4157b44 100644 --- a/src/Pages/DashBoard/TopSellingProductsChart.jsx +++ b/src/Pages/DashBoard/TopSellingProductsChart.jsx @@ -340,8 +340,7 @@ const TopSellingProducts = ({ Pie Chart
- - Loading...
}> + - + />
diff --git a/src/Pages/StockMaster/StockForm.jsx b/src/Pages/StockMaster/StockForm.jsx index 6001fa7..d6190cc 100644 --- a/src/Pages/StockMaster/StockForm.jsx +++ b/src/Pages/StockMaster/StockForm.jsx @@ -13,7 +13,15 @@ import { PlusCircleOutlined, SearchOutlined, } from '@ant-design/icons'; -import { Form, Tooltip, Table, Input, AutoComplete, Switch, Checkbox } from 'antd'; +import { + Form, + Tooltip, + Table, + Input, + AutoComplete, + Switch, + Checkbox, +} from 'antd'; import { IoAddCircleSharp } from 'react-icons/io5'; import { InputField } from '../../Components/Forms/InputField.jsx'; import Buttons from '../../Components/Forms/Buttons.jsx'; @@ -39,7 +47,7 @@ import { putStockData, } from '../../Features/StockMaster/StockMaster.js'; import '../../Styles/Stock/StockMaster.scss'; -import "../../Styles/OverAllStyle/OverAllStyle.scss" +import '../../Styles/OverAllStyle/OverAllStyle.scss'; import { getAdmin, getUomData, @@ -708,7 +716,10 @@ const StockForm = ({ formType }) => { })); const bulkResponse = await dispatch( - bulkpostdata({ UploadType: 'Purchase', ProdDetails: newProductsData }) + bulkpostdata({ + UploadType: 'Purchase', + ProdDetails: newProductsData, + }) ).unwrap(); if (bulkResponse?.data?.statusCode === 1) { @@ -1405,47 +1416,47 @@ const StockForm = ({ formType }) => { const localId = record.localId; const values = Delete ? { - [`BalanceQty${localId}`]: undefined, - [`ReceivedQty${localId}`]: undefined, - [`AcceptedQty${localId}`]: undefined, - [`RejectedQty${localId}`]: undefined, - [`Amount${localId}`]: undefined, - [`Freeqty${localId}`]: undefined, - [`InwardPrice${localId}`]: undefined, - [`MRP${localId}`]: undefined, - [`PurcDisc${localId}`]: undefined, - [`SellPrice${localId}`]: undefined, - [`WhSalePrice${localId}`]: undefined, - [`offerSalePrice${localId}`]: undefined, - [`splSalePrice${localId}`]: undefined, - [`NumberofPieceinside${localId}`]: undefined, - [`AmountPerPiece${localId}`]: undefined, - [`PurcDiscType${localId}`]: undefined, - [`ManufDate${localId}`]: undefined, - [`ExpDate${localId}`]: undefined, - [`OnePcsPrice${localId}`]: undefined, - [`NoOfPcs${localId}`]: undefined, - } + [`BalanceQty${localId}`]: undefined, + [`ReceivedQty${localId}`]: undefined, + [`AcceptedQty${localId}`]: undefined, + [`RejectedQty${localId}`]: undefined, + [`Amount${localId}`]: undefined, + [`Freeqty${localId}`]: undefined, + [`InwardPrice${localId}`]: undefined, + [`MRP${localId}`]: undefined, + [`PurcDisc${localId}`]: undefined, + [`SellPrice${localId}`]: undefined, + [`WhSalePrice${localId}`]: undefined, + [`offerSalePrice${localId}`]: undefined, + [`splSalePrice${localId}`]: undefined, + [`NumberofPieceinside${localId}`]: undefined, + [`AmountPerPiece${localId}`]: undefined, + [`PurcDiscType${localId}`]: undefined, + [`ManufDate${localId}`]: undefined, + [`ExpDate${localId}`]: undefined, + [`OnePcsPrice${localId}`]: undefined, + [`NoOfPcs${localId}`]: undefined, + } : { - [`BalanceQty${localId}`]: record.BalanceQty, - [`ReceivedQty${localId}`]: record.ReceivedQty, - [`AcceptedQty${localId}`]: record.AcceptedQty, - [`RejectedQty${localId}`]: record.RejectedQty, - [`Freeqty${localId}`]: record.FreeItem, - [`MRP${localId}`]: record.MRP, - [`ManufDate${localId}`]: record.ManufDate, - [`ExpDate${localId}`]: record.ExpDate, - [`SellPrice${localId}`]: record.SellPrice, - [`WhSalePrice${localId}`]: record.WhSalePrice, - [`PurcDiscType${localId}`]: record.PurcDiscType, - [`Amount${localId}`]: record.Amount, - [`InwardPrice${localId}`]: record.InwardPrice, - [`PurcDisc${localId}`]: record.PurcDisc, - [`offerSalePrice${localId}`]: record.OfferPrice, - [`splSalePrice${localId}`]: record.SpecialPrice, - [`OnePcsPrice${localId}`]: record.OnePcsPrice, - [`NoOfPcs${localId}`]: record.NoOfPcs, - }; + [`BalanceQty${localId}`]: record.BalanceQty, + [`ReceivedQty${localId}`]: record.ReceivedQty, + [`AcceptedQty${localId}`]: record.AcceptedQty, + [`RejectedQty${localId}`]: record.RejectedQty, + [`Freeqty${localId}`]: record.FreeItem, + [`MRP${localId}`]: record.MRP, + [`ManufDate${localId}`]: record.ManufDate, + [`ExpDate${localId}`]: record.ExpDate, + [`SellPrice${localId}`]: record.SellPrice, + [`WhSalePrice${localId}`]: record.WhSalePrice, + [`PurcDiscType${localId}`]: record.PurcDiscType, + [`Amount${localId}`]: record.Amount, + [`InwardPrice${localId}`]: record.InwardPrice, + [`PurcDisc${localId}`]: record.PurcDisc, + [`offerSalePrice${localId}`]: record.OfferPrice, + [`splSalePrice${localId}`]: record.SpecialPrice, + [`OnePcsPrice${localId}`]: record.OnePcsPrice, + [`NoOfPcs${localId}`]: record.NoOfPcs, + }; if (!Delete && applicationRestrictedFields.BatchAndModelDetails) { values[`BatchRef${localId}`] = record.BatchRef; @@ -1662,29 +1673,29 @@ const StockForm = ({ formType }) => { }, ...(selectedAdditionalColumn.includes('Mrp') ? [ - { - title: 'MRP', - dataIndex: 'MRP', - key: 'MRP', - editable: true, - width: 100, - align: 'center', - render: (_, record) => { - return ( - edit(record)} - placeholder="MRP" - value={record?.MRP ?? ''} - maxLength={10} - inputMode="decimal" - onChange={(e) => handleMRPChange(e, record)} - onBlur={(e) => handleMRPBlur(e, record)} - onPressEnter={(e) => handleKeyPress(e, record)} - /> - ); + { + title: 'MRP', + dataIndex: 'MRP', + key: 'MRP', + editable: true, + width: 100, + align: 'center', + render: (_, record) => { + return ( + edit(record)} + placeholder="MRP" + value={record?.MRP ?? ''} + maxLength={10} + inputMode="decimal" + onChange={(e) => handleMRPChange(e, record)} + onBlur={(e) => handleMRPBlur(e, record)} + onPressEnter={(e) => handleKeyPress(e, record)} + /> + ); + }, }, - }, - ] + ] : []), { title: ( @@ -1716,399 +1727,399 @@ const StockForm = ({ formType }) => { ...(selectedAdditionalColumn.includes('Amount Per Piece') ? [ - { - title: 'Amount per piece', - dataIndex: 'OnePcsPrice', - key: 'OnePcsPrice', - width: 125, - editable: true, - render: (_, record, index) => { - return ( - edit(record)} - onFocus={(e) => e.stopPropagation()} - disabled={record?.OnePcsAvailable === 'N'} - placeholder="OnePcsPrice" - value={record?.OnePcsPrice ?? ''} - maxLength={10} - inputMode="decimal" - onChange={(e) => handleOnePcsChange(e, record)} - onBlur={(e) => handleOnePcsBlur(e, record)} - onPressEnter={() => handleKeyPress(e, record)} - onInput={(e) => { - let v = e.target.value.replace(/[^0-9.]/g, ''); - if (v.startsWith('.')) v = '0' + v; - const parts = v.split('.'); - e.target.value = - parts.length > 2 - ? `${parts[0]}.${parts.slice(1).join('')}` - : v; - }} - /> - ); + { + title: 'Amount per piece', + dataIndex: 'OnePcsPrice', + key: 'OnePcsPrice', + width: 125, + editable: true, + render: (_, record, index) => { + return ( + edit(record)} + onFocus={(e) => e.stopPropagation()} + disabled={record?.OnePcsAvailable === 'N'} + placeholder="OnePcsPrice" + value={record?.OnePcsPrice ?? ''} + maxLength={10} + inputMode="decimal" + onChange={(e) => handleOnePcsChange(e, record)} + onBlur={(e) => handleOnePcsBlur(e, record)} + onPressEnter={() => handleKeyPress(e, record)} + onInput={(e) => { + let v = e.target.value.replace(/[^0-9.]/g, ''); + if (v.startsWith('.')) v = '0' + v; + const parts = v.split('.'); + e.target.value = + parts.length > 2 + ? `${parts[0]}.${parts.slice(1).join('')}` + : v; + }} + /> + ); + }, }, - }, - ] + ] : []), ...(selectedAdditionalColumn.includes('Amount Per Piece') ? [ - { - title: 'Number of piece', - dataIndex: 'NoOfPcs', - key: 'NoOfPcs', - width: 125, - editable: true, - render: (_, record, index) => { - return ( - edit(record)} - onFocus={(e) => e.stopPropagation()} - disabled={record?.OnePcsAvailable === 'N'} - placeholder="NoOfPcs" - value={record.NoOfPcs ?? ''} - maxLength={5} - inputMode="numeric" - onChange={(e) => handleNoOfPcsChange(e, record)} - onBlur={(e) => handleNoOfPcsBlur(e, record)} - onPressEnter={() => handleKeyPress(e, record)} - onInput={(e) => { - // remove invalid characters & leading zeros - let val = e.target.value.replace(/[^0-9]/g, ''); - val = val.replace(/^0+(?=\d)/, ''); // removes leading zeros but keeps single 0 - e.target.value = val; - }} - /> - ); + { + title: 'Number of piece', + dataIndex: 'NoOfPcs', + key: 'NoOfPcs', + width: 125, + editable: true, + render: (_, record, index) => { + return ( + edit(record)} + onFocus={(e) => e.stopPropagation()} + disabled={record?.OnePcsAvailable === 'N'} + placeholder="NoOfPcs" + value={record.NoOfPcs ?? ''} + maxLength={5} + inputMode="numeric" + onChange={(e) => handleNoOfPcsChange(e, record)} + onBlur={(e) => handleNoOfPcsBlur(e, record)} + onPressEnter={() => handleKeyPress(e, record)} + onInput={(e) => { + // remove invalid characters & leading zeros + let val = e.target.value.replace(/[^0-9]/g, ''); + val = val.replace(/^0+(?=\d)/, ''); // removes leading zeros but keeps single 0 + e.target.value = val; + }} + /> + ); + }, }, - }, - ] + ] : []), ...(selectedAdditionalColumn.includes('Wholesale Price') ? [ - { - title: 'Wholesale price', - dataIndex: 'WhSalePrice', - key: 'WhSalePrice', - width: 125, - editable: true, - render: (_, record) => { - return ( - edit(record)} - onFocus={(e) => e.stopPropagation()} - placeholder="WhSalePrice" - value={record.WhSalePrice ?? ''} - inputMode="decimal" - maxLength={10} - onChange={(e) => handleWhSalePriceChange(e, record)} - onBlur={(e) => handleWhSalePriceBlur(e, record)} - onPressEnter={() => handleKeyPress(record)} - onInput={(e) => { - let val = e.target.value.replace(/[^0-9.]/g, ''); // remove invalid chars - if (val.startsWith('.')) val = '0' + val; // leading dot fix - const parts = val.split('.'); - if (parts.length > 2) - val = `${parts[0]}.${parts.slice(1).join('')}`; // max one dot - val = val.replace(/^0+(?=\d)/, ''); // remove leading zeros - e.target.value = val; - }} - /> - ); + { + title: 'Wholesale price', + dataIndex: 'WhSalePrice', + key: 'WhSalePrice', + width: 125, + editable: true, + render: (_, record) => { + return ( + edit(record)} + onFocus={(e) => e.stopPropagation()} + placeholder="WhSalePrice" + value={record.WhSalePrice ?? ''} + inputMode="decimal" + maxLength={10} + onChange={(e) => handleWhSalePriceChange(e, record)} + onBlur={(e) => handleWhSalePriceBlur(e, record)} + onPressEnter={() => handleKeyPress(record)} + onInput={(e) => { + let val = e.target.value.replace(/[^0-9.]/g, ''); // remove invalid chars + if (val.startsWith('.')) val = '0' + val; // leading dot fix + const parts = val.split('.'); + if (parts.length > 2) + val = `${parts[0]}.${parts.slice(1).join('')}`; // max one dot + val = val.replace(/^0+(?=\d)/, ''); // remove leading zeros + e.target.value = val; + }} + /> + ); + }, }, - }, - ] + ] : []), ...(selectedAdditionalColumn.includes('Manufacture Date') ? [ - { - title: 'Manuf.Date', - dataIndex: 'ManufDate', - key: 'ManufDate', - editable: true, - width: 100, - render: (text, record, index) => { - return ( - { - // Format date to your preferred format - const formattedDate = dateString - ? moment(dateString, ['DD-MM-YYYY']).format( - 'YYYY-MM-DDTHH:mm:ss' - ) - : undefined; + { + title: 'Manuf.Date', + dataIndex: 'ManufDate', + key: 'ManufDate', + editable: true, + width: 100, + render: (text, record, index) => { + return ( + { + // Format date to your preferred format + const formattedDate = dateString + ? moment(dateString, ['DD-MM-YYYY']).format( + 'YYYY-MM-DDTHH:mm:ss' + ) + : undefined; - // Update the row data immutably - const newData = PurchaseData.map((item) => - item.localId === record.localId - ? { ...item, ManufDate: formattedDate } - : item - ); - setPurchaseData(newData); - }} - /> - ); + // Update the row data immutably + const newData = PurchaseData.map((item) => + item.localId === record.localId + ? { ...item, ManufDate: formattedDate } + : item + ); + setPurchaseData(newData); + }} + /> + ); + }, }, - }, - ] + ] : []), ...(selectedAdditionalColumn.includes('Expiry Date') ? [ - { - title: 'Exp.Date', - dataIndex: 'ExpDate', - key: 'ExpDate', - editable: true, - width: 100, - render: (text, record, index) => { - return ( - - handleExpDateChange(dateString, record) - } - /> - ); + { + title: 'Exp.Date', + dataIndex: 'ExpDate', + key: 'ExpDate', + editable: true, + width: 100, + render: (text, record, index) => { + return ( + + handleExpDateChange(dateString, record) + } + /> + ); + }, }, - }, - ] + ] : []), ...(selectedAdditionalColumn.includes('Hsn') ? [ - { - title: 'Hsn', - dataIndex: 'Hsn', - key: 'Hsn', - editable: true, - width: 100, - align: 'center', - render: (text, record, index) => { - return ( - edit(record)} - onFocus={(e) => e.stopPropagation()} - onPressEnter={() => handleKeyPress(record)} - onChange={(e) => { - const value = e.target.value; - setPurchaseData((prev) => - prev.map((item) => - item.localId === record.localId - ? { ...item, PurchaseHSNCode: value } - : item - ) - ); - }} - /> - ); + { + title: 'Hsn', + dataIndex: 'Hsn', + key: 'Hsn', + editable: true, + width: 100, + align: 'center', + render: (text, record, index) => { + return ( + edit(record)} + onFocus={(e) => e.stopPropagation()} + onPressEnter={() => handleKeyPress(record)} + onChange={(e) => { + const value = e.target.value; + setPurchaseData((prev) => + prev.map((item) => + item.localId === record.localId + ? { ...item, PurchaseHSNCode: value } + : item + ) + ); + }} + /> + ); + }, }, - }, - ] + ] : []), ...(selectedAdditionalColumn.includes('Model No') ? [ - { - title: 'Model', - dataIndex: 'Model', - key: 'Model', - editable: true, - width: 100, - align: 'center', - render: (text, record, index) => { - return ( - edit(record)} - onFocus={(e) => e.stopPropagation()} - onPressEnter={() => handleKeyPress(record)} - onChange={(e) => { - const value = e.target.value; - setPurchaseData((prev) => - prev.map((item) => - item.localId === record.localId - ? { ...item, ModelNumber: value } - : item - ) - ); - }} - /> - ); + { + title: 'Model', + dataIndex: 'Model', + key: 'Model', + editable: true, + width: 100, + align: 'center', + render: (text, record, index) => { + return ( + edit(record)} + onFocus={(e) => e.stopPropagation()} + onPressEnter={() => handleKeyPress(record)} + onChange={(e) => { + const value = e.target.value; + setPurchaseData((prev) => + prev.map((item) => + item.localId === record.localId + ? { ...item, ModelNumber: value } + : item + ) + ); + }} + /> + ); + }, }, - }, - ] + ] : []), ...(selectedAdditionalColumn.includes('Batch No') ? [ - { - title: 'Batch', - dataIndex: 'Batch', - key: 'Batch', - width: 100, - align: 'center', - editable: true, - render: (text, record, index) => { - return ( - edit(record)} - onFocus={(e) => e.stopPropagation()} - onPressEnter={() => handleKeyPress(record, index)} - onChange={(e) => { - const value = e.target.value; - setPurchaseData((prev) => - prev.map((item) => - item.localId === record.localId - ? { ...item, BatchRef: value } - : item - ) - ); - }} - /> - ); + { + title: 'Batch', + dataIndex: 'Batch', + key: 'Batch', + width: 100, + align: 'center', + editable: true, + render: (text, record, index) => { + return ( + edit(record)} + onFocus={(e) => e.stopPropagation()} + onPressEnter={() => handleKeyPress(record, index)} + onChange={(e) => { + const value = e.target.value; + setPurchaseData((prev) => + prev.map((item) => + item.localId === record.localId + ? { ...item, BatchRef: value } + : item + ) + ); + }} + /> + ); + }, }, - }, - ] + ] : []), ...(selectedAdditionalColumn.includes('Rejected Qty') ? [ - { - title: 'Rejected Qty', - dataIndex: 'RejectedQty', - key: 'RejectedQty', - editable: true, - width: 100, - align: 'center', - render: (text, record, index) => { - return ( - edit(record)} - onFocus={(e) => e.stopPropagation()} - onPressEnter={() => handleKeyPress(record, index)} - onChange={(e) => { - let inputValue = e.target.value.replace(/[^0-9.]/g, ''); // allow only numbers - if (inputValue.startsWith('0') && inputValue.length > 1) { - inputValue = inputValue.replace(/^0+/, ''); // remove leading zeros - } + { + title: 'Rejected Qty', + dataIndex: 'RejectedQty', + key: 'RejectedQty', + editable: true, + width: 100, + align: 'center', + render: (text, record, index) => { + return ( + edit(record)} + onFocus={(e) => e.stopPropagation()} + onPressEnter={() => handleKeyPress(record, index)} + onChange={(e) => { + let inputValue = e.target.value.replace(/[^0-9.]/g, ''); // allow only numbers + if (inputValue.startsWith('0') && inputValue.length > 1) { + inputValue = inputValue.replace(/^0+/, ''); // remove leading zeros + } - const rejectedQty = parseFloat(inputValue) || 0; - const receivedQty = parseFloat(record.ReceivedQty) || 0; + const rejectedQty = parseFloat(inputValue) || 0; + const receivedQty = parseFloat(record.ReceivedQty) || 0; - // validation - if (rejectedQty >= receivedQty) { - setMessageType('error'); - setMessageData( - 'Rejected Qty cannot be greater than or equal to Received Qty' + // validation + if (rejectedQty >= receivedQty) { + setMessageType('error'); + setMessageData( + 'Rejected Qty cannot be greater than or equal to Received Qty' + ); + return; + } + + const acceptedQty = receivedQty - rejectedQty; + const price = parseFloat(record.InwardPrice) || 0; + const amount = acceptedQty * price; + + setPurchaseData((prev) => + prev.map((item) => + item.localId === record.localId + ? { + ...item, + RejectedQty: rejectedQty, + AcceptedQty: acceptedQty, + Amount: amount, + } + : item + ) ); - return; - } - - const acceptedQty = receivedQty - rejectedQty; - const price = parseFloat(record.InwardPrice) || 0; - const amount = acceptedQty * price; - - setPurchaseData((prev) => - prev.map((item) => - item.localId === record.localId - ? { - ...item, - RejectedQty: rejectedQty, - AcceptedQty: acceptedQty, - Amount: amount, - } - : item - ) - ); - }} - /> - ); + }} + /> + ); + }, }, - }, - ] + ] : []), ...(selectedAdditionalColumn.includes('Free Qty') ? [ - { - title: 'Free Qty', - dataIndex: 'Freeqty', - key: 'Freeqty', - editable: true, - width: 100, - align: 'center', - render: (text, record) => { - return ( - edit(record)} - onFocus={(e) => e.stopPropagation()} - onPressEnter={() => handleKeyPress(record)} - onChange={(e) => { - let value = e.target.value.replace(/[^0-9]/g, ''); // only digits - if (value.startsWith('0') && value.length > 1) { - value = value.replace(/^0+/, ''); // remove leading zeros - } + { + title: 'Free Qty', + dataIndex: 'Freeqty', + key: 'Freeqty', + editable: true, + width: 100, + align: 'center', + render: (text, record) => { + return ( + edit(record)} + onFocus={(e) => e.stopPropagation()} + onPressEnter={() => handleKeyPress(record)} + onChange={(e) => { + let value = e.target.value.replace(/[^0-9]/g, ''); // only digits + if (value.startsWith('0') && value.length > 1) { + value = value.replace(/^0+/, ''); // remove leading zeros + } - updateRowValue(record.localId, 'Freeqty', value); - }} - /> - ); + updateRowValue(record.localId, 'Freeqty', value); + }} + /> + ); + }, }, - }, - ] + ] : []), ...(selectedAdditionalColumn.includes('IMEI') ? [ - { - title: 'IMEI', - dataIndex: 'AdditionalInfo', - key: 'AdditionalInfo', - width: 120, - align: 'center', - render: (text, record, index) => { - const receivedQty = parseFloat(record?.ReceivedQty) || 0; - const isClickable = receivedQty > 0; + { + title: 'IMEI', + dataIndex: 'AdditionalInfo', + key: 'AdditionalInfo', + width: 120, + align: 'center', + render: (text, record, index) => { + const receivedQty = parseFloat(record?.ReceivedQty) || 0; + const isClickable = receivedQty > 0; - return ( - { - if (!isClickable) { - setMessageType('error'); - setMessageData('Please Enter Qty'); - return; - } - setSelectedRowIndex(index); - handleModelDataOpen(record); - }} - className="shape-preview" - /> - ); + return ( + { + if (!isClickable) { + setMessageType('error'); + setMessageData('Please Enter Qty'); + return; + } + setSelectedRowIndex(index); + handleModelDataOpen(record); + }} + className="shape-preview" + /> + ); + }, }, - }, - ] + ] : []), { title: 'Action', @@ -2185,18 +2196,18 @@ const StockForm = ({ formType }) => { prev.map((item) => item.localId === localId ? { - ...item, - BalanceQty: qty, - ReceivedQty: qty, - AcceptedQty: qty, - RejectedQty: 0, - PurcDisc: 0, - Amount: - isNaN(item.InwardPrice) || isNaN(qty) - ? 0 - : item.InwardPrice * qty, - ProductIdentifierDtls: [], - } + ...item, + BalanceQty: qty, + ReceivedQty: qty, + AcceptedQty: qty, + RejectedQty: 0, + PurcDisc: 0, + Amount: + isNaN(item.InwardPrice) || isNaN(qty) + ? 0 + : item.InwardPrice * qty, + ProductIdentifierDtls: [], + } : item ) ); @@ -2233,10 +2244,10 @@ const StockForm = ({ formType }) => { prev.map((item) => item.localId === record.localId ? { - ...item, - MRP: value, - SellPrice: value, - } + ...item, + MRP: value, + SellPrice: value, + } : item ) ); @@ -2250,10 +2261,10 @@ const StockForm = ({ formType }) => { prev.map((item) => item.localId === record.localId ? { - ...item, - MRP: normalized, - SellPrice: normalized, - } + ...item, + MRP: normalized, + SellPrice: normalized, + } : item ) ); @@ -3401,19 +3412,19 @@ const StockForm = ({ formType }) => { options={ SupplierData ? SupplierData.filter( - (obj, index, self) => - index === - self.findIndex( - (t) => t.SuppId === obj.SuppId - ) // remove dup SuppId - ).map((option) => ({ - key: `${option.SuppId}-${option.Type}`, // 👈 unique key - value: option.SuppId, - label: - option.Type === 'Branch' - ? `${option.SuppName} (${option.Type}) [${option.SuppId}]` - : `${option.SuppName} (${option.Type})`, - })) + (obj, index, self) => + index === + self.findIndex( + (t) => t.SuppId === obj.SuppId + ) // remove dup SuppId + ).map((option) => ({ + key: `${option.SuppId}-${option.Type}`, // 👈 unique key + value: option.SuppId, + label: + option.Type === 'Branch' + ? `${option.SuppName} (${option.Type}) [${option.SuppId}]` + : `${option.SuppName} (${option.Type})`, + })) : [] } label={ @@ -3437,32 +3448,34 @@ const StockForm = ({ formType }) => { /> - {orderType && - - - { - const checked = e.target.checked; - setShowAllSuppliers(checked); - setInitialLoad(true); - getSuplaierApi({ Type: checked ? 'Y' : null }); - }} - > - All - - - - - } + {orderType && ( + + + + { + const checked = e.target.checked; + setShowAllSuppliers(checked); + setInitialLoad(true); + getSuplaierApi({ + Type: checked ? 'Y' : null, + }); + }} + > + All + + + + + )}
{!selectedSupplierName && ( { /> )} -
@@ -3644,88 +3656,88 @@ const StockForm = ({ formType }) => { item.ConfigId === SelectedPurchaseType && item.ConfigName === 'Cash' ) && ( - <> - - ({ - value: mode.ModeId, - label: mode.ModeName, - }))} - label={ - - } - className="field-DropDown" - onChangeFunction={handlePaymentModeChange} - valueData={selectedPaymentMode} - /> - - { - if ( - value === undefined || - value === null || - value === '' - ) { - return Promise.resolve(); - } - if (Number(value) === 0) { - return Promise.reject( - 'Payment Amount cannot be 0' - ); - } - if ( - isNaN(value) || - Number(value) < 0 - ) { - return Promise.reject( - 'Payment Amount cannot be less than 0' - ); - } + <> + + ({ + value: mode.ModeId, + label: mode.ModeName, + }))} + label={ + + } + className="field-DropDown" + onChangeFunction={handlePaymentModeChange} + valueData={selectedPaymentMode} + /> + + { + if ( + value === undefined || + value === null || + value === '' + ) { return Promise.resolve(); - }, + } + if (Number(value) === 0) { + return Promise.reject( + 'Payment Amount cannot be 0' + ); + } + if ( + isNaN(value) || + Number(value) < 0 + ) { + return Promise.reject( + 'Payment Amount cannot be less than 0' + ); + } + return Promise.resolve(); }, - ]} - > - - Payment Amount - - } - inputMode="decimal" - disable={!payAmountDisable} - isOnChange={paymentAmount ? true : false} - min={0} - type="number" - value={paymentAmount} - onChange={(e) => { - formRef?.current?.setFieldsValue({ - PaymentAmount: e?.target?.value, - }); - setPaymentAmount(e?.target?.value); - }} - /> - - - )} + }, + ]} + > + + Payment Amount + + } + inputMode="decimal" + disable={!payAmountDisable} + isOnChange={paymentAmount ? true : false} + min={0} + type="number" + value={paymentAmount} + onChange={(e) => { + formRef?.current?.setFieldsValue({ + PaymentAmount: e?.target?.value, + }); + setPaymentAmount(e?.target?.value); + }} + /> + + + )}
@@ -3759,7 +3771,7 @@ const StockForm = ({ formType }) => { (p) => p.ProdId === prodId && (p.ProdVariantName || 'Variant1') === - variantName + variantName ); const nameMatch = option.label ?.toLowerCase() @@ -3772,9 +3784,9 @@ const StockForm = ({ formType }) => { options={ !scanner ? productData?.map((option) => ({ - value: `${option.ProdId}_${option.ProdVariantName}`, - label: `${option.ProdName} (${option.Size} ${option.UomName})${option?.BrandName ? ` - ${option?.BrandName}` : ''} - ${option.ProdVariantName}`, - })) + value: `${option.ProdId}_${option.ProdVariantName}`, + label: `${option.ProdName} (${option.Size} ${option.UomName})${option?.BrandName ? ` - ${option?.BrandName}` : ''} - ${option.ProdVariantName}`, + })) : [] } // onSelect={async (value, option) => { @@ -3837,19 +3849,19 @@ const StockForm = ({ formType }) => { />
) : ( - - - + + + )}
@@ -4101,7 +4113,7 @@ const StockForm = ({ formType }) => { autoComplete="off" label="GST No" autocapitalize="on" - // isOnChange={formType == 'edit' ? true : false} + // isOnChange={formType == 'edit' ? true : false} /> @@ -4123,10 +4135,10 @@ const StockForm = ({ formType }) => { // isOnChange={formType == 'edit' ? true : false} inputMode="numeric" onInput={(e) => - (e.target.value = e.target.value?.replace( - /[^0-9]/g, - '' - )) + (e.target.value = e.target.value?.replace( + /[^0-9]/g, + '' + )) } /> @@ -4138,7 +4150,7 @@ const StockForm = ({ formType }) => { MailId} autocomplete="off" - // isOnChange={formType == 'edit' ? true : false} + // isOnChange={formType == 'edit' ? true : false} /> @@ -4165,7 +4177,7 @@ const StockForm = ({ formType }) => { Point of Contact} autocomplete="off" - // isOnChange={formType == 'edit' ? true : false} + // isOnChange={formType == 'edit' ? true : false} /> @@ -4187,7 +4199,7 @@ const StockForm = ({ formType }) => { label={} autocomplete="off" maxLength="10" - // isOnChange={formType == 'edit' ? true : false} + // isOnChange={formType == 'edit' ? true : false} /> @@ -4198,7 +4210,7 @@ const StockForm = ({ formType }) => { POC MailId} autocomplete="off" - // isOnChange={formType == 'edit' ? true : false} + // isOnChange={formType == 'edit' ? true : false} /> diff --git a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.scss b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.scss index d5a9582..27fe725 100644 --- a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.scss +++ b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.scss @@ -3,11 +3,10 @@ flex-direction: column; justify-content: space-between; gap: 0.5rem; - font-family: 'Poppins'; - .ant-form{ + font-family: "Poppins"; + .ant-form { line-height: 2.3 !important; } - } .EditQuantity-Itemname { display: flex; @@ -21,14 +20,11 @@ .EditQuantity-headingname { display: flex; align-items: center; - // width: 20rem; } .EditQuantity-headingproductname { display: flex; align-items: center; font-size: 14px; - // padding: 1rem; - // width: 25rem; } .EditQuantity-title { .formHeader { @@ -52,7 +48,6 @@ } .gridEQitem { background-color: rgba(255, 255, 255, 0.8); - // border: 1px solid rgba(0, 0, 0, 0.8); padding: 5px; font-size: 30px; text-align: center; @@ -70,13 +65,11 @@ .grid-item-add { background-color: var(--SELECTED_COLOR); color: #e1eef1; - // border: 1px solid rgba(0, 0, 0, 0.8); padding: 8px 5px 5px 5px; font-size: 23px; text-align: center; border-radius: 25px; margin: 6px; - // margin-left: 10px; } .EditQuantity-mealicon { color: #0268ba; @@ -195,7 +188,7 @@ border-radius: 4.982px; padding: 5px 6px; height: 2rem; - font-family: 'Poppins'; + font-family: "Poppins"; } .SelecBtn { background-color: var(--SELECTED_COLOR); @@ -210,7 +203,7 @@ border-radius: 4.982px; padding: 5px 6px; height: 2rem; - font-family: 'Poppins'; + font-family: "Poppins"; } .RadioButtons { display: flex; diff --git a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBPayment.scss b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBPayment.scss index 60d8315..b8d1122 100644 --- a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBPayment.scss +++ b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBPayment.scss @@ -69,7 +69,7 @@ input::-webkit-inner-spin-button { .price-button { border-radius: 8px; - border: 0px solid none; + border: none; font-size: 24px; font-weight: 600; background-color: var(--SELECTED_COLOR); @@ -78,6 +78,7 @@ input::-webkit-inner-spin-button { width: max-content; padding: 0px 12px; cursor: pointer; + height: 40px; } .price-button-disabled { @@ -143,7 +144,7 @@ input::-webkit-inner-spin-button { justify-content: center; gap: 0.2rem; background-color: #dbdbdb; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; } .payment-div-0-userplus { @@ -238,3 +239,38 @@ input::-webkit-inner-spin-button { .ChairClrGreen { color: var(--SELECTED_COLOR); } +.Btn-payment-mode-sel { + background-color: var(--DEFAULT_SELECTED_COLOR); + font-size: 14px; + font-weight: 500; + height: 40px; + width: 75px; + border-radius: 7.2px; + color: #fff; + padding: 3px; + display: flex; + gap: 0.2rem; + align-items: center; + font-family: "Poppins"; + justify-content: center; + cursor: pointer; + text-transform: capitalize; +} + +.Btn-payment-mode { + background-color: var(--SELECTED_COLOR); + font-size: 14px; + font-weight: 500; + height: 40px; + width: 75px; + border-radius: 7.2px; + color: #fff; + padding: 3px; + display: flex; + gap: 0.2rem; + align-items: center; + font-family: "Poppins"; + justify-content: center; + cursor: pointer; + text-transform: capitalize; +} diff --git a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBillingTable4.scss b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBillingTable4.scss index aaef80c..3e89f33 100644 --- a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBillingTable4.scss +++ b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBillingTable4.scss @@ -89,7 +89,7 @@ .BSBill-Table4 th { border-spacing: 0; text-align: center; - font-size: 16px; + font-size: 14px; font-style: normal; font-weight: 400; line-height: normal; @@ -277,6 +277,8 @@ background: var(--SELECTED_COLOR); text-align: center; border: 0; + color: #fff; + cursor: pointer; } .Table4-Btn-final-price-disabled { diff --git a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable5/BSBillingTable15.scss b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable5/BSBillingTable15.scss index 5037477..c6fc196 100644 --- a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable5/BSBillingTable15.scss +++ b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable5/BSBillingTable15.scss @@ -5,24 +5,12 @@ background-color: #fff; width: inherit; overflow: auto; - // height: clamp(70vh, 50vh, 40vh); - // height: 85vh; - //vm height: 80vh; } .BSBillingTable5-table-master-div-6 { - //vm height: 70vh; } -// .BSLayout5-Master .BSBillingTable5-table-master-div { -// height: 91vh !important; -// } - -// .BSLayout5-Master .BSBilling4TableCont-default { -// height: 93vh; -// } - .BSLayout5-Master .AddFavList { left: 0; height: 95vh; @@ -46,11 +34,6 @@ justify-items: center; } -.BSBillingTable5-billtable { - // height:100Vh; - // overflow: auto; -} - .BSC1-Master .BSBillingTable5-billtable { height: 100%; overflow: auto; @@ -66,7 +49,6 @@ display: flex; align-items: center; gap: 1rem; - // margin-bottom: 10px; } .BSBillingTable-title { @@ -108,7 +90,6 @@ } .BSBillingTable5-table-td { - // border: 1px solid #dddddd; border-bottom: 1.9px dashed #000; text-align: left; padding: 8px; @@ -119,7 +100,6 @@ } .BSBillingTable5-table-th { - // border: 1px solid #dddddd; border-bottom: 1.9px solid #000; padding: 10px; text-align: center; @@ -130,25 +110,23 @@ } .BSBillingTable5-table-notes { - font-size: '14px'; + font-size: "14px"; font-weight: 500; } .BSBillingTable5-table-cont { text-align: left; line-height: 1.5; - font-size: 15px; + font-size: 14px; } .BSBillingTable5-table-sub-td { - // display: flex; font-size: 14px; font-weight: 500; color: #52c41a; } .BSBillingTable5-table-tr:nth-child(even) { - // background-color: #dddddd; text-align: center; } @@ -751,32 +729,6 @@ select:focus-visible { } } -/* For screens between 768px and 991px (e.g., tablets) */ - -// @media (min-width: 768px) and (max-width: 991px) { -// .BSBillingTable-oCbtn { -// position: fixed !important; -// z-index: 1; -// } - -// .BSBillingTable5-billtable,{ -// display: none !important; -// } -// .BSLayout2-bSlayer { -// position: fixed; -// right: 0; -// } -// .BSBIllingTable5-mobscrn { -// position: fixed; -// bottom: 0; -// height: 6rem; -// // width: 100%; -// background-color: #fff; -// } -// } - -/* For screens larger than 992px (e.g., desktops) */ - @media (min-width: 991px) and (max-width: 1364px) { .BSBillingTable-oCbtn { position: fixed !important; diff --git a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable6/BST6Payment.scss b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable6/BST6Payment.scss index 15646f2..55e5bde 100644 --- a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable6/BST6Payment.scss +++ b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable6/BST6Payment.scss @@ -15,7 +15,7 @@ input::-webkit-inner-spin-button { letter-spacing: 0em; text-align: center; border: none; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; } .BST6Payment-Button-pay { @@ -29,7 +29,7 @@ input::-webkit-inner-spin-button { text-align: center; border: none; cursor: pointer; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; } .BST6Payment-Button-pay-disabled { @@ -43,7 +43,7 @@ input::-webkit-inner-spin-button { text-align: center; border: none; cursor: pointer; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; pointer-events: none; opacity: 0.5; } @@ -64,7 +64,7 @@ input::-webkit-inner-spin-button { font-weight: 600; color: #fff; cursor: pointer; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; } .BST6Payment-Button-RECIEVED { @@ -73,7 +73,7 @@ input::-webkit-inner-spin-button { border-radius: 8.3px; border: 0.83px solid #8e8e8e; font-size: 12px; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; text-align: center; } @@ -83,7 +83,7 @@ input::-webkit-inner-spin-button { border-radius: 8.3px; border: 0.83px solid #ff4d4f; font-size: 12px; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; text-align: center; } @@ -97,7 +97,7 @@ input::-webkit-inner-spin-button { border-radius: 8.3px; border: 0.83px solid #8e8e8e; font-size: 12px; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; text-align: center; } @@ -123,9 +123,6 @@ input::-webkit-inner-spin-button { flex-direction: row; gap: 2rem; align-items: center; - // margin-bottom: 15px; - // padding-right: 10px; - // align-items: center; } .BST6Payment-Paydiv { @@ -176,7 +173,7 @@ input::-webkit-inner-spin-button { display: flex; gap: 0.2rem; align-items: center; - font-family: 'Poppins'; + font-family: "Poppins"; justify-content: center; cursor: pointer; text-transform: capitalize; @@ -207,19 +204,22 @@ input::-webkit-inner-spin-button { .Btn-payment-mode { background-color: var(--SELECTED_COLOR); - font-size: 14px; + font-size: 13px !important; font-weight: 500; height: 40px; - width: 100px; + flex-grow: 1; + flex: 1; + width: max-content !important; border-radius: 7.2px; color: #fff; padding: 3px; display: flex; gap: 0.2rem; align-items: center; - font-family: 'Poppins'; + font-family: "Poppins"; justify-content: center; cursor: pointer; + border: none; text-transform: capitalize; @media (max-width: 992px) { font-size: 11px; @@ -240,20 +240,23 @@ input::-webkit-inner-spin-button { .Btn-payment-mode-sel { background-color: var(--DEFAULT_SELECTED_COLOR); - font-size: 14px; + font-size: 13px !important; font-weight: 500; height: 40px; - width: 100px; + width: max-content !important; + flex: 1; + flex-grow: 1; border-radius: 7.2px; color: #fff; padding: 3px; display: flex; gap: 0.2rem; align-items: center; - font-family: 'Poppins'; + font-family: "Poppins"; justify-content: center; cursor: pointer; text-transform: capitalize; + border: none; @media (max-width: 992px) { font-size: 11px; height: 35px; diff --git a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.scss b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.scss index 2e421b3..b1e3c37 100644 --- a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.scss +++ b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTable7/BSBillingTable7.scss @@ -13,7 +13,7 @@ // height: 90%; } .BSTable3_overall-6 { - height: 71vh ; + height: 71vh; } .BSBill-Table7 { @@ -45,11 +45,8 @@ .BSBill-Table7 th { position: sticky; - border-spacing: 0; - // color: black; text-align: center; - font-size: 16px; font-style: normal; font-weight: 600; @@ -59,10 +56,9 @@ .BSBill-Table7-content { background-color: rgba(235, 235, 236, 1); height: 3rem; - - font-size: 14px; + font-size: 13px; font-style: normal; - font-weight: 600; + font-weight: 500; } .BSBill-Table7-content-disabled { @@ -164,9 +160,7 @@ margin: 10px 10px; } -.Table7-customer - .ant-select-single:not(.ant-select-customize-input) - .ant-select-selector { +.Table7-customer .ant-select-single:not(.ant-select-customize-input) .ant-select-selector { width: 10rem; height: 3rem; text-align: center; @@ -178,9 +172,7 @@ font-weight: 600; } -.Table7-customer - .ant-select-single.ant-select-show-arrow - .ant-select-selection-placeholder { +.Table7-customer .ant-select-single.ant-select-show-arrow .ant-select-selection-placeholder { color: #000; padding-inline-end: 0px !important; } @@ -274,14 +266,12 @@ } .BSBill-Table7 th { - // font-weight: 400 !important; padding: 2px; } .BSBill-Table7-content { font-size: 14px; font-style: normal; - // font-weight: 400; } .Table7-items { @@ -327,7 +317,7 @@ .Table7-rate { display: flex; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; font-size: 32.203px; font-style: normal; font-weight: bold; @@ -347,7 +337,6 @@ .icon-button { height: 30px; - // width:30px; border-radius: 30px; padding: 0px; margin: 6px 6px; @@ -401,12 +390,12 @@ .BSBilling7-icon-flex { display: flex; align-items: center; - div{ + div { display: flex; align-items: center; justify-content: center; - svg{ - margin-top: -7px; + svg { + margin-top: -7px; } } } @@ -419,13 +408,9 @@ .BSBilling7-vertical-line { width: 1px; - /* Adjust the width as needed */ height: 100%; - /* This will make the line span the entire height of its container */ background-color: #000; - /* Change the background color to your desired color */ margin: 0 10px; - /* Adjust margin as needed to position the line */ } hr.Table7-Dotted-Line1 { @@ -478,7 +463,6 @@ hr.Table7-Dotted-Line1 { } .edit-btn-table:focus { - // background-color: #ffdb3a; background-color: #fff; color: var(--SELECTED_COLOR) !important; border: solid 1px var(--SELECTED_COLOR); @@ -514,10 +498,6 @@ hr.Table7-Dotted-Line1 { justify-content: flex-end; } -.radio-button-group .item { - // width: 100%; -} - .radio-button-group .radio-button { position: absolute; width: 1px; @@ -528,16 +508,14 @@ hr.Table7-Dotted-Line1 { .radio-button-group .radio-button + label { padding: 4px 10px; cursor: pointer; - // border: 1px solid #CCC; border: none; margin-right: -2px; color: #ffffff; background-color: var(--DEFAULT_SELECTED_COLOR); - font-family: 'gilroy'; + font-family: "gilroy"; font-size: 13px; font-weight: 600; display: block; - // text-transform: uppercase; text-align: center; } diff --git a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTables3/BSBillingTable3.scss b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTables3/BSBillingTable3.scss index d706aff..2209274 100644 --- a/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTables3/BSBillingTable3.scss +++ b/src/Styles/BookingScreen/Components/BSBillingTables/BSBillingTables3/BSBillingTable3.scss @@ -123,6 +123,8 @@ align-items: center; border: none; column-gap: 0rem; + width: max-content; + height: 2rem; border-radius: 4.982px; padding: 5px 6px; height: 2rem; diff --git a/src/Styles/BookingScreen/Components/BSItemCards/BSItemCard.scss b/src/Styles/BookingScreen/Components/BSItemCards/BSItemCard.scss index 04e811e..eb9584d 100644 --- a/src/Styles/BookingScreen/Components/BSItemCards/BSItemCard.scss +++ b/src/Styles/BookingScreen/Components/BSItemCards/BSItemCard.scss @@ -37,7 +37,6 @@ text-align: center; } - .BSItemCard-master-container { display: flex; flex-direction: row; @@ -83,30 +82,30 @@ background-color: rgba(255, 255, 255, 0.8); position: absolute; display: flex; - column-gap: 0.5rem; + column-gap: 0.5rem; justify-content: center; cursor: pointer; - bottom: 0px; - left: 0; + bottom: 0px; + left: 0; right: 0; } .BSItemCard-itemName { text-align: center; - font-size: 12px; + font-size: 12px; font-weight: 500; max-width: 130px; - white-space: nowrap; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - } +} .BSItemCard-itemPrice { - color: #52c41a; + color: #52c41a; font-size: 14px; font-weight: 600; font-family: "Gilroy"; - white-space: nowrap; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 105px; @@ -120,7 +119,7 @@ .BSItemCard-badge-withoutimage { position: absolute; - top: 0px; + top: 0px; right: 0; } @@ -145,7 +144,7 @@ .BSItemCard-content-smallimage { width: max-content; padding: 5px 0; - display: flex; + display: flex; flex-direction: column; column-gap: 0.5rem; justify-content: center; @@ -163,8 +162,7 @@ column-gap: 0.3rem; row-gap: 0.5rem; cursor: pointer; - // vicky - justify-content: space-around; + justify-content: space-around; } .BSItemCard-containers-smallimage-mobile { @@ -174,7 +172,7 @@ flex-direction: row; column-gap: 0.4rem; row-gap: 0.5rem; - cursor: pointer; + cursor: pointer; } .BSItemCard-content-small-screem { @@ -199,7 +197,7 @@ @media (min-width: 280px) and (max-width: 499px) { .ItemWiseReport-heading { display: flex; - align-items: flex-start; + align-items: flex-start; align-items: center; } @@ -215,7 +213,7 @@ tr, td { font-size: 14px !important; - } + } .other-submitbtn { justify-content: flex-start !important; @@ -240,7 +238,6 @@ .configMsrSubDiv { column-gap: 0.5rem !important; } - .ant-modal .ant-modal-content { padding: 1rem !important; @@ -269,12 +266,9 @@ .BSItemCard-itemPrice { font-size: 9px !important; - //nk width: 60px !important; - // } - //nk .qtyUomName-itemCard { width: 78px !important; } @@ -315,9 +309,7 @@ .BSItemCard-master-container { padding: 0px 0px; justify-content: center !important; - // padding-bottom: 10rem !important; padding-bottom: 1rem !important; - // column-gap: 0.1rem !important; } .BSItemCard-container { @@ -328,11 +320,11 @@ .BSItemCard-containers-mobile { width: 6rem !important; } - + .BSItemCard-content-small-screem { width: 8rem !important; height: 6rem !important; - } + } .BSItemCard-itemName { width: 60px !important; font-size: 10px; @@ -340,15 +332,13 @@ text-align: center !important; } - .bs-item-card-masterdiv { + .bs-item-card-masterdiv { height: inherit; } - } @media (min-width: 500px) and (max-width: 767px) { .bs-item-card-masterdiv { - // height: 77vh !important; height: inherit; } @@ -362,7 +352,6 @@ @media (min-width: 280px) and (max-width: 499px) { .bs-item-card-masterdiv { - // height: 60vh !important; height: inherit; } @@ -372,7 +361,6 @@ margin-top: 3px; } } - .QRStockchange-table thead { position: sticky; @@ -405,9 +393,7 @@ } .BkPrdCardDeActive { - // pointer-events: none; border: 1px solid #f10000; - // border-radius: 8px; .BSItemCard-container-smallimage { width: 10.9rem; } @@ -424,23 +410,23 @@ z-index: 1; } -.Card-modal-table { +.Card-modal-table { height: 59vh; overflow: auto; - justify-content: flex-start; + justify-content: flex-start; padding: 1.8rem 0.5rem; column-gap: 0.5rem; row-gap: 1rem; } .Brand-Card-modal-table { - height: 43vh; + height: 43vh; overflow: auto; justify-content: flex-start; - padding: 1.8rem 0.5rem; + padding: 1.8rem 0.5rem; column-gap: 0.5rem; row-gap: 1rem; - } +} .Brand-Card-modal-table::-webkit-scrollbar { width: 10px !important; @@ -510,7 +496,6 @@ flex-direction: column; justify-content: center; column-gap: 0.1rem; - border-radius: 2px; } @@ -520,19 +505,6 @@ font-family: "Gilroy"; text-align: center; } - -//nk -.qtyUomName-itemCard { - font-size: 15px; - font-weight: 600; - font-family: "Gilroy"; - text-align: center; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - width: 105px; -} - .qtyprice { font-size: 16px; background-color: var(--DEFAULT_SELECTED_COLOR); @@ -547,6 +519,18 @@ border-bottom-right-radius: 6px; } +//nk +.qtyUomName-itemCard { + font-size: 15px; + font-weight: 600; + font-family: "Gilroy"; + text-align: center; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + width: 105px; +} + .Card-modal-table .ant-pagination { position: sticky; bottom: 0; @@ -816,7 +800,6 @@ .Payment-loader1 { .Payment-loader { - // column-gap: 1rem; .contener_mixte { top: 5px; right: 12rem; @@ -827,28 +810,26 @@ .EditQuantity-Master { .Re-Print-table { width: 100% !important; + scrollbar-width: none; + } + .ant-table-thead tr { + background-color: #1292ee !important; } } .webkit-ul { height: 35vh; overflow-y: auto; - - /* Firefox */ scrollbar-width: thin; - /* Options: auto | thin | none */ scrollbar-color: #c1c1c1 transparent; } -/* WebKit Browsers: Chrome, Edge, Safari */ .webkit-ul::-webkit-scrollbar { width: 25px; - /* Adjust width as needed */ } .webkit-ul::-webkit-scrollbar-track { background: #f0f0f0; - /* Optional: add contrast to track */ border-radius: 10px; } @@ -856,7 +837,6 @@ background-color: #c1c1c1; border-radius: 10px; border: 6px solid transparent; - /* Adjust for padding inside thumb */ background-clip: content-box; transition: background-color 0.3s ease; } @@ -1108,21 +1088,12 @@ } .booked-text { - // color: #070; color: rgb(241, 16, 16); - font-weight: 600; cursor: not-allowed !important; margin-top: 4px; } -// .Available-text{ -// color: rgb(41, 201, 41); -// font-weight: 600; -// cursor: not-allowed !important; -// margin-top: 4px; -// } - .slot-btn.incart { background: #ffe066; color: #222; @@ -1139,7 +1110,7 @@ flex-wrap: wrap; flex-direction: row; column-gap: 1rem; - row-gap: 0.5rem; + row-gap: 0.5rem; font-family: "Poppins"; font-size: 14px; color: #000; @@ -1687,10 +1658,6 @@ color: #ffffff; border-color: #31a0f0; cursor: not-allowed; - // &:hover{ - // color:#148498; - // background-color: #fff; - // } } &.selected { @@ -2254,11 +2221,9 @@ cursor: pointer; height: 270px; width: 195px; - // background-color: #fff; border-radius: 0.75rem; display: flex; flex-direction: column; - // justify-content: space-between; margin-top: 10px; position: relative; border: 2px solid rgba(0, 0, 0, 0.3); @@ -2266,7 +2231,6 @@ .voiceToTextIcon { position: fixed; - // width: max-content; top: 7px; left: 10px; display: flex; diff --git a/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar2.scss b/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar2.scss index 93504fd..93073bc 100644 --- a/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar2.scss +++ b/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar2.scss @@ -9,6 +9,10 @@ .RiVerifiedBadgeFill { color: #1292ee !important; } + .FaparkingIcon { + width: 32px !important; + height: 32px !important; + } } .BSBillingNav2div2 { diff --git a/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar3.scss b/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar3.scss index 02b1696..9fadde1 100644 --- a/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar3.scss +++ b/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar3.scss @@ -305,6 +305,7 @@ .BSBillingNav-icon { color: #ffffff !important; transition: all 0.2s ease-in-out; + width: 30px !important; &:hover { color: #1292ee !important; } diff --git a/src/Styles/BookingScreen/Template/BSLayout3/BSLayout3.scss b/src/Styles/BookingScreen/Template/BSLayout3/BSLayout3.scss index e745535..1617736 100644 --- a/src/Styles/BookingScreen/Template/BSLayout3/BSLayout3.scss +++ b/src/Styles/BookingScreen/Template/BSLayout3/BSLayout3.scss @@ -25,11 +25,11 @@ height: 100%; @media (max-width: 768px) { - top: 2rem; + top: 3.5rem; } @media (max-width: 500px) { - top: 2rem; + top: 3rem; } } diff --git a/src/Styles/BookingScreen/Template/BSLayout7/BSC1Search.scss b/src/Styles/BookingScreen/Template/BSLayout7/BSC1Search.scss index ab83a7d..8b0456a 100644 --- a/src/Styles/BookingScreen/Template/BSLayout7/BSC1Search.scss +++ b/src/Styles/BookingScreen/Template/BSLayout7/BSC1Search.scss @@ -1,8 +1,4 @@ .BSC1Search-container { - // display: flex; - // flex-direction: row; - // padding: 0.5rem 0 0 1.5rem; - // gap: 0.5rem; width: 100%; display: flex; flex-direction: row; @@ -143,7 +139,6 @@ scrollbar-width: thin; } - .ItemQtyCard { display: flex; justify-content: center; @@ -159,11 +154,11 @@ display: flex; justify-content: center; flex-direction: column; - justify-content: center; + justify-content: center; border: solid 1px #e4e4e4; background-color: #f3f3f3; - transition-duration: 0.3s; - border-radius: 6px; + transition-duration: 0.3s; + border-radius: 6px; opacity: 0.5; pointer-events: none; } @@ -194,4 +189,55 @@ display: flex; flex-direction: column; row-gap: 1rem; -} \ No newline at end of file +} + +.qtyDetail { + display: flex; + flex-direction: column; + justify-content: center; + column-gap: 0.1rem; + border-radius: 2px; +} + +.qtyUomName { + font-size: 15px; + font-weight: 600; + font-family: "Gilroy"; + text-align: center; +} +.qtyprice { + font-size: 16px; + background-color: var(--DEFAULT_SELECTED_COLOR); + color: #fff; + width: 105px; + display: flex; + font-family: var(--PARA_FONT_FAMILY); + justify-content: center; + text-align: center; + border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; +} + +.ItemQtyImgCard { + display: flex; + align-items: center; + justify-content: center; +} + +.EditQuantity-heading { + display: flex; + align-items: center; + width: 25rem; +} +.EditQuantity-headingname { + display: flex; + align-items: center; + // width: 20rem; +} +.EditQuantity-headingproductname { + display: flex; + align-items: center; + font-size: 14px; + // padding: 1rem; + // width: 25rem; +} diff --git a/src/Styles/BookingScreen/Template/BSLayout7/Combo1.scss b/src/Styles/BookingScreen/Template/BSLayout7/Combo1.scss index 8a68a92..6296e81 100644 --- a/src/Styles/BookingScreen/Template/BSLayout7/Combo1.scss +++ b/src/Styles/BookingScreen/Template/BSLayout7/Combo1.scss @@ -630,6 +630,22 @@ align-items: center; justify-content: center; gap: 10px; + .allpageSettingIcon { + width: 32px; + height: 32px; + background-color: #1292ee !important; + border-radius: 6px; + display: flex; + align-items: center; + justify-content: center; + padding: 5px !important; + color: #fff; + font-size: 25px !important; + svg { + height: 30px !important; + width: 30px !important; + } + } .comboPrichangeBTN { width: 32px; @@ -704,23 +720,35 @@ } } -.MultiSearchIconDiv3 { - background-color: #ffffff; - color: #1292ee !important; +.MultiSearchIconDiv { + background-color: #1292ee; + color: #fff !important; border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; - width: 32px !important; - height: 32px; - padding: 4px; + width: 35px !important; + height: 33px; + padding: 6px; svg { font-size: 22px; - width: 32px !important; - height: 32px; + width: 35px !important; + height: 35px; display: flex; } } +.AsAmtCombo { + svg { + height: 25px; + } +} + +.SearchNavMutiple { + display: flex; + align-items: center; + gap: 0; + width: inherit; +} diff --git a/src/Styles/Stock/StockMaster.scss b/src/Styles/Stock/StockMaster.scss index 9bb39aa..bdf6153 100644 --- a/src/Styles/Stock/StockMaster.scss +++ b/src/Styles/Stock/StockMaster.scss @@ -2,8 +2,7 @@ display: flex; flex-direction: column; align-items: flex-start; - // border: 0.3px solid black; - width: 95%; + width: 100%; } .product-qty-info { @@ -60,9 +59,6 @@ align-items: center; } -// .Product-table .ant-table{ -// width:90%; -// } .supplierInfo { display: flex; flex-direction: column; @@ -70,12 +66,13 @@ padding: 0.8rem; gap: 10px; width: 100%; + border-radius: 6px; } .supplierInfo1 { display: flex; flex-wrap: wrap; - width: 80% !important; + width: 100% !important; gap: 1rem; align-items: flex-start; @@ -133,7 +130,6 @@ .extractor-table { overflow: auto; scrollbar-width: thin; - } .extractor-table-red .ant-table-thead { @@ -171,21 +167,19 @@ &:hover { background-color: #ff4d4f !important; - } } &.added { background-color: #52c41a; } - } .product-legend { display: flex; align-items: center; gap: 10px; - font-family: 'Poppins'; + font-family: "Poppins"; margin-bottom: 10px; .legend-item { @@ -209,40 +203,6 @@ } } -// .supplierInfo .ant-select-selector -// { -// width:15rem !important; -// height:3rem !important; -// } -// .supplierInfo :where(.css-dev-only-do-not-override-2i2tap).ant-select.ant-select-in-form-item -// { -// width:15rem !important; -// height:3rem !important; -// } - -// .supplierInfo .ant-input{ -// width:15rem !important; -// height:3rem !important; -// } -// .invoiceDetails .ant-input{ -// width:15rem !important; -// height:3rem !important; -// } -// .invoiceDetails .example{ -// width: 15rem ; - -// } -// .invoiceDetails .ant-select-selector -// { -// width:15rem !important; -// height:3rem !important; -// } -// .invoiceDetails :where(.css-dev-only-do-not-override-2i2tap).ant-select.ant-select-in-form-item -// { -// width:15rem !important; -// height:3rem !important; -// } - .stockDiv { display: flex; flex-wrap: wrap; @@ -282,10 +242,6 @@ display: flex; } - // .formHeader { - // width: -webkit-fill-available; - // } - .header-buttons { display: flex; align-items: center; @@ -395,7 +351,6 @@ &:hover { background-color: #ffffff !important; - // font-size: 16px; height: max-content !important; } @@ -468,14 +423,6 @@ } } -// .stockDiv { -// .ant-select-arrow { -// top: 70% !important; -// z-index: 2000 !important; -// cursor: pointer !important; -// } -// } - .product-scan { position: relative; @@ -613,7 +560,6 @@ } .stock-input { - // width: 100vw; width: 100%; } } @@ -900,6 +846,9 @@ .ant-form-item { margin-bottom: 0 !important; } + .float-label { + margin-bottom: 0; + } } @media (max-width: 400px) { @@ -909,3 +858,6 @@ padding-bottom: 8px !important; } } +.inputFormSTOCKFORM { + width: 100%; +} diff --git a/src/main.jsx b/src/main.jsx index 67d43fe..46df9ad 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -10,12 +10,6 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; const queryClient = new QueryClient(); -// Un Command This line when deployed in App Server -window.addEventListener('beforeunload', (e) => { - e.preventDefault(); - e.returnValue = ''; -}); - ReactDOM.createRoot(document.getElementById('root')).render( From bdd9ea7a393dda6f3a2cc8440a8c18453bed8e14 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 25 Feb 2026 16:59:05 +0530 Subject: [PATCH 2/2] after resolve conflicts --- .../Template/SalesCountForStandard.jsx | 1357 +++++++++-------- .../Components/BSItemCards/BSItemCard.scss | 86 +- 2 files changed, 750 insertions(+), 693 deletions(-) diff --git a/src/Pages/BookingScreen/Template/SalesCountForStandard.jsx b/src/Pages/BookingScreen/Template/SalesCountForStandard.jsx index cb13822..63e91b5 100644 --- a/src/Pages/BookingScreen/Template/SalesCountForStandard.jsx +++ b/src/Pages/BookingScreen/Template/SalesCountForStandard.jsx @@ -1,4 +1,12 @@ -import { useEffect, useState, useMemo, useCallback, lazy } from 'react'; +import { + useEffect, + useState, + useMemo, + useCallback, + lazy, + Suspense, + useRef, +} from 'react'; import { useSelector, useDispatch } from 'react-redux'; import { FaChartLine, FaRupeeSign } from 'react-icons/fa'; import { Badge, Popconfirm, Tooltip } from 'antd'; @@ -8,6 +16,7 @@ import { getCardDataWithoutSub, getCardDataWithoutSubmodule, getLayoutproductCard, + getPreferenceData, getSelectedFavItems, GlobalOrderStatus, GlobalOtherSevices, @@ -482,10 +491,10 @@ const SalesCountForStandard = React.memo(() => { return ( DineInAccess?.SettingValue === 'Y' && DineInOrderCount + - TakeAwayOrderCount + - SelfTakeAwayOrderCount + - SelfDineInOrderCount > - 0 && + TakeAwayOrderCount + + SelfTakeAwayOrderCount + + SelfDineInOrderCount > + 0 && (takeAwayPreference || dinePreference) ); }, [DineInAccess, sales, dinePreference, takeAwayPreference]); @@ -579,715 +588,721 @@ const SalesCountForStandard = React.memo(() => { }; return ( -
- -
-
- {showSalesTooltip ? ( - - {takeAwayPreference && ( -
-
Takeaway:
-
{TakeAwayOrderCount + SelfTakeAwayOrderCount}
-
- )} - {dinePreference && ( -
-
Dine-in:
-
{DineInOrderCount + SelfDineInOrderCount}
-
- )} + Loading...
}> +
+ +
+
+ {showSalesTooltip ? ( + + {takeAwayPreference && ( +
+
Takeaway:
+
{TakeAwayOrderCount + SelfTakeAwayOrderCount}
+
+ )} + {dinePreference && ( +
+
Dine-in:
+
{DineInOrderCount + SelfDineInOrderCount}
+
+ )} +
+ } + onClick={() => + (OverAllOrderCount || 0) > 0 && setIsModalOpen(true) + } + > + +
+ {isMobile ? 'Count' : 'Sales Count'} : {OverAllOrderCount} +
+ + ) : ( +
+ (OverAllOrderCount || 0) > 0 && setIsModalOpen(true) + } + > + +
+ {isMobile ? 'Count' : 'Sales Count'} : {OverAllOrderCount}
- } - onClick={() => - (OverAllOrderCount || 0) > 0 && setIsModalOpen(true) - } - > - -
- {isMobile ? 'Count' : 'Sales Count'} : {OverAllOrderCount}
- - ) : ( -
- (OverAllOrderCount || 0) > 0 && setIsModalOpen(true) - } - > - -
- {isMobile ? 'Count' : 'Sales Count'} : {OverAllOrderCount} -
-
- )} -
-
- - {/* Rest of your component remains the same */} - {DineInAccess?.SettingValue === 'Y' && - takeAwayPreference && - (TakeAwayOrderCount || SelfTakeAwayOrderCount || PreOrderAmount) > - 0 && ( - -
-
{isMobile ? 'TA' : 'Take Away'} :
-
{`₹ ${safeRound(totalTakeAway)}`}
-
-
- )} - - {DineInAccess?.SettingValue === 'Y' && - dinePreference && - (DineInOrderCount || SelfDineInOrderCount) > 0 && ( - -
-
{isMobile ? 'DI' : 'Dine In'} :
-
{`₹ ${safeRound(totalDineIn)}`}
-
-
- )} - -
-
netAmount > 0 && setIsNetAmtModalOpen(true)} - style={{ cursor: 'pointer' }} - > - -
- {isMobile ? 'NA' : 'Net Amount'} : ₹ {safeRound(netAmount)} + )}
-
- {TableData?.length > 0 && !sportsAppPreference && AutoReceiveStock && ( - - )} - {preferenceshortcutkey && ( -
- + + {/* Rest of your component remains the same */} + {DineInAccess?.SettingValue === 'Y' && + takeAwayPreference && + (TakeAwayOrderCount || SelfTakeAwayOrderCount || PreOrderAmount) > + 0 && ( + +
+
{isMobile ? 'TA' : 'Take Away'} :
+
{`₹ ${safeRound(totalTakeAway)}`}
+
+
+ )} + + {DineInAccess?.SettingValue === 'Y' && + dinePreference && + (DineInOrderCount || SelfDineInOrderCount) > 0 && ( + +
+
{isMobile ? 'DI' : 'Dine In'} :
+
{`₹ ${safeRound(totalDineIn)}`}
+
+
+ )} + +
+
netAmount > 0 && setIsNetAmtModalOpen(true)} + style={{ cursor: 'pointer' }} + > + +
+ {isMobile ? 'NA' : 'Net Amount'} : ₹ {safeRound(netAmount)} +
+
- )} - -
- {Customisebillno && } - {SessionData?.FeatureAddonData?.FeatureDtls?.find( - (item) => item?.FeatureAddonName?.toLowerCase() === 'kiosk sales' - ) && - !sportsAppPreference && ( -
0 && !sportsAppPreference && AutoReceiveStock && ( + + )} + {preferenceshortcutkey && ( +
+ +
+ )} + +
+ {Customisebillno && } + {SessionData?.FeatureAddonData?.FeatureDtls?.find( + (item) => item?.FeatureAddonName?.toLowerCase() === 'kiosk sales' + ) && + !sportsAppPreference && ( +
0 ? 'none' : 'auto', + opacity: OrderStatus > 0 ? 0.5 : 1, + }} + > + {!OtherServicesglobal && ( + + + openModalKiosk()} + style={{ cursor: 'pointer', fontSize: '1.5rem' }} + className="iconsize" + /> + + + )} +
+ )} + {Kioskopen && ( + + )} + + {!OtherServicesglobal && !sportsAppPreference && ( + + {' '} + + + )} + + {!OtherServicesglobal && ( + <> + {CheckBookingStatus == 'Open' ? ( +
+ + {' '} + + +
+ ) : ( +
+ + BookingOpenFun('Open')} + > + + + + + +
+ )} + {!sportsAppPreference && ( +
+ + {''} + + +
+ )} + + )} + + {BookingModalOpen && ( + + )} + {ListOfInvoices && ( + + )} +
+ + {/* Modal with table for multiple bookings */} + + setIsModalOpen(false)} + handleSubmit={() => setIsModalOpen(false)} + width={700} + footer={false} + > +
+ 0 ? 'none' : 'auto', - opacity: OrderStatus > 0 ? 0.5 : 1, + width: '100%', + borderCollapse: 'collapse', + fontFamily: "'Segoe UI', Roboto, sans-serif", + fontSize: '14px', + borderRadius: '8px', + overflow: 'hidden', + boxShadow: '0 2px 8px rgba(0,0,0,0.1)', }} > - {!OtherServicesglobal && ( - - - openModalKiosk()} - style={{ cursor: 'pointer', fontSize: '1.5rem' }} - className="iconsize" - /> - - - )} - - )} - {Kioskopen && ( - - )} - - {!OtherServicesglobal && !sportsAppPreference && ( - - {' '} - - - )} + + + + + + + {/* */} + + + + - {!OtherServicesglobal && ( - <> - {CheckBookingStatus == 'Open' ? ( -
- - {' '} - - -
- ) : ( -
- - BookingOpenFun('Open')} - > - - - - - -
- )} - {!sportsAppPreference && ( -
- - {''} - - -
- )} - - )} - - {BookingModalOpen && ( - - )} - {ListOfInvoices && ( - - )} - - - {/* Modal with table for multiple bookings */} - - setIsModalOpen(false)} - handleSubmit={() => setIsModalOpen(false)} - width={700} - footer={false} - > -
-
+ S.No + + Order ID + + Customer + + Mobile + Booked By + Payment Type + + Amount (₹) +
- - - - - - - {/* */} - - - - - - - {currentData?.length > 0 ? ( - currentData?.map((item, index) => ( - - (e.currentTarget.style.backgroundColor = '#d6e4ff') - } - onMouseLeave={(e) => + + {currentData?.length > 0 ? ( + currentData?.map((item, index) => ( + + (e.currentTarget.style.backgroundColor = '#d6e4ff') + } + onMouseLeave={(e) => (e.currentTarget.style.backgroundColor = index % 2 === 0 ? '#f7faff' : '#e9f1ff') - } - > - - - - - {/* + + + + {/* */} - + + + + )) + ) : ( + - )) - ) : ( - -
- S.No - - Order ID - - Customer - - Mobile - Booked By - Payment Type - - Amount (₹) -
- {startIndex + index + 1} - - {extractLastNumberOrderId(item.OrderId)} - - {item.CustName || '—'} - - {item.CustMobile || '—'} - + } + > + + {startIndex + index + 1} + + {extractLastNumberOrderId(item.OrderId)} + + {item.CustName || '—'} + + {item.CustMobile || '—'} + {item.BookedBy || "—"} - {item.PaymentTypeName || '—'} - + {item.PaymentTypeName || '—'} + + ₹{item.Amount?.toLocaleString()} +
- ₹{item.Amount?.toLocaleString()} + No booking data available
+
+ + {/* Pagination */} + {totalPages > 1 && ( +
+ {currentPage == 1 ? ( + '' + ) : ( + + )} + + + Page {currentPage} of {totalPages} + - {/* Pagination */} - {totalPages > 1 && ( -
- {currentPage == 1 ? ( - '' - ) : ( - )} +
+ )} +
+ - - Page {currentPage} of {totalPages} - + {/* Modal with table for multiple Net Amt */} - -
- )} -
- - - {/* Modal with table for multiple Net Amt */} - - setIsNetAmtModalOpen(false)} - handleSubmit={() => setIsNetAmtModalOpen(false)} - width={800} - footer={false} - > -
- - - - - - - - - - - - - - - - - - - - - - - - - - {orderDetails?.map((item, index) => { - const total = - (item.CashAmount || 0) + - (item.UpiAmount || 0) + - (item.CardAmount || 0) + - (item.CreditAmount || 0); - - return ( - setIsNetAmtModalOpen(false)} + handleSubmit={() => setIsNetAmtModalOpen(false)} + width={800} + footer={false} + > +
+
- Cash - - UPI - - Card - - Credit - - Business UPI - - Total -
- Count - - Amt - - Count - - Amt - - Count - - Amt - - Count - - Amt - - Count - - Amt -
+ + + + + + + + + + + + + + + + + + + + + + + + + {orderDetails?.map((item, index) => { + const total = + (item.CashAmount || 0) + + (item.UpiAmount || 0) + + (item.CardAmount || 0) + + (item.CreditAmount || 0); + + return ( + + (e.currentTarget.style.backgroundColor = '#e6f2ff') + } + onMouseLeave={(e) => (e.currentTarget.style.backgroundColor = index % 2 === 0 ? '#f7faff' : '#ffffff') - } - > - - - - - - - - - - - - - ); - })} - -
+ Cash + + UPI + + Card + + Credit + + Business UPI + - (e.currentTarget.style.backgroundColor = '#e6f2ff') - } - onMouseLeave={(e) => + > + Total +
+ Count + + Amt + + Count + + Amt + + Count + + Amt + + Count + + Amt + + Count + + Amt +
- {item.CashCount} - - {item.CashAmount} - - {item.UpiCount} - - {item.UpiAmount} - - {item.CardCount} - - {item.CardAmount} - - {item.CreditCount} - - {item.CreditAmount} - - {item.BusinessUpiCount} - - {item.BusinessUpiAmount} - - {total} -
-
-
+ + {item.CashCount} + + + {item.CashAmount} + + + {item.UpiCount} + + + {item.UpiAmount} + + + {item.CardCount} + + + {item.CardAmount} + + + {item.CreditCount} + + + {item.CreditAmount} + + + {item.BusinessUpiCount} + + + {item.BusinessUpiAmount} + + + {total} + + + ); + })} + + +
+ - { - setIsReceivedModelOpen(false); - }} - columns={columns} - tableData={TableData} - handlePageChange={handlePageChange} - customTable={false} - /> + { + setIsReceivedModelOpen(false); + }} + columns={columns} + tableData={TableData} + handlePageChange={handlePageChange} + customTable={false} + /> - setModalProductDetails(d)} - onSubmit={handleModalSubmit} - /> -
+ setModalProductDetails(d)} + onSubmit={handleModalSubmit} + /> +
+ ); }); diff --git a/src/Styles/BookingScreen/Components/BSItemCards/BSItemCard.scss b/src/Styles/BookingScreen/Components/BSItemCards/BSItemCard.scss index eb9584d..0bbeb80 100644 --- a/src/Styles/BookingScreen/Components/BSItemCards/BSItemCard.scss +++ b/src/Styles/BookingScreen/Components/BSItemCards/BSItemCard.scss @@ -37,6 +37,7 @@ text-align: center; } + .BSItemCard-master-container { display: flex; flex-direction: row; @@ -162,6 +163,7 @@ column-gap: 0.3rem; row-gap: 0.5rem; cursor: pointer; + // vicky justify-content: space-around; } @@ -239,6 +241,7 @@ column-gap: 0.5rem !important; } + .ant-modal .ant-modal-content { padding: 1rem !important; } @@ -266,9 +269,12 @@ .BSItemCard-itemPrice { font-size: 9px !important; + //nk width: 60px !important; + // } + //nk .qtyUomName-itemCard { width: 78px !important; } @@ -309,7 +315,9 @@ .BSItemCard-master-container { padding: 0px 0px; justify-content: center !important; + // padding-bottom: 10rem !important; padding-bottom: 1rem !important; + // column-gap: 0.1rem !important; } .BSItemCard-container { @@ -325,6 +333,7 @@ width: 8rem !important; height: 6rem !important; } + .BSItemCard-itemName { width: 60px !important; font-size: 10px; @@ -335,10 +344,12 @@ .bs-item-card-masterdiv { height: inherit; } + } @media (min-width: 500px) and (max-width: 767px) { .bs-item-card-masterdiv { + // height: 77vh !important; height: inherit; } @@ -352,6 +363,7 @@ @media (min-width: 280px) and (max-width: 499px) { .bs-item-card-masterdiv { + // height: 60vh !important; height: inherit; } @@ -362,6 +374,7 @@ } } + .QRStockchange-table thead { position: sticky; top: 0; @@ -373,7 +386,7 @@ border-spacing: 0px; } -.QRStockchange-table .ant-table-wrapper .ant-table-thead > tr > th { +.QRStockchange-table .ant-table-wrapper .ant-table-thead>tr>th { color: black !important; font-weight: 600 !important; font-size: 14px; @@ -393,7 +406,10 @@ } .BkPrdCardDeActive { + // pointer-events: none; border: 1px solid #f10000; + + // border-radius: 8px; .BSItemCard-container-smallimage { width: 10.9rem; } @@ -496,6 +512,7 @@ flex-direction: column; justify-content: center; column-gap: 0.1rem; + border-radius: 2px; } @@ -505,19 +522,6 @@ font-family: "Gilroy"; text-align: center; } -.qtyprice { - font-size: 16px; - background-color: var(--DEFAULT_SELECTED_COLOR); - color: #fff; - // padding: 0rem 2rem; - width: 105px; - display: flex; - font-family: var(--PARA_FONT_FAMILY); - justify-content: center; - text-align: center; - border-bottom-left-radius: 6px; - border-bottom-right-radius: 6px; -} //nk .qtyUomName-itemCard { @@ -531,6 +535,20 @@ width: 105px; } +.qtyprice { + font-size: 16px; + background-color: var(--DEFAULT_SELECTED_COLOR); + color: #fff; + // padding: 0rem 2rem; + width: 105px; + display: flex; + font-family: var(--PARA_FONT_FAMILY); + justify-content: center; + text-align: center; + border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; +} + .Card-modal-table .ant-pagination { position: sticky; bottom: 0; @@ -539,13 +557,13 @@ background-color: #fafafa; } -.Card-modal-table .ant-table-wrapper .ant-table-thead > tr > th { +.Card-modal-table .ant-table-wrapper .ant-table-thead>tr>th { color: black !important; font-weight: 600 !important; font-size: 14px; } -.Card-modal-table .ant-table-row > td { +.Card-modal-table .ant-table-row>td { color: black !important; font-weight: 500 !important; font-size: 16px; @@ -800,6 +818,8 @@ .Payment-loader1 { .Payment-loader { + + // column-gap: 1rem; .contener_mixte { top: 5px; right: 12rem; @@ -810,26 +830,28 @@ .EditQuantity-Master { .Re-Print-table { width: 100% !important; - scrollbar-width: none; - } - .ant-table-thead tr { - background-color: #1292ee !important; } } .webkit-ul { height: 35vh; overflow-y: auto; + + /* Firefox */ scrollbar-width: thin; + /* Options: auto | thin | none */ scrollbar-color: #c1c1c1 transparent; } +/* WebKit Browsers: Chrome, Edge, Safari */ .webkit-ul::-webkit-scrollbar { width: 25px; + /* Adjust width as needed */ } .webkit-ul::-webkit-scrollbar-track { background: #f0f0f0; + /* Optional: add contrast to track */ border-radius: 10px; } @@ -837,6 +859,7 @@ background-color: #c1c1c1; border-radius: 10px; border: 6px solid transparent; + /* Adjust for padding inside thumb */ background-clip: content-box; transition: background-color 0.3s ease; } @@ -999,6 +1022,7 @@ gap: 1.7rem !important; overflow: scroll; height: 100%; + scrollbar-width: none; @media (max-width: 500px) { gap: 0.5rem !important; @@ -1088,12 +1112,21 @@ } .booked-text { + // color: #070; color: rgb(241, 16, 16); + font-weight: 600; cursor: not-allowed !important; margin-top: 4px; } +// .Available-text{ +// color: rgb(41, 201, 41); +// font-weight: 600; +// cursor: not-allowed !important; +// margin-top: 4px; +// } + .slot-btn.incart { background: #ffe066; color: #222; @@ -1322,7 +1355,7 @@ font-family: "Poppins"; font-size: 0.8rem; - > div:nth-child(1) { + >div:nth-child(1) { font-size: 0.8rem; font-weight: 600; } @@ -1631,6 +1664,7 @@ color: #ffffff; border-color: #f44336; cursor: not-allowed; + &:hover { color: #c90b0b; background-color: #ffff; @@ -1647,6 +1681,7 @@ background-color: #ffe8bf; color: #5f4204; border-color: #ff9800; + &:hover { background-color: #5f4204; color: #ffe8bf; @@ -1658,6 +1693,10 @@ color: #ffffff; border-color: #31a0f0; cursor: not-allowed; + // &:hover{ + // color:#148498; + // background-color: #fff; + // } } &.selected { @@ -2221,9 +2260,11 @@ cursor: pointer; height: 270px; width: 195px; + // background-color: #fff; border-radius: 0.75rem; display: flex; flex-direction: column; + // justify-content: space-between; margin-top: 10px; position: relative; border: 2px solid rgba(0, 0, 0, 0.3); @@ -2231,6 +2272,7 @@ .voiceToTextIcon { position: fixed; + // width: max-content; top: 7px; left: 10px; display: flex; @@ -2275,4 +2317,4 @@ top: 2px; left: 8px; } -} +} \ No newline at end of file