From 8124100aba8dedb8dbe348e6565c1024b8c2f301 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Feb 2026 17:18:55 +0530 Subject: [PATCH] add singlePc field --- .../BSBillingTable3/BSBillingTable3.jsx | 375 +++++------ .../BSCategories/BSCategoryHorizontal.jsx | 84 +-- .../BSCategories/BSCategoryVertical.jsx | 51 +- .../BSOtherServicesHorizontalcat.jsx | 43 +- .../BSOtherServicesVerticalcat.jsx | 33 +- .../Components/BSItemCards/BSItemCard.jsx | 1 + .../BSItemCards/BsBookingitemCard.jsx | 620 +++++++++--------- 7 files changed, 614 insertions(+), 593 deletions(-) diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3.jsx index fe58020..7a6de70 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable3/BSBillingTable3.jsx @@ -155,16 +155,16 @@ const BSBillingTable3 = () => { 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 [EditQuantity, setEditQuantity] = useState(false); const [Modaldata, setModaldata] = useState([]); @@ -1057,9 +1057,9 @@ const BSBillingTable3 = () => { )?.map((item, idx) => idx === 0 ? { - ...item, - FreeQty, - } + ...item, + FreeQty, + } : item ), }; @@ -1176,6 +1176,7 @@ const BSBillingTable3 = () => { CompleteRemove: true, InwardDtlId: isPaidproduct?.InwardDtlId, BuyInwardDtlId: null, + OrderRate: isPaidproduct?.OrderRate, Offer: 0, }); } else if (isPaidproduct?.OrderQty > item?.OrderQty) { @@ -1350,6 +1351,7 @@ const BSBillingTable3 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: null, Offer: item?.Offer, + OrderRate: item?.OrderRate, }); await ChangeFreeprodlistFn({ OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty, @@ -1429,6 +1431,7 @@ const BSBillingTable3 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: null, Offer: item?.Offer, + OrderRate: item?.OrderRate, }); await ChangeFreeprodlistFn({ OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty, @@ -1462,6 +1465,8 @@ const BSBillingTable3 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: null, Offer: item?.Offer, + OrderRate: item?.OrderRate, + }); await ChangeOfferAppliedProdsFn({ inwardDtlId: item?.InwardDtlId, @@ -1493,6 +1498,7 @@ const BSBillingTable3 = () => { InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId, BuyInwardDtlId: null, Offer: 0, + OrderRate: isPaidProductAvailableInCart?.OrderRate, }); } else if ( isPaidProductAvailableInCart?.OrderQty > item?.OrderQty @@ -1576,6 +1582,7 @@ const BSBillingTable3 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: null, Offer: item?.Offer, + OrderRate: item?.OrderRate, }); await ChangeFreeprodlistFn({ OverAllFreeQty: freeProdList?.OverAllFreeQty, @@ -1602,6 +1609,7 @@ const BSBillingTable3 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: null, Offer: item?.Offer, + OrderRate: item?.OrderRate, }); await ChangeFreeprodlistFn({ OverAllFreeQty: freeProdList?.OverAllFreeQty, @@ -1649,7 +1657,7 @@ const BSBillingTable3 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: null, Offer: item?.Offer, - OrderRate: item?.OrderRate, + OrderRate: item?.OrderRate }); } else { const isCheck = GlobalOfferAppliedProductsData?.find( @@ -1951,6 +1959,7 @@ const BSBillingTable3 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: item?.InwardDtlId, Offer: item?.Offer, + OrderRate: item?.OrderRate }); await ChangeFreeprodlistFn({ OverAllFreeQty: FreeProd?.OverAllFreeQty - item?.OrderQty, @@ -1969,6 +1978,8 @@ const BSBillingTable3 = () => { InwardDtlId: item?.InwardDtlId, BuyInwardDtlId: item?.InwardDtlId, Offer: item?.Offer, + OrderRate: item?.OrderRate, + }); await ChangeFreeprodlistFn({ OverAllFreeQty: item?.OrderQty, @@ -2394,11 +2405,10 @@ const BSBillingTable3 = () => { {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', @@ -2425,9 +2435,9 @@ const BSBillingTable3 = () => { 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' @@ -2483,7 +2493,7 @@ const BSBillingTable3 = () => { style={{ fontFamily: 'Poppins' }} onClick={() => item.FullProductIdentifierDtls?.length > 0 || - item.ProductIdentifierDtls?.length > 0 + item.ProductIdentifierDtls?.length > 0 ? handleImeiDetails(item) : editField && handleEditQuantity(item) } @@ -2530,21 +2540,21 @@ const BSBillingTable3 = () => { {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 + } +
+ )} )} @@ -2637,8 +2647,8 @@ const BSBillingTable3 = () => { > {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)} )} @@ -2673,11 +2683,10 @@ const BSBillingTable3 = () => { {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' @@ -2808,21 +2817,21 @@ const BSBillingTable3 = () => { {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 + } +
+ )} )} @@ -2915,8 +2924,8 @@ const BSBillingTable3 = () => { > {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)} )} @@ -2956,11 +2965,10 @@ const BSBillingTable3 = () => { OldtableDataTakeAway?.length + index } - className={`${ - BookingType === 'Dine In' && item?.SalesId - ? 'BSBill-Table3-content-Disabled' - : 'BSBill-Table3-content' - } + className={`${BookingType === 'Dine In' && item?.SalesId + ? 'BSBill-Table3-content-Disabled' + : 'BSBill-Table3-content' + } `} style={{ @@ -2971,38 +2979,38 @@ const BSBillingTable3 = () => { ? BookingType === 'Dine In' && item?.SalesId ? 'rgb(243, 248, 213)' : BookingType === 'Dine In' && - triggerAnimation && - OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index === - 0 && - !item?.SalesId && - tableDataTakeAway?.length >= PreviousdataLength + 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 + 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'] @@ -3011,15 +3019,15 @@ const BSBillingTable3 = () => { 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'] @@ -3028,9 +3036,9 @@ const BSBillingTable3 = () => { BillOrderPre === 'Y' && !BookingTypeBoth ? triggerAnimation && OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index === - 0 && + OldtableDataTakeAway?.length + + index === + 0 && !item?.SalesId && tableDataTakeAway?.length >= PreviousdataLength && !HoldOrderDtl && @@ -3079,7 +3087,7 @@ const BSBillingTable3 = () => { style={{ fontFamily: 'Poppins' }} onClick={() => item.FullProductIdentifierDtls?.length > 0 || - item.ProductIdentifierDtls?.length > 0 + item.ProductIdentifierDtls?.length > 0 ? handleImeiDetails(item) : editField && handleEditQuantity(item, index) } @@ -3133,21 +3141,21 @@ const BSBillingTable3 = () => { {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 + } +
+ )} )} @@ -3241,8 +3249,8 @@ const BSBillingTable3 = () => { > {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)} )} @@ -3282,11 +3290,10 @@ const BSBillingTable3 = () => { tableDataTakeAway?.length + index } - className={`${ - BookingType === 'Dine In' && item?.SalesId - ? 'BSBill-Table3-content-Disabled' - : 'BSBill-Table3-content' - } + className={`${BookingType === 'Dine In' && item?.SalesId + ? 'BSBill-Table3-content-Disabled' + : 'BSBill-Table3-content' + } `} style={{ @@ -3299,44 +3306,44 @@ const BSBillingTable3 = () => { !BookingTypeBoth ? 'rgb(243, 248, 213)' : BookingType === 'Dine In' && - triggerAnimation && - OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index === - 0 && - !item?.SalesId && - tableDataDinein?.length >= PreviousdataLength + 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 + 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'] @@ -3345,10 +3352,10 @@ const BSBillingTable3 = () => { BillOrderPre === 'Y' && !BookingTypeBoth ? triggerAnimation && OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index === - 0 && + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index === + 0 && !item?.SalesId && tableDataDinein?.length >= PreviousdataLength && !HoldOrderDtl && @@ -3444,21 +3451,21 @@ const BSBillingTable3 = () => { {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 + } +
+ )} )} @@ -3551,8 +3558,8 @@ const BSBillingTable3 = () => { > {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)} )} diff --git a/src/Pages/BookingScreen/Components/BSCategories/BSCategoryHorizontal.jsx b/src/Pages/BookingScreen/Components/BSCategories/BSCategoryHorizontal.jsx index 17c6ce2..29d0a7d 100644 --- a/src/Pages/BookingScreen/Components/BSCategories/BSCategoryHorizontal.jsx +++ b/src/Pages/BookingScreen/Components/BSCategories/BSCategoryHorizontal.jsx @@ -549,9 +549,9 @@ function BSCategoryHorizontal(props) { AppId: AppId, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; @@ -587,9 +587,9 @@ function BSCategoryHorizontal(props) { AppId: AppId, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; let res = await dispatch(getSelectedFavItems(data)).unwrap(); @@ -679,7 +679,7 @@ function BSCategoryHorizontal(props) { UomTypePreference?.some?.( (e) => e?.PreferredSubCatName?.toLowerCase() == - item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y' + item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y' ) ); @@ -794,7 +794,7 @@ function BSCategoryHorizontal(props) { var today = new Date(); var formattedDate = today.toISOString()?.split('T')[0]; - const onFinish = async (values) => { + const onFinish = async (values) => { const pattern = /(.+?) \(\d*[^\d]+\)/; const matches = selectedprod.match(pattern); @@ -819,12 +819,15 @@ function BSCategoryHorizontal(props) { postData['Size'] = values.Size; postData['MRP'] = values.MRP; postData['TaxId'] = values.TaxId; + postData['SinglePc'] = 'N'; if (EditState) { const updatedData = { ...EditState, Quantity: parseInt(values.Quantity), SellPrice: values.MRP, OtherProduct: 'Others', + SinglePc: 'N', + }; dispatch(changeothersdata(updatedData)); @@ -838,6 +841,7 @@ function BSCategoryHorizontal(props) { ...othersdata, Quantity: parseInt(values.Quantity), OtherProduct: 'Others', + SinglePc: 'N', }; dispatch(changeothersdata(updatedData)); @@ -1073,9 +1077,9 @@ function BSCategoryHorizontal(props) { backgroundColor: !accessOther && accessToCard ? lightenColor( - SelectedCatgColor?.['BackgroundColor'], - 0.4 - ) + SelectedCatgColor?.['BackgroundColor'], + 0.4 + ) : SelectedCatgColor?.['BackgroundColor'], padding: padding, border: accessToCard ? '1px solid' : undefined, @@ -1086,9 +1090,9 @@ function BSCategoryHorizontal(props) { : SelectedCatgColor?.['BackgroundColor'] === '#000000' ? '#ffffff' : darkenColor( - SelectedCatgColor?.['BackgroundColor'], - 70 - ) + SelectedCatgColor?.['BackgroundColor'], + 70 + ) : undefined, }} className="sampleCard" @@ -1122,9 +1126,9 @@ function BSCategoryHorizontal(props) { backgroundColor: !accessOther && !accessToCard && -2 == indexval ? lightenColor( - SelectedCatgColor?.['BackgroundColor'], - 0.4 - ) + SelectedCatgColor?.['BackgroundColor'], + 0.4 + ) : SelectedCatgColor?.['BackgroundColor'], padding: padding, border: @@ -1170,9 +1174,9 @@ function BSCategoryHorizontal(props) { ? index != indexval ? SelectedCatgColor?.['BackgroundColor'] : lightenColor( - SelectedCatgColor?.['BackgroundColor'], - 0.4 - ) + SelectedCatgColor?.['BackgroundColor'], + 0.4 + ) : SelectedCatgColor?.['BackgroundColor'], padding: padding, border: '1px solid', @@ -1264,11 +1268,11 @@ function BSCategoryHorizontal(props) { ? index !== indexval ? SelectedCatgColor?.['BackgroundColor'] : lightenColor( - SelectedCatgColor?.[ - 'BackgroundColor' - ], - 0.4 - ) + SelectedCatgColor?.[ + 'BackgroundColor' + ], + 0.4 + ) : SelectedCatgColor?.['BackgroundColor'], padding: padding, border: '1px solid', @@ -1276,18 +1280,18 @@ function BSCategoryHorizontal(props) { index !== indexval ? SelectedCatgColor?.['BackgroundColor'] : SelectedCatgColor?.['BackgroundColor'] === - '#ffffff' + '#ffffff' ? '#000000' : SelectedCatgColor?.[ - 'BackgroundColor' - ] === '#000000' + 'BackgroundColor' + ] === '#000000' ? '#ffffff' : darkenColor( - SelectedCatgColor?.[ - 'BackgroundColor' - ], - 70 - ), + SelectedCatgColor?.[ + 'BackgroundColor' + ], + 70 + ), userSelect: 'none', minWidth: 'max-content', // set a width if needed }} @@ -1342,16 +1346,16 @@ function BSCategoryHorizontal(props) { backgroundColor: !accessOther && accessToCard ? lightenColor( - SelectedCatgColor?.['BackgroundColor'], - 0.4 - ) + SelectedCatgColor?.['BackgroundColor'], + 0.4 + ) : SelectedCatgColor?.['BackgroundColor'], padding: padding, border: accessToCard && '1px solid', borderColor: accessToCard && - !accessOther && - SelectedCatgColor?.['BackgroundColor'] == '#ffffff' + !accessOther && + SelectedCatgColor?.['BackgroundColor'] == '#ffffff' ? '#000000' : SelectedCatgColor?.['BackgroundColor'] === '#000000' ? '#ffffff' @@ -1391,7 +1395,7 @@ function BSCategoryHorizontal(props) { border: accessOther && '1px solid', borderColor: accessOther && - SelectedCatgColor?.['BackgroundColor'] == '#ffffff' + SelectedCatgColor?.['BackgroundColor'] == '#ffffff' ? '#000000' : SelectedCatgColor?.['BackgroundColor'] === '#000000' ? '#ffffff' @@ -1942,7 +1946,7 @@ function BSCategoryHorizontal(props) { ? `${parts[0]}.${parts.slice(1).join('')}` : cleanedValue; }} - // disabled={!!EditState} + // disabled={!!EditState} /> diff --git a/src/Pages/BookingScreen/Components/BSCategories/BSCategoryVertical.jsx b/src/Pages/BookingScreen/Components/BSCategories/BSCategoryVertical.jsx index eb6a953..355079d 100644 --- a/src/Pages/BookingScreen/Components/BSCategories/BSCategoryVertical.jsx +++ b/src/Pages/BookingScreen/Components/BSCategories/BSCategoryVertical.jsx @@ -414,9 +414,9 @@ function BSCategoryVertical(props) { AppId: AppId, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; await dispatch(getSelectedFavItems(data1)); @@ -445,9 +445,9 @@ function BSCategoryVertical(props) { AppId: AppId, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; let res = await dispatch(getSelectedFavItems(data)).unwrap(); @@ -534,7 +534,7 @@ function BSCategoryVertical(props) { UomTypePreference?.some?.( (e) => e?.PreferredSubCatName?.toLowerCase() == - item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y' + item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y' ) ); @@ -674,12 +674,14 @@ function BSCategoryVertical(props) { postData['Size'] = values.Size; postData['MRP'] = values.MRP; postData['TaxId'] = values.TaxId; + postData['SinglePc'] = 'N'; if (EditState) { const updatedData = { ...EditState, Quantity: parseInt(values.Quantity), SellPrice: values.MRP, OtherProduct: 'Others', + SinglePc: 'N', }; dispatch(changeothersdata(updatedData)); setEditState(); @@ -692,6 +694,7 @@ function BSCategoryVertical(props) { ...othersdata, Quantity: parseInt(values.Quantity), OtherProduct: 'Others', + SinglePc: 'N', }; dispatch(changeothersdata(updatedData)); @@ -1198,7 +1201,7 @@ function BSCategoryVertical(props) { }) } isOnChange={EditState ? true : false} - // disabled={!!EditState} + // disabled={!!EditState} /> @@ -1300,8 +1303,8 @@ function BSCategoryVertical(props) { border: accessToCard && '1px solid', borderColor: accessToCard && - !accessOther && - SelectedCatgColor?.['BackgroundColor'] == '#ffffff' + !accessOther && + SelectedCatgColor?.['BackgroundColor'] == '#ffffff' ? '#000000' : SelectedCatgColor?.['BackgroundColor'] === '#000000' ? '#ffffff' @@ -1383,9 +1386,9 @@ function BSCategoryVertical(props) { ? index != indexval ? SelectedCatgColor?.['BackgroundColor'] : lightenColor( - SelectedCatgColor?.['BackgroundColor'], - 0.4 - ) + SelectedCatgColor?.['BackgroundColor'], + 0.4 + ) : SelectedCatgColor?.['BackgroundColor'], padding: padding, border: '1px solid', @@ -1471,9 +1474,9 @@ function BSCategoryVertical(props) { ? index != indexval ? SelectedCatgColor?.['BackgroundColor'] : lightenColor( - SelectedCatgColor?.['BackgroundColor'], - 0.4 - ) + SelectedCatgColor?.['BackgroundColor'], + 0.4 + ) : SelectedCatgColor?.['BackgroundColor'], padding: padding, border: '1px solid', @@ -1481,15 +1484,15 @@ function BSCategoryVertical(props) { index != indexval ? SelectedCatgColor?.['BackgroundColor'] : SelectedCatgColor?.['BackgroundColor'] === - '#ffffff' + '#ffffff' ? '#000000' : SelectedCatgColor?.['BackgroundColor'] === - '#000000' + '#000000' ? '#ffffff' : darkenColor( - SelectedCatgColor?.['BackgroundColor'], - 70 - ), + SelectedCatgColor?.['BackgroundColor'], + 70 + ), }} className="sampleCard" onClick={(e) => handleClick(e, item.ProdCat, index)} @@ -1547,8 +1550,8 @@ function BSCategoryVertical(props) { border: accessToCard && '1px solid', borderColor: accessToCard && - !accessOther && - SelectedCatgColor?.['BackgroundColor'] == '#ffffff' + !accessOther && + SelectedCatgColor?.['BackgroundColor'] == '#ffffff' ? '#000000' : SelectedCatgColor?.['BackgroundColor'] === '#000000' ? '#ffffff' @@ -1591,7 +1594,7 @@ function BSCategoryVertical(props) { border: accessOther && '1px solid', borderColor: accessOther && - SelectedCatgColor?.['BackgroundColor'] == '#ffffff' + SelectedCatgColor?.['BackgroundColor'] == '#ffffff' ? '#000000' : SelectedCatgColor?.['BackgroundColor'] === '#000000' ? '#ffffff' diff --git a/src/Pages/BookingScreen/Components/BSCategories/BSOtherServicesHorizontalcat.jsx b/src/Pages/BookingScreen/Components/BSCategories/BSOtherServicesHorizontalcat.jsx index 448fad0..6d84c9e 100644 --- a/src/Pages/BookingScreen/Components/BSCategories/BSOtherServicesHorizontalcat.jsx +++ b/src/Pages/BookingScreen/Components/BSCategories/BSOtherServicesHorizontalcat.jsx @@ -534,7 +534,7 @@ function BSOtherServicesHorizontalcat(props) { const response = await dispatch(getUomData()).unwrap(); - + const UomTypePreference = ApplicationPreferenceData?.find( (preference) => preference?.PreferredCatName === 'Product Uom' )?.PreferenceCatDetails; @@ -542,7 +542,7 @@ function BSOtherServicesHorizontalcat(props) { UomTypePreference?.some?.( (e) => e?.PreferredSubCatName?.toLowerCase() == - item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y' + item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y' ) ); @@ -684,12 +684,14 @@ function BSOtherServicesHorizontalcat(props) { postData['Size'] = values.Size; postData['MRP'] = values.MRP; postData['TaxId'] = values.TaxId; + postData['SinglePc'] = 'N'; if (EditState) { const updatedData = { ...EditState, Quantity: parseInt(values.Quantity), SellPrice: values.MRP, OtherProduct: 'Others', + SinglePc: 'N', }; dispatch(changeothersdata(updatedData)); @@ -703,6 +705,7 @@ function BSOtherServicesHorizontalcat(props) { ...othersdata, Quantity: parseInt(values.Quantity), OtherProduct: 'Others', + SinglePc: 'N', }; dispatch(changeothersdata(updatedData)); @@ -720,7 +723,7 @@ function BSOtherServicesHorizontalcat(props) { handleCancel(); formRef?.current?.resetFields(); - resetForm(); + resetForm(); }; const handleValuesChange = (values) => { @@ -1135,7 +1138,7 @@ function BSOtherServicesHorizontalcat(props) { /> - +
@@ -1415,9 +1418,9 @@ function BSOtherServicesHorizontalcat(props) { ? index != indexval ? SelectedCatgColor?.['BackgroundColor'] : lightenColor( - SelectedCatgColor?.['BackgroundColor'], - 0.4 - ) + SelectedCatgColor?.['BackgroundColor'], + 0.4 + ) : SelectedCatgColor?.['BackgroundColor'], padding: padding, border: '1px solid', @@ -1507,9 +1510,9 @@ function BSOtherServicesHorizontalcat(props) { ? index !== indexval ? SelectedCatgColor?.['BackgroundColor'] : lightenColor( - SelectedCatgColor?.['BackgroundColor'], - 0.4 - ) + SelectedCatgColor?.['BackgroundColor'], + 0.4 + ) : SelectedCatgColor?.['BackgroundColor'], padding: padding, border: '1px solid', @@ -1517,17 +1520,17 @@ function BSOtherServicesHorizontalcat(props) { index !== indexval ? SelectedCatgColor?.['BackgroundColor'] : SelectedCatgColor?.['BackgroundColor'] === - '#ffffff' + '#ffffff' ? '#000000' : SelectedCatgColor?.['BackgroundColor'] === - '#000000' + '#000000' ? '#ffffff' : darkenColor( - SelectedCatgColor?.[ - 'BackgroundColor' - ], - 70 - ), + SelectedCatgColor?.[ + 'BackgroundColor' + ], + 70 + ), userSelect: 'none', minWidth: 'max-content', // set a width if needed }} @@ -1586,8 +1589,8 @@ function BSOtherServicesHorizontalcat(props) { border: accessToCard && '1px solid', borderColor: accessToCard && - !accessOther && - SelectedCatgColor?.['BackgroundColor'] == '#ffffff' + !accessOther && + SelectedCatgColor?.['BackgroundColor'] == '#ffffff' ? '#000000' : SelectedCatgColor?.['BackgroundColor'] === '#000000' ? '#ffffff' diff --git a/src/Pages/BookingScreen/Components/BSCategories/BSOtherServicesVerticalcat.jsx b/src/Pages/BookingScreen/Components/BSCategories/BSOtherServicesVerticalcat.jsx index f7e29d4..ec35ba4 100644 --- a/src/Pages/BookingScreen/Components/BSCategories/BSOtherServicesVerticalcat.jsx +++ b/src/Pages/BookingScreen/Components/BSCategories/BSOtherServicesVerticalcat.jsx @@ -445,7 +445,7 @@ function BSOtherServicesVerticalcat(props) { UomTypePreference?.some?.( (e) => e?.PreferredSubCatName?.toLowerCase() == - item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y' + item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y' ) ); @@ -585,12 +585,14 @@ function BSOtherServicesVerticalcat(props) { postData['Size'] = values.Size; postData['MRP'] = values.MRP; postData['TaxId'] = values.TaxId; + postData['SinglePc'] = 'N'; if (EditState) { const updatedData = { ...EditState, Quantity: parseInt(values.Quantity), SellPrice: values.MRP, OtherProduct: 'Others', + SinglePc: 'N', }; dispatch(changeothersdata(updatedData)); setEditState(); @@ -603,6 +605,7 @@ function BSOtherServicesVerticalcat(props) { ...othersdata, Quantity: parseInt(values.Quantity), OtherProduct: 'Others', + SinglePc: 'N', }; dispatch(changeothersdata(updatedData)); @@ -1123,7 +1126,7 @@ function BSOtherServicesVerticalcat(props) { }) } isOnChange={EditState ? true : false} - // disabled={!!EditState} + // disabled={!!EditState} /> @@ -1219,7 +1222,7 @@ function BSOtherServicesVerticalcat(props) { pointerEvents: OrderType === 'Failed' ? 'none' : 'auto', }} > - + {(!Isdragging || draggingComponent !== 'category') && otherServiceCategoryData?.map((item, index) => (
handleClick(e, item.ProdCat, index)} @@ -1383,7 +1386,7 @@ function BSOtherServicesVerticalcat(props) { )} -
+ ); } diff --git a/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx b/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx index 7740cbe..17c4dfd 100644 --- a/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx +++ b/src/Pages/BookingScreen/Components/BSItemCards/BSItemCard.jsx @@ -1296,6 +1296,7 @@ const BSItemCard = (props) => { OtherProduct: otherscarddata?.OtherProduct, // 'ProdVariantName': otherscarddata?.ProdVariantName, BookingTypeName: BookingType, + SinglePc: otherscarddata?.SinglePc, CounterName: '', //sri }; AddOrderDetails(data); diff --git a/src/Pages/BookingScreen/Components/BSItemCards/BsBookingitemCard.jsx b/src/Pages/BookingScreen/Components/BSItemCards/BsBookingitemCard.jsx index 1285b7f..3f4c2bd 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(); @@ -1365,6 +1365,7 @@ const BsBookingitemCard = (props) => { OtherProduct: otherscarddata?.OtherProduct, // 'ProdVariantName': otherscarddata?.ProdVariantName, BookingTypeName: BookingType, + SinglePc: otherscarddata?.SinglePc, CounterName: '', //sri }; AddOrderDetails(data); @@ -1479,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 ); @@ -1493,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 ); @@ -1590,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 ); @@ -1605,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 ); @@ -1755,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 ); @@ -1771,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 ); @@ -1854,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 ); @@ -1870,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 ); @@ -2309,7 +2310,7 @@ const BsBookingitemCard = (props) => { parseInt(totalSelectedProductQty || 0) + parseInt(reorderComboConsumed || 0); } - } catch (_) {} + } catch (_) { } let getCurrentProdDtl = orderDetails?.filter( (a) => a?.ProdName === ProdName ); @@ -2510,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 ( @@ -2546,7 +2547,7 @@ const BsBookingitemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) {} + } catch (_) { } let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( parseInt(ItemQuantity) > @@ -2632,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 ( @@ -2671,7 +2672,7 @@ const BsBookingitemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) {} + } catch (_) { } let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( parseInt(ItemQuantity) > @@ -2763,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 ); @@ -2806,7 +2807,7 @@ const BsBookingitemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) {} + } catch (_) { } let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( @@ -2890,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 ); @@ -2937,7 +2938,7 @@ const BsBookingitemCard = (props) => { }, 0); totalOrderQty = parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0); - } catch (_) {} + } catch (_) { } let OverallProdQty = totalOrderQty - totalSelectedProductQty; if ( @@ -2976,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 && @@ -3001,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' } } @@ -3031,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' } } @@ -3061,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' } } @@ -3315,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: @@ -3632,9 +3633,9 @@ const BsBookingitemCard = (props) => { AppId, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; @@ -3666,9 +3667,9 @@ const BsBookingitemCard = (props) => { prodCat: ProdCat, ...(AvailableDate && selectedDate ? { - fromDate: selectedDate?.[0], - toDate: selectedDate?.[1], - } + fromDate: selectedDate?.[0], + toDate: selectedDate?.[1], + } : {}), }; @@ -4494,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'; @@ -4530,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) => { @@ -4593,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' : '', }} @@ -4706,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: @@ -4760,39 +4761,39 @@ const BsBookingitemCard = (props) => { > {(cardFunction?.BigImage || cardFunction?.SmallImage) && ( - - )} + : defaultimage + } + alt="" + /> + )}
{ cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), position: !cardFunction?.BigImage @@ -4826,7 +4827,7 @@ const BsBookingitemCard = (props) => { height: cardFunction?.SmallImage ? '5.5rem' : !cardFunction?.BigImage && - '5.5rem', + '5.5rem', alignItems: !cardFunction?.BigImage && !cardFunction?.SmallImage && @@ -4849,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 && @@ -4874,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', @@ -4892,8 +4893,8 @@ const BsBookingitemCard = (props) => { : '', color: SelectedCardColor ? SelectedCardColor?.[ - 'FontColor' - ] + 'FontColor' + ] : '', }} > @@ -4979,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: @@ -5028,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) && ( - - )} + : defaultimage + } + alt="" + /> + )}

{ cardFunction?.Background && (SelectedCardColor ? SelectedCardColor?.[ - 'BackgroundColor' - ] + 'BackgroundColor' + ] : ''), position: !cardFunction?.BigImage @@ -5098,7 +5099,7 @@ const BsBookingitemCard = (props) => { height: cardFunction?.SmallImage ? '5.5rem' : !cardFunction?.BigImage && - '4.5rem', + '4.5rem', alignItems: !cardFunction?.BigImage && !cardFunction?.SmallImage && @@ -5118,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 && @@ -5158,7 +5159,7 @@ const BsBookingitemCard = (props) => { fontSize: !cardFunction?.SmallImage ? cardFunction?.BigImage && - '12px' + '12px' : '12px', textAlign: 'center', lineHeight: '2', @@ -5167,8 +5168,8 @@ const BsBookingitemCard = (props) => { : '', color: SelectedCardColor ? SelectedCardColor?.[ - 'FontColor' - ] + 'FontColor' + ] : '', }} > @@ -5267,7 +5268,7 @@ const BsBookingitemCard = (props) => { height={60} src={ item?.ProductDetail?.[0]?.ProdLogo === - '' + '' ? defaultimage : item?.ProductDetail?.[0]?.ProdLogo ? item?.ProductDetail?.[0]?.ProdLogo @@ -5284,15 +5285,15 @@ const BsBookingitemCard = (props) => {
{item?.ProductDetail?.[0]?.ProdVariantDetails ?.length > 0 && ( -
-
- ₹ {ItemSellingPrice(item)} +
+
+ ₹ {ItemSellingPrice(item)} +
+
+ {ItemSize(item)} {ItemUomName(item)} +
-
- {ItemSize(item)} {ItemUomName(item)} -
-
- )} + )}
{/* Stock Count Badge */} @@ -5992,30 +5993,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 = @@ -6023,25 +6024,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) ); }); @@ -6054,13 +6055,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 || @@ -6073,26 +6074,25 @@ const BsBookingitemCard = (props) => { return (
{ @@ -6111,7 +6111,7 @@ const BsBookingitemCard = (props) => { timeSlot, product, onePeiceFlow || - isPartiallyBooked, + isPartiallyBooked, !slotEnded ); } @@ -6129,7 +6129,7 @@ const BsBookingitemCard = (props) => {
₹ {onePeiceFlow || - isPartiallyBooked + isPartiallyBooked ? timeSlot?.OnePcsPrice : timeSlot?.SellPrice || 0}
@@ -6155,15 +6155,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 +6227,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 +6413,7 @@ const BsBookingitemCard = (props) => { {customer.CustMobile || 'N/A'} {customer?.CustBookDetails?.length > - 1 ? ( + 1 ? ( ) : customer?.CustBookDetails - ?.length === 1 ? ( + ?.length === 1 ? ( <>