diff --git a/src/Components/Skeleton/BillingTableSkeleton.jsx b/src/Components/Skeleton/BillingTableSkeleton.jsx new file mode 100644 index 0000000..d25fa46 --- /dev/null +++ b/src/Components/Skeleton/BillingTableSkeleton.jsx @@ -0,0 +1,53 @@ +import React from 'react'; +import './BillingTableSkeleton.scss'; + +const BillingTableSkeleton = () => { + return ( +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+ ); +}; + +export default BillingTableSkeleton; diff --git a/src/Components/Skeleton/BillingTableSkeleton.scss b/src/Components/Skeleton/BillingTableSkeleton.scss new file mode 100644 index 0000000..7d932c8 --- /dev/null +++ b/src/Components/Skeleton/BillingTableSkeleton.scss @@ -0,0 +1,58 @@ +@keyframes shimmer { + 0% { + background-position: -500px 0; + } + 100% { + background-position: 500px 0; + } +} + +.skeleton { + background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 37%, #e0e0e0 63%); + background-size: 1000px 100%; + animation: shimmer 1.4s infinite; + border-radius: 4px; +} + +.billing-skeleton { + background: #fff; + max-width: 420px; + border-radius: 8px; + overflow: hidden; +} + +.billing-header { + display: grid; + grid-template-columns: 40px 1fr 50px 60px 30px; + gap: 8px; + padding: 10px; + background: #dde3e6; +} + +.billing-row { + display: grid; + grid-template-columns: 40px 1fr 50px 60px 30px; + gap: 8px; + padding: 10px; +} + +.billing-bottom { + display: flex; + gap: 10px; + padding: 10px; + border-top: 1px solid #ddd; +} + +.billing-left, +.billing-right { + flex: 1; +} + +.billing-box { + height: 36px; + margin-bottom: 10px; +} + +.billing-total { + height: 48px; +} diff --git a/src/Components/Skeleton/CardSkeleton.jsx b/src/Components/Skeleton/CardSkeleton.jsx new file mode 100644 index 0000000..defc91d --- /dev/null +++ b/src/Components/Skeleton/CardSkeleton.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import './CardSkeleton.scss'; +import NavbarSkeleton from './NavbarSkeleton'; + +const CardSkeleton = ({ count = 15 }) => { + return ( + <> +
+ +
+
+ {Array.from({ length: count }).map((_, index) => ( +
+
+
+
+
+
+
+ ))} +
+ + ); +}; + +export default CardSkeleton; diff --git a/src/Components/Skeleton/CardSkeleton.scss b/src/Components/Skeleton/CardSkeleton.scss new file mode 100644 index 0000000..33bf360 --- /dev/null +++ b/src/Components/Skeleton/CardSkeleton.scss @@ -0,0 +1,49 @@ +@keyframes shimmer { + 0% { + background-position: -500px 0; + } + 100% { + background-position: 500px 0; + } +} + +.skeleton { + background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 37%, #e0e0e0 63%); + background-size: 1000px 100%; + animation: shimmer 1.4s infinite; + border-radius: 6px; +} + +.card-skeleton-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); + gap: 14px; + margin-top: 1rem; + width: 70%; +} + +.card-skeleton { + background: #fff; + padding: 10px; + border-radius: 8px; + display: flex; + gap: 5px; + justify-content: space-between; + align-items: center; +} + +.cardimg { + width: 50%; + height: 50px; +} + +.card-title { + height: 14px; + width: 60%; + margin-bottom: 8px; +} + +.card-price { + height: 14px; + width: 90%; +} diff --git a/src/Components/Skeleton/NavbarSkeleton.jsx b/src/Components/Skeleton/NavbarSkeleton.jsx new file mode 100644 index 0000000..cdbce0f --- /dev/null +++ b/src/Components/Skeleton/NavbarSkeleton.jsx @@ -0,0 +1,45 @@ +import React from 'react'; +import './NavbarSkeleton.scss'; + +const NavbarSkeleton = () => { + return ( +
+ + {/* LEFT */} +
+
+
+
+
+
+
+ + {/* CENTER SEARCH */} +
+ + {/* ICON GROUP 1 */} +
+
+
+
+
+
+ + {/* SMALL BOX */} +
+ + {/* ICON GROUP 2 */} +
+
+
+
+
+
+ + {/* PROFILE */} +
+
+ ); +}; + +export default NavbarSkeleton; \ No newline at end of file diff --git a/src/Components/Skeleton/NavbarSkeleton.scss b/src/Components/Skeleton/NavbarSkeleton.scss new file mode 100644 index 0000000..5faac41 --- /dev/null +++ b/src/Components/Skeleton/NavbarSkeleton.scss @@ -0,0 +1,85 @@ +@keyframes shimmer { + 0% { background-position: -500px 0; } + 100% { background-position: 500px 0; } +} + +.skeleton { + background: linear-gradient( + 90deg, + #e0e0e0 25%, + #f0f0f0 37%, + #e0e0e0 63% + ); + background-size: 1000px 100%; + animation: shimmer 1.4s infinite; + border-radius: 6px; +} + +/* NAVBAR */ +.navbar-skeleton { + display: flex; + align-items: center; + gap: 16px; + padding: 10px 16px; + background: #fff; + border-bottom: 1px solid #ddd; +} + +/* LEFT */ +.nav-left { + display: flex; + align-items: center; + gap: 10px; +} + +.navbar-logo { + width: 36px; + height: 36px; +} + +.nav-title-group { + display: flex; + flex-direction: column; + gap: 6px; +} + +.navbar-title { + width: 120px; + height: 14px; +} + +.navbar-subtitle { + width: 160px; + height: 10px; +} + +/* SEARCH */ +.navbar-search { + flex: 1; + height: 34px; +} + +/* ICON GROUP */ +.nav-icons { + display: flex; + gap: 10px; +} + +.navbar-icon { + width: 32px; + height: 32px; + border-radius: 50% !important; +} + +/* SMALL RECT BOX */ +.navbar-time { + width: 90px; + height: 28px; +} + +/* PROFILE */ +.navbar-profile { + width: 36px; + height: 36px; + border-radius: 8px; +} \ No newline at end of file diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBTOverall1.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBTOverall1.jsx index 429e834..01133ec 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBTOverall1.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBTOverall1.jsx @@ -16,6 +16,7 @@ import { isMobile } from 'react-device-detect'; import { getTemplateData } from '../../../../../Features/ThemeChange/ThemeChange.js'; import PozoCartIcon from '../../../../../Pages/BookingScreen/Components/UtillComponents/PozoCartIcon.jsx'; import TooltipWrapper from '../../../../../Components/Tooltip/Tooltip'; +import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx'; // jsx File const BSBillingTable1 = lazy( () => import('../BSBillingTable1/BSBillingTable1.jsx') @@ -128,7 +129,7 @@ export default function BSBTOverall1() { }, [width]); return ( - Loading…}> + }> <>
import('../../UtillComponents/CustomerPriceHistory.jsx') ); // Scss File import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBillingTable1.scss'; +import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx'; const BSBillingTable1 = () => { const { removeExtraCharge } = useUtilsComponent(); @@ -2017,7 +2018,7 @@ const BSBillingTable1 = () => { }; return ( - Loading…
}> + }> <>
diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BSBillingTable2.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BSBillingTable2.jsx index 5778907..cb58bf2 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BSBillingTable2.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable2/BSBillingTable2.jsx @@ -220,6 +220,7 @@ const OtherServicePrintStyle1 = lazy( import('../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx') ); import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx'; +import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx'; const BSOtherServiceClaim = lazy( () => import('../../UtillComponents/BSOtherServiceClaim.jsx') ); @@ -3658,7 +3659,7 @@ const BSBillingTable2 = () => { ); }; return ( - Loading…
}> + }>
import('../../UtillComponents/CustomerPriceHistory.jsx') ); @@ -2174,7 +2175,7 @@ const BSBillingTable4 = () => { }; return ( - Loading...
}> + }>
@@ -3605,7 +3606,7 @@ const BSBillingTable5 = () => { }; return ( <> - Loading…
}> + }>
import('../BSEditTotalAmount/BSEditTotalAmt.jsx') ); @@ -1986,7 +1987,7 @@ const BSBillingTable6 = () => { }; return ( - Loading...
}> + }>
import('../../UtillComponents/CustomerPriceHistory.jsx') ); import { useUtilsComponent } from '../../../../../Services/utils.js'; +import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx'; const BSBillingTable7 = () => { const { removeExtraCharge } = useUtilsComponent(); @@ -1894,7 +1895,7 @@ const BSBillingTable7 = () => { }; return ( - Loading...
}> + }> <>
{ const { removeExtraCharge } = useUtilsComponent(); @@ -2106,233 +2107,248 @@ const StandardTable = () => { const isAndroid = /Android/i.test(navigator.userAgent); return ( -
+ }>
-
-
-
Shopping Cart
-

{OrderCardDetail?.length} items

-
-
-
- {window.innerWidth <= 768 ? ( - mobileTableVisible ? ( - <> - Close - +
+
+
+
Shopping Cart
+

{OrderCardDetail?.length} items

+
+
+
+ {window.innerWidth <= 768 ? ( + mobileTableVisible ? ( + <> + Close + + ) : ( + <> + Show + + ) ) : ( <> Show - ) - ) : ( - <> - Show - - )} + )} +
-
- - - - {tableOptions?.map((item) => ( - <> - {item.OptionName == 'Sl.No' && BookingTypeBoth && ( - - )} - {item.OptionName == 'Sl.No' && ( - - )} - {item.OptionName == 'Item' && ( - - )} - {item.OptionName == 'MRP' && ( - - )} - {item.OptionName == 'Discount' && ( - - )} - {item.OptionName == 'Quantity' && ( - - )} - {item.OptionName == 'Rate' && ( - - )} - {item.OptionName == 'Amount' && ( - - )} +
- {!isMobile ? ( - {''} - ) : ( -
{''}
- )} -
- {!isMobile ? ( - Sl.No - ) : ( -
- Sl.No -
- )} -
- {!isMobile ? ( - Item - ) : ( -
Item
- )} -
- {!isMobile ? ( - MRP - ) : ( -
MRP
- )} -
- {!isMobile ? ( - ₹/% - ) : ( -
₹/%
- )} -
0 ? OpenEditTotalAmount : ""} - onClick={() => { - if (OrderCardDetail?.length > 0) { - OpenEditTotalAmount(); - } - }} - > - {!isMobile ? ( - Qty - ) : ( -
Qty
- )} -
- {!isMobile ? ( - Rt - ) : ( -
Rt
- )} -
- {!isMobile ? ( - Amt - ) : ( -
Amt
- )} -
+ + + {tableOptions?.map((item) => ( + <> + {item.OptionName == 'Sl.No' && BookingTypeBoth && ( + + )} + {item.OptionName == 'Sl.No' && ( + + )} + {item.OptionName == 'Item' && ( + + )} + {item.OptionName == 'MRP' && ( + + )} + {item.OptionName == 'Discount' && ( + + )} + {item.OptionName == 'Quantity' && ( + + )} + {item.OptionName == 'Rate' && ( + + )} + {item.OptionName == 'Amount' && ( + + )} - {item.OptionName == 'Delete' && ( - - )} - - ))} - - + )} + + )} + + ))} + + - {/* For Reorder TakeWay */} - {OldtableDataTakeAway?.length > 0 && ( - - {OldtableDataTakeAway?.map((item, index) => ( - 0 && ( + + {OldtableDataTakeAway?.map((item, index) => ( + = PreviousdataLength - ? 'wheat' + backgroundColor: + BillOrderPre === 'Y' + ? item?.SalesId && OrderType !== 'Hold' + ? 'rgb(243, 248, 213)' : triggerAnimation && index === 0 && + !item?.SalesId && tableDataTakeAway?.length >= - PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + PreviousdataLength ? 'wheat' - : 'inherit' - : 'none', - background: - item?.SalesId && OrderType !== 'Hold' - ? 'rgb(243, 248, 213)' - : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + ' ' + item?.BookingTypeName - ) - ? '#b2d1f7' - : index % 2 === 0 - ? 'white' - : SelectedBillColor?.['OverallBackgroundColor'] - ? SelectedBillColor?.['OverallBackgroundColor'] - : '#d6d6d6', - animation: - BillOrderPre === 'Y' && !BookingTypeBoth - ? triggerAnimation && - index === 0 && - !item?.SalesId && - tableDataTakeAway?.length >= PreviousdataLength && - !HoldOrderDtl && - !UnpaidData - ? 'splashAnimation 0.5s ease-in-out' - : 'none' - : 'none', - }} - > - {tableOptions?.map((tableitem) => ( - <> - {BookingTypeBoth && - index == 0 && - tableitem.OptionName == 'Sl.No' && ( - - )} - - {tableitem.OptionName == 'Sl.No' && ( - - )} - {tableitem.OptionName == 'Item' && ( - <> - - - )} - {tableitem.OptionName == 'MRP' && ( - - )} - {tableitem.OptionName == 'Discount' && ( - - )} - {tableitem.OptionName == 'Quantity' && ( - - )} - {tableitem.OptionName == 'Rate' && ( - - )} - {tableitem.OptionName == 'Amount' && ( - - )} - {tableitem.OptionName == 'Delete' && ( - - )} - - ))} - - ))} - - {!sportsAppPreference && - EditQuantity && - OldtableDataTakeAway?.length > 0 && ( - - )} - - )} - - {/* Reorder DineIn */} - {OldtableDataDinein?.length > 0 && ( - - {OldtableDataDinein?.map((item, index) => ( - = + PreviousdataLength && + !HoldOrderDtl && + !UnpaidData + ? 'wheat' + : 'inherit' + : 'none', + background: + item?.SalesId && OrderType !== 'Hold' ? '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 - ? 'wheat' - : 'inherit' - : 'none', - background: item?.SalesId - ? 'rgb(243, 248, 213)' - : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + ' ' + item?.BookingTypeName - ) - ? '#b2d1f7' - : (OldtableDataTakeAway?.length + index) % 2 === 0 - ? 'white' - : SelectedBillColor?.['OverallBackgroundColor'] - ? SelectedBillColor?.['OverallBackgroundColor'] - : '#d6d6d6', - animation: - BillOrderPre === 'Y' && !BookingTypeBoth - ? triggerAnimation && - OldtableDataTakeAway?.length + index === 0 && - !item?.SalesId && - tableDataDinein?.length >= PreviousdataLength && - !HoldOrderDtl && - !UnpaidData - ? 'splashAnimation 0.5s ease-in-out' - : 'none' - : 'none', - }} - > - {tableOptions?.map((tableitem) => ( - <> - {BookingTypeBoth && - index == 0 && - tableitem.OptionName == 'Sl.No' && ( - - )} + : GlobEstBooking === 'ParEst' && + GlobProdwisedata?.includes( + item?.InwardDtlId + + ' ' + + item?.BookingTypeName + ) + ? '#b2d1f7' + : index % 2 === 0 + ? 'white' + : SelectedBillColor?.['OverallBackgroundColor'] + ? SelectedBillColor?.[ + 'OverallBackgroundColor' + ] + : '#d6d6d6', + animation: + BillOrderPre === 'Y' && !BookingTypeBoth + ? triggerAnimation && + index === 0 && + !item?.SalesId && + tableDataTakeAway?.length >= PreviousdataLength && + !HoldOrderDtl && + !UnpaidData + ? 'splashAnimation 0.5s ease-in-out' + : 'none' + : 'none', + }} + > + {tableOptions?.map((tableitem) => ( + <> + {BookingTypeBoth && + index == 0 && + tableitem.OptionName == 'Sl.No' && ( + + )} - {tableitem.OptionName == 'Sl.No' && ( - - )} - {tableitem.OptionName == 'Item' && ( - <> + {tableitem.OptionName == 'Sl.No' && ( + + )} + {tableitem.OptionName == 'MRP' && ( + + )} + {tableitem.OptionName == 'Discount' && ( + + )} + {tableitem.OptionName == 'Quantity' && ( + + )} + {tableitem.OptionName == 'Rate' && ( + + )} + {tableitem.OptionName == 'Amount' && ( + - - )} - {tableitem.OptionName == 'MRP' && ( - - )} - {tableitem.OptionName == 'Discount' && ( - - )} - {tableitem.OptionName == 'Quantity' && ( - - )} - {tableitem.OptionName == 'Rate' && ( - - )} - {tableitem.OptionName == 'Amount' && ( - - )} + )} + {tableitem.OptionName == 'Delete' && ( + + )} + + ))} + + ))} - {tableitem.OptionName == 'Delete' && ( - - )} - - ))} - - ))} + {!sportsAppPreference && + EditQuantity && + OldtableDataTakeAway?.length > 0 && ( + + )} + + )} - {!sportsAppPreference && - OldtableDataDinein?.length > 0 && - EditQuantity && ( - - )} - - )} - {/* TakeWay */} - - {tableDataTakeAway?.length > 0 && ( - - {tableDataTakeAway?.map((item, index) => ( - 0 && ( + + {OldtableDataDinein?.map((item, index) => ( + = PreviousdataLength - ? 'wheat' - : BookingType !== 'Dine In' && + style={{ + fontFamily: + "'Inter', ui-sans-serif, system-ui, sans-serif", + + backgroundColor: + BillOrderPre === 'Y' + ? item?.SalesId + ? 'rgb(243, 248, 213)' + : BookingType === 'Dine In' && triggerAnimation && - OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index === - 0 && - tableDataTakeAway?.length >= - PreviousdataLength && - !HoldOrderDtl && - !UnpaidData + OldtableDataTakeAway?.length + index === 0 && + !item?.SalesId && + tableDataDinein?.length >= PreviousdataLength ? 'wheat' - : (OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index) % - 2 === - 0 - ? 'white' - : SelectedBillColor?.[ - 'OverallBackgroundColor' - ] - ? SelectedBillColor?.[ - 'OverallBackgroundColor' - ] - : '#d6d6d6' - : (OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index) % - 2 === - 0 - ? 'white' - : SelectedBillColor?.['OverallBackgroundColor'] - ? SelectedBillColor?.['OverallBackgroundColor'] - : '#d6d6d6', - background: - BookingType === 'Dine In' && item?.SalesId + : 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 ) ? '#b2d1f7' + : (OldtableDataTakeAway?.length + index) % 2 === 0 + ? 'white' + : SelectedBillColor?.['OverallBackgroundColor'] + ? SelectedBillColor?.['OverallBackgroundColor'] + : '#d6d6d6', + animation: + BillOrderPre === 'Y' && !BookingTypeBoth + ? triggerAnimation && + OldtableDataTakeAway?.length + index === 0 && + !item?.SalesId && + tableDataDinein?.length >= PreviousdataLength && + !HoldOrderDtl && + !UnpaidData + ? 'splashAnimation 0.5s ease-in-out' + : 'none' + : 'none', + }} + > + {tableOptions?.map((tableitem) => ( + <> + {BookingTypeBoth && + index == 0 && + tableitem.OptionName == 'Sl.No' && ( + + )} + + {tableitem.OptionName == 'Sl.No' && ( + + )} + {tableitem.OptionName == 'Item' && ( + <> + + + )} + {tableitem.OptionName == 'MRP' && ( + + )} + {tableitem.OptionName == 'Discount' && ( + + )} + {tableitem.OptionName == 'Quantity' && ( + + )} + {tableitem.OptionName == 'Rate' && ( + + )} + {tableitem.OptionName == 'Amount' && ( + + )} + + {tableitem.OptionName == 'Delete' && ( + + )} + + ))} + + ))} + + {!sportsAppPreference && + OldtableDataDinein?.length > 0 && + EditQuantity && ( + + )} + + )} + {/* TakeWay */} + + {tableDataTakeAway?.length > 0 && ( + + {tableDataTakeAway?.map((item, index) => ( + = + 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 + ? 'white' + : SelectedBillColor?.[ + 'OverallBackgroundColor' + ] + ? SelectedBillColor?.[ + 'OverallBackgroundColor' + ] + : '#d6d6d6' : (OldtableDataDinein?.length + OldtableDataTakeAway?.length + index) % @@ -3096,417 +3096,61 @@ const StandardTable = () => { : SelectedBillColor?.['OverallBackgroundColor'] ? SelectedBillColor?.['OverallBackgroundColor'] : '#d6d6d6', - animation: - BillOrderPre === 'Y' && !BookingTypeBoth - ? triggerAnimation && - OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index === - 0 && - !item?.SalesId && - tableDataTakeAway?.length >= PreviousdataLength && - !HoldOrderDtl && - !UnpaidData - ? 'splashAnimation 0.5s ease-in-out' - : 'none' - : 'none', - }} - > - {tableOptions?.map((tableitem) => ( - <> - {BookingTypeBoth && - index == 0 && - tableitem.OptionName == 'Sl.No' && ( - - )} - - {tableitem.OptionName == 'Sl.No' && ( - - )} - {tableitem.OptionName == 'Item' && ( - <> - - - )} - {tableitem.OptionName == 'MRP' && ( - - )} - {tableitem.OptionName == 'Discount' && ( - - )} - - {tableitem.OptionName == 'Quantity' && ( - - )} - {tableitem.OptionName == 'Rate' && ( - - )} - {tableitem.OptionName == 'Amount' && ( - - )} - - {tableitem.OptionName == 'Delete' && ( - - )} - - ))} - - ))} - - {!sportsAppPreference && - tableDataTakeAway?.length > 0 && - EditQuantity && ( - - )} - - )} - {/* DineIn */} - {tableDataDinein?.length > 0 && ( - - {tableDataDinein?.map((item, index) => ( - = 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 - ? 'rgb(243, 248, 213)' - : GlobEstBooking === 'ParEst' && - GlobProdwisedata?.includes( - item?.InwardDtlId + ' ' + item?.BookingTypeName - ) - ? '#b2d1f7' - : (OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index) % - 2 === - 0 - ? 'white' - : SelectedBillColor?.['OverallBackgroundColor'] - ? SelectedBillColor?.['OverallBackgroundColor'] - : '#d6d6d6', - animation: - BillOrderPre === 'Y' && !BookingTypeBoth - ? triggerAnimation && - OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index === - 0 && - !item?.SalesId && - tableDataDinein?.length >= PreviousdataLength && - !HoldOrderDtl && - !UnpaidData - ? 'splashAnimation 0.5s ease-in-out' - : 'none' - : 'none', - }} - > - {tableOptions?.map((tableitem) => ( - <> - {BookingTypeBoth && - index == 0 && - tableitem.OptionName == 'Sl.No' && ( - - )} + index === + 0 && + !item?.SalesId && + tableDataTakeAway?.length >= PreviousdataLength && + !HoldOrderDtl && + !UnpaidData + ? 'splashAnimation 0.5s ease-in-out' + : 'none' + : 'none', + }} + > + {tableOptions?.map((tableitem) => ( + <> + {BookingTypeBoth && + index == 0 && + tableitem.OptionName == 'Sl.No' && ( + + )} - {tableitem.OptionName == 'Sl.No' && ( - - )} - {tableitem.OptionName == 'Item' && ( - <> + {tableitem.OptionName == 'Sl.No' && ( + + )} + {tableitem.OptionName == 'MRP' && ( + + )} + {tableitem.OptionName == 'Discount' && ( + + )} + + {tableitem.OptionName == 'Quantity' && ( + + )} + {tableitem.OptionName == 'Rate' && ( + + )} + {tableitem.OptionName == 'Amount' && ( + - - )} - {tableitem.OptionName == 'MRP' && ( - - )} - {tableitem.OptionName == 'Discount' && ( - - )} - {tableitem.OptionName == 'Quantity' && ( - - )} - {tableitem.OptionName == 'Rate' && ( - - )} - {tableitem.OptionName == 'Amount' && ( - + )} + + ))} + + ))} + + {!sportsAppPreference && + tableDataTakeAway?.length > 0 && + EditQuantity && ( + + )} + + )} + {/* DineIn */} + {tableDataDinein?.length > 0 && ( + + {tableDataDinein?.map((item, index) => ( + = 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 + ? 'rgb(243, 248, 213)' + : GlobEstBooking === 'ParEst' && + GlobProdwisedata?.includes( + item?.InwardDtlId + + ' ' + + item?.BookingTypeName + ) + ? '#b2d1f7' + : (OldtableDataTakeAway?.length + + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index) % + 2 === + 0 + ? 'white' + : SelectedBillColor?.['OverallBackgroundColor'] + ? SelectedBillColor?.[ + 'OverallBackgroundColor' + ] + : '#d6d6d6', + animation: + BillOrderPre === 'Y' && !BookingTypeBoth + ? triggerAnimation && + OldtableDataTakeAway?.length + + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index === + 0 && + !item?.SalesId && + tableDataDinein?.length >= PreviousdataLength && + !HoldOrderDtl && + !UnpaidData + ? 'splashAnimation 0.5s ease-in-out' + : 'none' + : 'none', + }} + > + {tableOptions?.map((tableitem) => ( + <> + {BookingTypeBoth && + index == 0 && + tableitem.OptionName == 'Sl.No' && ( + )} - - )} - {tableitem.OptionName == 'Delete' && ( - - )} - - ))} - - ))} + {tableitem.OptionName == 'Sl.No' && ( + + )} + {tableitem.OptionName == 'Item' && ( + <> + + + )} + {tableitem.OptionName == 'MRP' && ( + + )} + {tableitem.OptionName == 'Discount' && ( + + )} + {tableitem.OptionName == 'Quantity' && ( + + )} + {tableitem.OptionName == 'Rate' && ( + + )} + {tableitem.OptionName == 'Amount' && ( + + )} + + {tableitem.OptionName == 'Delete' && ( + + )} + + ))} + + ))} + + {!sportsAppPreference && + tableDataDinein?.length > 0 && + EditQuantity && ( + + )} + + )} +
+ {!isMobile ? ( + {''} + ) : ( +
{''}
+ )} +
+ {!isMobile ? ( + Sl.No + ) : ( +
+ Sl.No +
+ )} +
+ {!isMobile ? ( + Item + ) : ( +
Item
+ )} +
+ {!isMobile ? ( + MRP + ) : ( +
MRP
+ )} +
+ {!isMobile ? ( + ₹/% + ) : ( +
₹/%
+ )} +
0 ? OpenEditTotalAmount : ""} + onClick={() => { + if (OrderCardDetail?.length > 0) { + OpenEditTotalAmount(); + } + }} + > + {!isMobile ? ( + Qty + ) : ( +
Qty
+ )} +
+ {!isMobile ? ( + Rt + ) : ( +
Rt
+ )} +
+ {!isMobile ? ( + Amt + ) : ( +
Amt
+ )} +
- {OrderCardDetail?.length > 0 ? ( - { - Clearall(); - }} - > + {item.OptionName == 'Delete' && ( + + {OrderCardDetail?.length > 0 ? ( + { + Clearall(); + }} + > +
+ {' '} + {!isMobile ? ( + + {' '} + {' '} + + ) : ( +
+ {' '} + {' '} +
+ )} +
+
+ ) : (
- {' '} {!isMobile ? ( - - {' '} - {' '} + + ) : (
@@ -2341,455 +2357,104 @@ const StandardTable = () => {
)}
- - ) : ( -
- {!isMobile ? ( - - - - ) : ( -
- {' '} - {' '} -
- )} -
- )} -
- - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {index + 1} - - item.FullProductIdentifierDtls?.length > 0 || - item.ProductIdentifierDtls?.length > 0 - ? handleImeiDetails(item) - : editField && handleEditQuantity(item) - } - > - {item?.ProdName} -  {' '} - {item?.BrandName !== null ? item?.BrandName : ''} - {item?.Type != 'C' && ( - <> -

- ( - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && {item?.ProdVariantName} } - {AvailableDate ? ( - <> - {' '} - ( - {`${to12Hour(item?.VariantAvailableFrom || item?.AvailableFrom)} - ${to12Hour(item?.VariantAvailableTo || item?.AvailableTo)}`} - )   - {item?.SinglePc == 'Y' && 'Single'} - - ) : ( - <> - {item?.Size} - {item?.SinglePc == 'Y' - ? 'Single' - : item?.UomName} - - )} - ) -

- {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -

- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} -

- )} - - )} - {item?.Type === 'C' && ( -
- {item.ProdDetail?.map((prod, index) => ( -

- {prod.ProdName} - {prod.Size}{' '} - {prod.UomName} -

- ))} -
- )} - {productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} -
{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.MRP} - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : '-'} - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderQty} - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - { - // if (editField) { - // handleEditQuantity(item); - // } - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - > - {safeRound( - item?.TotalAmt - (item?.Offer || 0) || 0 - )} - - removeFromCart(item)} - style={{ color: '#FF4D4F', cursor: 'pointer' }} - /> -
- - + + { - if (editField) { - handleEditQuantity(item); - } - }} - > - {OldtableDataTakeAway?.length + index + 1} - { } }} > - {item?.ProdName} -  {' '} - {item?.BrandName !== null ? item?.BrandName : ''} - {item?.Type != 'C' && ( - <> -

+ )} + {tableitem.OptionName == 'Item' && ( + <> +

+ item.FullProductIdentifierDtls?.length > 0 || + item.ProductIdentifierDtls?.length > 0 + ? handleImeiDetails(item) + : editField && handleEditQuantity(item) + } + > + {item?.ProdName} +  {' '} + {item?.BrandName !== null + ? item?.BrandName + : ''} + {item?.Type != 'C' && ( + <> +

+ ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && ( + {item?.ProdVariantName} + )} + {AvailableDate ? ( + <> + {' '} + ( + {`${to12Hour(item?.VariantAvailableFrom || item?.AvailableFrom)} - ${to12Hour(item?.VariantAvailableTo || item?.AvailableTo)}`} + )   + {item?.SinglePc == 'Y' && 'Single'} + + ) : ( + <> + {item?.Size} + {item?.SinglePc == 'Y' + ? 'Single' + : item?.UomName} + + )} + ) +

+ {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( +

+ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} +

+ )} + + )} + {item?.Type === 'C' && ( +
- ( - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && {item?.ProdVariantName} } - {AvailableDate ? ( - <> - {' '} - ( - {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} - )   - {item?.SinglePc == 'Y' && 'Single'} - - ) : ( - <> - {item?.Size} - {item?.SinglePc == 'Y' - ? 'Single' - : item?.UomName} - - )} - ) -

- {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -

- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} + {item.ProdDetail?.map((prod, index) => ( +

+ {prod.ProdName} - {prod.Size}{' '} + {prod.UomName}

- )} - - )} - {item?.Type === 'C' && ( -
- {item.ProdDetail?.map((prod, index) => ( -

- {prod.ProdName} - {prod.Size}{' '} - {prod.UomName} -

- ))} -
- )} - {productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
+ ))} +
+ )} + {productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + ) !== undefined && ( +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} +
{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : '-'} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderQty} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + { + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {safeRound( + item?.TotalAmt - (item?.Offer || 0) || 0 )} { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.MRP} - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : '-'} - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderQty} - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - { - // if (editField) { - // handleEditQuantity(item); - // } - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - > - {safeRound( - item?.TotalAmt - (item?.Offer || 0) || 0 - )} - + removeFromCart(item)} + style={{ color: '#FF4D4F', cursor: 'pointer' }} + /> +
- removeFromCart(item)} - style={{ color: '#FF4D4F', cursor: 'pointer' }} - /> -
+ + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {OldtableDataTakeAway?.length + index + 1} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.ProdName} +  {' '} + {item?.BrandName !== null + ? item?.BrandName + : ''} + {item?.Type != 'C' && ( + <> +

+ ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && ( + {item?.ProdVariantName} + )} + {AvailableDate ? ( + <> + {' '} + ( + {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} + )   + {item?.SinglePc == 'Y' && 'Single'} + + ) : ( + <> + {item?.Size} + {item?.SinglePc == 'Y' + ? 'Single' + : item?.UomName} + + )} + ) +

+ {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( +

+ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} +

+ )} + + )} + {item?.Type === 'C' && ( +
+ {item.ProdDetail?.map((prod, index) => ( +

+ {prod.ProdName} - {prod.Size}{' '} + {prod.UomName} +

+ ))} +
+ )} + {productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + ) !== undefined && ( +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} +
{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : '-'} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderQty} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + { + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {safeRound( + item?.TotalAmt - (item?.Offer || 0) || 0 + )} + + removeFromCart(item)} + style={{ color: '#FF4D4F', cursor: 'pointer' }} + /> +
- - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {OldtableDataDinein?.length + - OldtableDataTakeAway?.length + - index + - 1} - - item.FullProductIdentifierDtls?.length > 0 || - item.ProductIdentifierDtls?.length > 0 - ? handleImeiDetails(item) - : editField && handleEditQuantity(item) - } - > - {item?.Type !== 'OS' - ? item.ProdName - : item.ServiceName} -  {' '} - {item?.BrandName !== null ? item?.BrandName : ''} - {item?.Type != 'C' && ( - <> -

- {item?.Type !== 'OS' && ( - <> - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && ( - {item?.ProdVariantName} - )} - {AvailableDate ? ( - <> - {' '} - ( - {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} - )   - {item?.SinglePc == 'Y' && 'Single'} - - ) : ( - <> - {item?.Size} - {item?.SinglePc == 'Y' - ? 'Single' - : item?.UomName} - - )} - - )} -

- {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -

- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} -

- )} - - )} - {item?.Type === 'C' && ( -
- {item.ProdDetail?.map((prod, index) => ( -

- {prod.ProdName} - {prod.Size}{' '} - {prod.UomName} -

- ))} -
- )} - {productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
- )} -
{ - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.MRP} - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : '-'} - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderQty} - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - { - // if (editField) { - // handleEditQuantity(item); - // } - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - > - {safeRound( - item?.TotalAmt - (item?.Offer || 0) || 0 - )} - - removeFromCart(item)} - style={{ color: '#FF4D4F', cursor: 'pointer' }} - /> -
- - + + { - if (editField) { - handleEditQuantity(item); - } - }} - > - {OldtableDataTakeAway?.length + - OldtableDataDinein?.length + - tableDataTakeAway?.length + - index + - 1} - { } }} > - {item?.ProdName} -  {' '} - {item?.BrandName !== null ? item?.BrandName : ''} - {item?.Type != 'C' && ( - <> -

+ )} + {tableitem.OptionName == 'Item' && ( + <> +

+ item.FullProductIdentifierDtls?.length > 0 || + item.ProductIdentifierDtls?.length > 0 + ? handleImeiDetails(item) + : editField && handleEditQuantity(item) + } + > + {item?.Type !== 'OS' + ? item.ProdName + : item.ServiceName} +  {' '} + {item?.BrandName !== null + ? item?.BrandName + : ''} + {item?.Type != 'C' && ( + <> +

+ {item?.Type !== 'OS' && ( + <> + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && ( + + {item?.ProdVariantName}{' '} + + )} + {AvailableDate ? ( + <> + {' '} + ( + {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} + )   + {item?.SinglePc == 'Y' && + 'Single'} + + ) : ( + <> + {item?.Size} + {item?.SinglePc == 'Y' + ? 'Single' + : item?.UomName} + + )} + + )} +

+ {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( +

+ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} +

+ )} + + )} + {item?.Type === 'C' && ( +
- ( - {!item?.ProdVariantName?.toLowerCase()?.includes( - 'variant' - ) && {item?.ProdVariantName} } - {AvailableDate ? ( - <> - {' '} - ( - {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} - )   - {item?.SinglePc == 'Y' && 'Single'} - - ) : ( - <> - {item?.Size} - {item?.SinglePc == 'Y' - ? 'Single' - : item?.UomName} - - )} - ) -

- {item?.OfferMessage && - !Array.isArray(item.OfferMessage) && ( -

- {item.OfferMessage?.split('>')?.[0] + - `> ${item?.OrderQty} Eligible Free`} + {item.ProdDetail?.map((prod, index) => ( +

+ {prod.ProdName} - {prod.Size}{' '} + {prod.UomName}

- )} - - )} - {item?.Type === 'C' && ( -
- {item.ProdDetail?.map((prod, index) => ( -

- {prod.ProdName} - {prod.Size}{' '} - {prod.UomName} -

- ))} -
- )} - {productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - ) !== undefined && ( -
- Extra Charges :{' '} - { - productBasedExtraCharges?.find( - (find) => find.ProdId === item.ProdId - )?.TotalAmt - } -
+ ))} +
+ )} + {productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + ) !== undefined && ( +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} +
{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : '-'} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderQty} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + { + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {safeRound( + item?.TotalAmt - (item?.Offer || 0) || 0 )} { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.MRP} - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.Type != 'C' - ? item.Offer && item.Offer > 0 - ? item.Offer - : '-' - : item?.OfferPrice && item?.OfferPrice > 0 - ? item?.OfferType === 'F' - ? `₹${safeRound(item.OfferPrice)}` - : `${item.OfferPrice}%` - : '-'} - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderQty} - { - if (editField) { - handleEditQuantity(item); - } - }} - > - {item?.OrderRate} - { - // if (editField) { - // handleEditQuantity(item); - // } - if (GetCustId) { - handleCustomerProductPriceHistory(item); - } - }} - > - {safeRound( - item?.TotalAmt - (item?.Offer || 0) || 0 + )} + + {tableitem.OptionName == 'Delete' && ( + + removeFromCart(item)} + style={{ color: '#FF4D4F', cursor: 'pointer' }} + /> +
+ + - removeFromCart(item)} - style={{ color: '#FF4D4F', cursor: 'pointer' }} - /> -
{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {OldtableDataTakeAway?.length + + OldtableDataDinein?.length + + tableDataTakeAway?.length + + index + + 1} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.ProdName} +  {' '} + {item?.BrandName !== null + ? item?.BrandName + : ''} + {item?.Type != 'C' && ( + <> +

+ ( + {!item?.ProdVariantName?.toLowerCase()?.includes( + 'variant' + ) && ( + {item?.ProdVariantName} + )} + {AvailableDate ? ( + <> + {' '} + ( + {`${to12Hour(item?.VariantAvailableFrom)} - ${to12Hour(item?.VariantAvailableTo)}`} + )   + {item?.SinglePc == 'Y' && 'Single'} + + ) : ( + <> + {item?.Size} + {item?.SinglePc == 'Y' + ? 'Single' + : item?.UomName} + + )} + ) +

+ {item?.OfferMessage && + !Array.isArray(item.OfferMessage) && ( +

+ {item.OfferMessage?.split('>')?.[0] + + `> ${item?.OrderQty} Eligible Free`} +

+ )} + + )} + {item?.Type === 'C' && ( +
+ {item.ProdDetail?.map((prod, index) => ( +

+ {prod.ProdName} - {prod.Size}{' '} + {prod.UomName} +

+ ))} +
+ )} + {productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + ) !== undefined && ( +
+ Extra Charges :{' '} + { + productBasedExtraCharges?.find( + (find) => find.ProdId === item.ProdId + )?.TotalAmt + } +
+ )} +
{ + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.MRP} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.Type != 'C' + ? item.Offer && item.Offer > 0 + ? item.Offer + : '-' + : item?.OfferPrice && item?.OfferPrice > 0 + ? item?.OfferType === 'F' + ? `₹${safeRound(item.OfferPrice)}` + : `${item.OfferPrice}%` + : '-'} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderQty} + { + if (editField) { + handleEditQuantity(item); + } + }} + > + {item?.OrderRate} + { + // if (editField) { + // handleEditQuantity(item); + // } + if (GetCustId) { + handleCustomerProductPriceHistory(item); + } + }} + > + {safeRound( + item?.TotalAmt - (item?.Offer || 0) || 0 + )} + + removeFromCart(item)} + style={{ color: '#FF4D4F', cursor: 'pointer' }} + /> +
- {!sportsAppPreference && - tableDataDinein?.length > 0 && - EditQuantity && ( - - )} - - )} - - Loading...
}> {OpenEditTotalAmt && ( { OrderCardDetail={OrderCardDetail} /> )} - -
-
- Loading...
}> +
+
- +
-
+ ); }; diff --git a/src/Pages/BookingScreen/Components/BSNavbar/BSNavBarUserInfo.jsx b/src/Pages/BookingScreen/Components/BSNavbar/BSNavBarUserInfo.jsx index bc7ef82..09a4efa 100644 --- a/src/Pages/BookingScreen/Components/BSNavbar/BSNavBarUserInfo.jsx +++ b/src/Pages/BookingScreen/Components/BSNavbar/BSNavBarUserInfo.jsx @@ -12,6 +12,7 @@ import { useNavigate } from 'react-router-dom'; const UserRelieveManager = lazy(() => import('../../Template/RealivingUser')); // Scss import '../../../../Styles/BookingScreen/Components/BSNavbar/BSNavbar1.scss'; +import NavbarSkeleton from '../../../../Components/Skeleton/NavbarSkeleton'; const subDirectory = import.meta.env.ENV_BASE_URL; const BSNavBarUserInfo = ({ @@ -38,7 +39,7 @@ const BSNavBarUserInfo = ({ navigate(`${subDirectory}app-page/branch-login`); }; return ( - Loading…
}> + }>
{CompBranchData?.length > 1 && ( diff --git a/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar1.jsx b/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar1.jsx index 603cd61..095be1d 100644 --- a/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar1.jsx +++ b/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar1.jsx @@ -164,6 +164,7 @@ import { FaParking } from 'react-icons/fa'; import { isMobile } from 'react-device-detect'; import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx'; import '../../../../Styles/BookingScreen/Components/BSNavbar/BSNavbar1.scss'; +import NavbarSkeleton from '../../../../Components/Skeleton/NavbarSkeleton.jsx'; const subDirectory = import.meta.env.ENV_BASE_URL; const commonUrl = import.meta.env.ENV_COMMON_BASE_URL; @@ -611,7 +612,7 @@ const BSNavbar1 = (props) => { }; return ( - Suspense Loading...
}> + }>
{ }; return ( - Loading…
}> + }>
diff --git a/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar3.jsx b/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar3.jsx index e103151..8bf25cf 100644 --- a/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar3.jsx +++ b/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar3.jsx @@ -113,6 +113,7 @@ import BSNavBarWeightScale from '../UtillComponents/BSNavBarWeightScale.jsx'; import { CgSearchLoading } from 'react-icons/cg'; import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx'; import MultipleSearch from '../UtillComponents/MultipleSearch.jsx'; +import NavbarSkeleton from '../../../../Components/Skeleton/NavbarSkeleton.jsx'; // Jsx Files const BSNavBarFavItems = lazy( @@ -595,7 +596,7 @@ const BSNavbar3 = ({ optionNames }) => { }; return ( - Loading…
}> + }> <>
diff --git a/src/Pages/BookingScreen/Components/UtillComponents/ProductPriceChange.jsx b/src/Pages/BookingScreen/Components/UtillComponents/ProductPriceChange.jsx index 0e09900..c5ef7b5 100644 --- a/src/Pages/BookingScreen/Components/UtillComponents/ProductPriceChange.jsx +++ b/src/Pages/BookingScreen/Components/UtillComponents/ProductPriceChange.jsx @@ -1,490 +1,540 @@ -import { shallowEqual, useSelector } from "react-redux"; -import { GlobalAccessForOthers, GlobalCardAccess, GlobalCombosearch, GlobalItemCard, GlobalProductCategorie, GlobalSelectedDatas, GlobalWithoutSubCatItemCard, triggerProductCard } from "../../../../Features/BookingScreen/BookingData/BookingData"; -import { DefaultModal } from "../../../../Components/Modal/DefaultModal"; -import { useCallback, useEffect, useRef, useState } from "react"; -import { Tables } from "../../../../Components/Tables/Table"; -import { InputField } from "../../../../Components/Forms/InputField"; -import { Form, Pagination, Tooltip } from "antd"; -import { getSession } from "../../../../Services/Others"; -import { Messages } from "../../../../Components/Notifications/Messages"; -import { useDispatch } from "react-redux"; -import { PutStockPrice } from "../../../../Features/StockPriceUpdate/StockPriceUpdateMaster"; -import PriceChange from "../../../../Images/PayOptImgs/PriceChange.svg"; +import { shallowEqual, useSelector } from 'react-redux'; +import { + GlobalAccessForOthers, + GlobalCardAccess, + GlobalCombosearch, + GlobalItemCard, + GlobalProductCategorie, + GlobalSelectedDatas, + GlobalWithoutSubCatItemCard, + triggerProductCard, +} from '../../../../Features/BookingScreen/BookingData/BookingData'; +import { DefaultModal } from '../../../../Components/Modal/DefaultModal'; +import { useCallback, useEffect, useRef, useState } from 'react'; +import { Tables } from '../../../../Components/Tables/Table'; +import { InputField } from '../../../../Components/Forms/InputField'; +import { Form, Pagination, Tooltip } from 'antd'; +import { getSession } from '../../../../Services/Others'; +import { Messages } from '../../../../Components/Notifications/Messages'; +import { useDispatch } from 'react-redux'; +import { PutStockPrice } from '../../../../Features/StockPriceUpdate/StockPriceUpdateMaster'; +import PriceChange from '../../../../Images/PayOptImgs/PriceChange.svg'; import { v4 as uuidv4 } from 'uuid'; +// src\Styles\BookingScreen\Template\BSLayout2\BSLayout2.scss +import '../../../../Styles/BookingScreen/Template/BSLayout2/BSLayout2.scss'; -const ProductPriceChange = ({ showButton = true, priceChangeProduct = null, productPriceChange = false, setProductPriceChange = () => { }, setPriceChangeProduct = () => { } }) => { +const ProductPriceChange = ({ + showButton = true, + priceChangeProduct = null, + productPriceChange = false, + setProductPriceChange = () => {}, + setPriceChangeProduct = () => {}, +}) => { + const formRef = useRef(null); + const dispatch = useDispatch(); - const formRef = useRef(null); - const dispatch = useDispatch(); + const AppId = getSession('AppId'); + const CompId = getSession('CompId'); + const BranchId = getSession('BranchId'); + const UserId = getSession('UserId'); - const AppId = getSession('AppId'); - const CompId = getSession('CompId'); - const BranchId = getSession('BranchId'); - const UserId = getSession('UserId'); + const [messageData, setMessageData] = useState(null); + const [messageType, setMessageType] = useState(null); + const [currentPage, setCurrentPage] = useState(1); + const [pageSize] = useState(10); - const [messageData, setMessageData] = useState(null); - const [messageType, setMessageType] = useState(null); - const [currentPage, setCurrentPage] = useState(1); - const [pageSize] = useState(10); + const [noSubcatCardData, setNoSubcatCardData] = useState(); + const [priceChangeModal, setPriceChangeModal] = useState(false); - const [noSubcatCardData, setNoSubcatCardData] = useState(); - const [priceChangeModal, setPriceChangeModal] = useState(false); + const comboSearch = useSelector(GlobalCombosearch); + const ProdCat = useSelector(GlobalProductCategorie, shallowEqual); + const ItemCard = useSelector(GlobalItemCard, shallowEqual); + const withoutSubCatItemCard = useSelector( + GlobalWithoutSubCatItemCard, + shallowEqual + ); + const CardAccess = useSelector(GlobalCardAccess, shallowEqual); + const globalAccessForOthers = useSelector( + GlobalAccessForOthers, + shallowEqual + ); + const SelectedDatas = useSelector(GlobalSelectedDatas, shallowEqual); + const [tableData, setTableData] = useState([]); + const [editingKey, setEditingKey] = useState(null); + const [priceChangedProducts, setPriceChangedProducts] = useState([]); + console.log(comboSearch, 'comboSearch'); - const comboSearch = useSelector(GlobalCombosearch); - const ProdCat = useSelector(GlobalProductCategorie, shallowEqual); - const ItemCard = useSelector(GlobalItemCard, shallowEqual); - const withoutSubCatItemCard = useSelector(GlobalWithoutSubCatItemCard, shallowEqual); - const CardAccess = useSelector(GlobalCardAccess, shallowEqual); - const globalAccessForOthers = useSelector(GlobalAccessForOthers, shallowEqual); - const SelectedDatas = useSelector(GlobalSelectedDatas, shallowEqual); - const [tableData, setTableData] = useState([]); - const [editingKey, setEditingKey] = useState(null); - const [priceChangedProducts, setPriceChangedProducts] = useState([]); - console.log(comboSearch, "comboSearch") + // console.log(noSubcatCardData, "noSubcatCardData") - // console.log(noSubcatCardData, "noSubcatCardData") + useEffect(() => { + if (ProdCat && (ItemCard || withoutSubCatItemCard)) { + setNoSubcatCardData( + ItemCard?.length === 0 ? withoutSubCatItemCard : ItemCard + ); + } + }, [ProdCat, ItemCard, withoutSubCatItemCard, noSubcatCardData]); - useEffect(() => { - if (ProdCat && (ItemCard || withoutSubCatItemCard)) { - setNoSubcatCardData(ItemCard?.length === 0 ? withoutSubCatItemCard : ItemCard); - } - }, [ProdCat, ItemCard, withoutSubCatItemCard, noSubcatCardData]); + const priceChangeColumns = [ + { + title: 'S.No', + dataIndex: 'SlNo', + key: 'SlNo', + width: '60px', + align: 'center', + render: (text, record, index) => ( +
{(currentPage - 1) * pageSize + index + 1}
+ ), + }, + { + title: 'Product Name', + dataIndex: 'ProdName', + key: 'ProdName', + }, + { + title: 'Batch No.', + dataIndex: 'BatchRef', + key: 'BatchRef', + }, + { + title: 'Old MRP', + dataIndex: 'MRP', + key: 'MRP', + width: '100px', + align: 'right', + }, + { + title: 'New MRP (Optional)', + dataIndex: 'NewMRP', + key: 'NewMRP', + width: '100px', + align: 'right', + render: (text, record, index) => { + // if (index === editingKey) { - const priceChangeColumns = [ - { - title: 'S.No', - dataIndex: 'SlNo', - key: 'SlNo', - width: '60px', - align: 'center', - render: (text, record, index) =>
{(currentPage - 1) * pageSize + index + 1}
- }, - { - title: 'Product Name', - dataIndex: 'ProdName', - key: 'ProdName', - }, - { - title: 'Batch No.', - dataIndex: 'BatchRef', - key: 'BatchRef', - }, - { - title: 'Old MRP', - dataIndex: 'MRP', - key: 'MRP', - width: '100px', - align: 'right', - }, - { - title: 'New MRP (Optional)', - dataIndex: 'NewMRP', - key: 'NewMRP', - width: '100px', - align: 'right', - render: (text, record, index) => { - // if (index === editingKey) { + // } + // return
{text ? text : 'Enter New MRP'}
+ return ( + { + if (value === '') { + return Promise.resolve(); + } else if (parseFloat(value) < 1) { + return Promise.reject(`MRP should be greater than 0`); + } + return Promise.resolve(); + }, + }, + ]} + > + + handleNewMRPChange(e?.target?.value, record?.localId) + } + inputMode="decimal" + onInput={(e) => { + let cleanedValue = e.target.value.replace(/[^0-9.]/g, ''); // Remove invalid characters + const parts = cleanedValue.split('.'); - // } - // return
{text ? text : 'Enter New MRP'}
- return ( - { - if (value === '') { - return Promise.resolve(); - } else if (parseFloat(value) < 1) { - return Promise.reject(`MRP should be greater than 0`) - } - return Promise.resolve(); - }, - }, - ]}> - handleNewMRPChange(e?.target?.value, record?.localId)} - inputMode="decimal" - onInput={(e) => { - let cleanedValue = e.target.value.replace( - /[^0-9.]/g, - '' - ); // Remove invalid characters - const parts = cleanedValue.split('.'); + e.target.value = + parts.length > 2 + ? `${parts[0]}.${parts.slice(1).join('')}` + : cleanedValue; + }} + /> + + ); + }, + }, + { + title: 'Old Sell Price', + dataIndex: 'SellPrice', + key: 'SellPrice', + width: '120px', + align: 'right', + }, + { + title: 'New Sell Price', + dataIndex: 'NewSellPrice', + key: 'NewSellPrice', + width: '120px', + align: 'right', + render: (text, record, index) => { + // if (index === editingKey) { - if (cleanedValue.startsWith('.')) { - cleanedValue = '0' + cleanedValue; - } + // } + // return
{text ? text : 'Enter New Sell Price'}
+ return ( + { + if (value === '') { + return Promise.resolve(); + } else if (parseFloat(value) < 1) { + return Promise.reject( + `Sell Price should be greater than 0` + ); + } + return Promise.resolve(); + }, + }, + ]} + > + + handleNewSellPriceChange(e?.target?.value, record?.localId) + } + inputMode="decimal" + onInput={(e) => { + let cleanedValue = e.target.value.replace(/[^0-9.]/g, ''); // Remove invalid characters + const parts = cleanedValue.split('.'); - e.target.value = - parts.length > 2 - ? `${parts[0]}.${parts.slice(1).join('')}` - : cleanedValue; - }} - /> - - ); - }, - }, - { - title: 'Old Sell Price', - dataIndex: 'SellPrice', - key: 'SellPrice', - width: '120px', - align: 'right', - }, - { - title: 'New Sell Price', - dataIndex: 'NewSellPrice', - key: 'NewSellPrice', - width: '120px', - align: 'right', - render: (text, record, index) => { - // if (index === editingKey) { + if (cleanedValue.startsWith('.')) { + cleanedValue = '0' + cleanedValue; + } - // } - // return
{text ? text : 'Enter New Sell Price'}
- return ( - { - if (value === '') { - return Promise.resolve(); - } else if (parseFloat(value) < 1) { - return Promise.reject(`Sell Price should be greater than 0`) - } - return Promise.resolve(); - }, - }, - ]} - > - 2 + ? `${parts[0]}.${parts.slice(1).join('')}` + : cleanedValue; + }} + /> + + ); + }, + }, + ]; - value={text} - placeholder="Enter New Sell Price" - onChange={(e) => handleNewSellPriceChange(e?.target?.value, record?.localId)} - inputMode="decimal" - onInput={(e) => { - let cleanedValue = e.target.value.replace( - /[^0-9.]/g, - '' - ); // Remove invalid characters - const parts = cleanedValue.split('.'); + const cardData = !globalAccessForOthers + ? CardAccess + ? SelectedDatas?.length > 1 + ? SelectedDatas + : SelectedDatas?.[0]?.AppId === 0 && SelectedDatas?.[0]?.CompId === 0 + ? [] + : SelectedDatas + : ItemCard?.length === 0 || + (ItemCard?.[0]?.AppId === 0 && ItemCard?.[0]?.CompId === 0) + ? noSubcatCardData + : ItemCard + : ''; - if (cleanedValue.startsWith('.')) { - cleanedValue = '0' + cleanedValue; - } + console.log(cardData, 'cardData1', ItemCard, SelectedDatas, noSubcatCardData); - e.target.value = - parts.length > 2 - ? `${parts[0]}.${parts.slice(1).join('')}` - : cleanedValue; - }} - /> -
- ); - }, - }, - ]; + useEffect(() => { + const extractStockDtls = (data) => { + if (data?.length === 0) return []; - const cardData = !globalAccessForOthers - ? CardAccess - ? SelectedDatas?.length > 1 - ? SelectedDatas - : SelectedDatas?.[0]?.AppId === 0 && SelectedDatas?.[0]?.CompId === 0 - ? [] - : SelectedDatas - : ItemCard?.length === 0 || (ItemCard?.[0]?.AppId === 0 && ItemCard?.[0]?.CompId === 0) - ? noSubcatCardData - : ItemCard - : ''; + let stockDtls = []; - console.log(cardData, "cardData1", ItemCard, SelectedDatas, noSubcatCardData) + data?.forEach((item) => { + const products = item?.ProductDetail ?? []; - useEffect(() => { - const extractStockDtls = (data) => { - if (data?.length === 0) return []; + products.forEach((product) => { + const variants = product?.ProdVariantDetails ?? []; - let stockDtls = []; + variants + .filter((variant) => variant?.StockDetails?.length > 0) + .forEach((variant) => { + const stocks = variant.StockDetails.map((stock) => ({ + ...stock, + ProdName: + product?.ProdName + + (product?.Size && product?.UomName + ? ` (${product.Size} ${product.UomName})` + : product?.Size + ? ` (${product.Size})` + : '') + + (product?.BrandName ? ` - (${product.BrandName})` : '') + + (variant?.ProdVariantName + ? ` (${variant.ProdVariantName})` + : ''), + UomName: product?.UomName, + BrandName: product?.BrandName, + Size: product?.Size, + StockAvailable: product?.StockAvailable, + ProdVariantName: variant?.ProdVariantName, + localId: uuidv4(), + })); - data?.forEach(item => { - const products = item?.ProductDetail ?? []; - - products.forEach(product => { - const variants = product?.ProdVariantDetails ?? []; - - variants - .filter(variant => variant?.StockDetails?.length > 0) - .forEach(variant => { - const stocks = variant.StockDetails.map(stock => ({ - ...stock, - ProdName: - product?.ProdName + - ( - product?.Size && product?.UomName - ? ` (${product.Size} ${product.UomName})` - : product?.Size - ? ` (${product.Size})` - : '' - ) + - ( - product?.BrandName - ? ` - (${product.BrandName})` - : '' - ) + - ( - variant?.ProdVariantName - ? ` (${variant.ProdVariantName})` - : '' - ), - UomName: product?.UomName, - BrandName: product?.BrandName, - Size: product?.Size, - StockAvailable: product?.StockAvailable, - ProdVariantName: variant?.ProdVariantName, - localId: uuidv4(), - })); - - stockDtls.push( - ...stocks.filter(stock => - stock?.StockAvailable === 'Y' - ? stock?.BatchRef - : true - ) - ); - }); - }); + stockDtls.push( + ...stocks.filter((stock) => + stock?.StockAvailable === 'Y' ? stock?.BatchRef : true + ) + ); }); + }); + }); - console.log("extractStockDtls", stockDtls); - return stockDtls; - } - setTableData(extractStockDtls(priceChangeProduct || cardData)) - setCurrentPage(1) - }, [cardData, priceChangeProduct]) + console.log('extractStockDtls', stockDtls); + return stockDtls; + }; + setTableData(extractStockDtls(priceChangeProduct || cardData)); + setCurrentPage(1); + }, [cardData, priceChangeProduct]); - const handleNewMRPChange = (value, localId) => { + const handleNewMRPChange = (value, localId) => { + const updatedTableData = [...tableData]; + const index = updatedTableData.findIndex( + (item) => item?.localId === localId + ); + updatedTableData[index].NewMRP = value; + setTableData(updatedTableData); + updatedTableData[index].NewSellPrice = null; + formRef.current.setFieldsValue({ + [`NewMRP${localId}`]: value, + [`NewSellPrice${localId}`]: null, + }); - const updatedTableData = [...tableData]; - const index = updatedTableData.findIndex(item => item?.localId === localId); - updatedTableData[index].NewMRP = value; - setTableData(updatedTableData); + const priceChangedProdList = [...priceChangedProducts]; + const prodIndex = priceChangedProdList?.findIndex( + (prod) => prod?.InwardDtlId === updatedTableData[index]?.InwardDtlId + ); + if (prodIndex !== -1) { + priceChangedProdList[prodIndex] = { + ...priceChangedProdList?.[prodIndex], + NewMRP: value, + NewSellPrice: null, + }; + } + setPriceChangedProducts(priceChangedProdList); + }; + + const handleNewSellPriceChange = (value, localId) => { + const index = tableData.findIndex((item) => item?.localId === localId); + const updatedTableData = [...tableData]; + if (updatedTableData[index]?.NewMRP) { + if (parseFloat(value) > parseFloat(updatedTableData[index]?.NewMRP)) { + setMessageType('error'); + setMessageData('New Sell Price cannot be greater than New MRP'); + formRef.current.setFieldsValue({ + [`NewSellPrice${localId}`]: null, + }); updatedTableData[index].NewSellPrice = null; - formRef.current.setFieldsValue({ - [`NewMRP${localId}`]: value, - [`NewSellPrice${localId}`]: null, - }); - - const priceChangedProdList = [...priceChangedProducts]; - const prodIndex = priceChangedProdList?.findIndex(prod => prod?.InwardDtlId === updatedTableData[index]?.InwardDtlId); - if (prodIndex !== -1) { - priceChangedProdList[prodIndex] = { - ...priceChangedProdList?.[prodIndex], - NewMRP: value, - NewSellPrice: null, - }; - } - setPriceChangedProducts(priceChangedProdList); - } - - const handleNewSellPriceChange = (value, localId) => { - const index = tableData.findIndex(item => item?.localId === localId); - const updatedTableData = [...tableData]; - if (updatedTableData[index]?.NewMRP) { - if (parseFloat(value) > parseFloat(updatedTableData[index]?.NewMRP)) { - setMessageType('error'); - setMessageData('New Sell Price cannot be greater than New MRP'); - formRef.current.setFieldsValue({ - [`NewSellPrice${localId}`]: null, - }); - updatedTableData[index].NewSellPrice = null; - setTableData(updatedTableData); - const priceChangedProdList = [...priceChangedProducts]; - const prodIndex = priceChangedProdList?.findIndex(prod => prod?.InwardDtlId === updatedTableData[index]?.InwardDtlId); - - if (prodIndex !== -1) { - priceChangedProdList.splice(prodIndex, 1); - } - setPriceChangedProducts(priceChangedProdList); - return; - } - } - if (!updatedTableData[index]?.NewMRP && updatedTableData[index]?.MRP) { - if (parseFloat(value) > parseFloat(updatedTableData[index]?.MRP)) { - setMessageType('error'); - setMessageData('New Sell Price cannot be greater than MRP'); - formRef.current.setFieldsValue({ - [`NewSellPrice${index}`]: null, - }); - updatedTableData[index].NewSellPrice = null; - setTableData(updatedTableData); - const priceChangedProdList = [...priceChangedProducts]; - const prodIndex = priceChangedProdList?.findIndex(prod => prod?.InwardDtlId === updatedTableData[index]?.InwardDtlId); - - if (prodIndex !== -1) { - priceChangedProdList.splice(prodIndex, 1); - } - setPriceChangedProducts(priceChangedProdList); - return; - } - } - updatedTableData[index].NewSellPrice = value; setTableData(updatedTableData); - formRef.current.setFieldsValue({ - [`NewSellPrice${index}`]: value, - }); - const priceChangedProdList = [...priceChangedProducts]; - const prodIndex = priceChangedProdList?.findIndex(prod => prod?.InwardDtlId === updatedTableData[index]?.InwardDtlId); + const prodIndex = priceChangedProdList?.findIndex( + (prod) => prod?.InwardDtlId === updatedTableData[index]?.InwardDtlId + ); if (prodIndex !== -1) { - priceChangedProdList[prodIndex] = { - ...priceChangedProdList[prodIndex], - SellPrice: String(value) - }; - } else { - priceChangedProdList.push({ - ProdId: updatedTableData[index]?.ProdId, - ProdName: updatedTableData[index]?.ProdName, - MRP: String(updatedTableData[index]?.NewMRP || updatedTableData[index]?.MRP), - SellPrice: String(value), - AdjComment: "string", - InwardDtlId: updatedTableData[index]?.InwardDtlId - }); + priceChangedProdList.splice(prodIndex, 1); } - setPriceChangedProducts(priceChangedProdList); + return; + } } + if (!updatedTableData[index]?.NewMRP && updatedTableData[index]?.MRP) { + if (parseFloat(value) > parseFloat(updatedTableData[index]?.MRP)) { + setMessageType('error'); + setMessageData('New Sell Price cannot be greater than MRP'); + formRef.current.setFieldsValue({ + [`NewSellPrice${index}`]: null, + }); + updatedTableData[index].NewSellPrice = null; + setTableData(updatedTableData); + const priceChangedProdList = [...priceChangedProducts]; + const prodIndex = priceChangedProdList?.findIndex( + (prod) => prod?.InwardDtlId === updatedTableData[index]?.InwardDtlId + ); - const edit = (record, index) => { - console.log("edit", record, index); - setEditingKey(index); - } - - const handleSubmit = async () => { - console.log("submit"); - - if (priceChangedProducts?.length > 0) { - console.log("priceChangedProducts", priceChangedProducts); - const validation = priceChangedProducts?.every((prod) => { - if (parseFloat(prod?.MRP) < parseFloat(prod?.SellPrice)) { - setMessageType('error'); - setMessageData(`${prod?.ProdName}: MRP cannot be less than Sell Price`); - return false; - } - if (!parseFloat(prod?.SellPrice) || !parseFloat(prod?.MRP)) { - setMessageType('error'); - setMessageData(`${prod?.ProdName}: Please give Sell Price or MRP`); - return false; - } - return true; - }); - if (!validation) return; - - const data = { - AppId: AppId, - CompId: CompId, - BranchId: BranchId, - ProductDetails: priceChangedProducts, - UpdatedBy: UserId, - } - - const res = await dispatch(PutStockPrice(data))?.unwrap(); - if (res?.data?.statusCode === 1) { - setMessageData('Price Changed Successfully'); - setMessageType('success'); - setPriceChangeModal(false); - setProductPriceChange(false); - setEditingKey(null); - setPriceChangedProducts([]); - setTableData([]); - dispatch(triggerProductCard()) - setPriceChangeProduct(null); - formRef.current.resetFields(); - } else { - setMessageData('Error Updating Product Price') - setMessageType('error'); - } - } else { - setMessageType('error'); - setMessageData('No changes made / No sell price entered'); + if (prodIndex !== -1) { + priceChangedProdList.splice(prodIndex, 1); } + setPriceChangedProducts(priceChangedProdList); + return; + } + } + updatedTableData[index].NewSellPrice = value; + setTableData(updatedTableData); + formRef.current.setFieldsValue({ + [`NewSellPrice${index}`]: value, + }); + const priceChangedProdList = [...priceChangedProducts]; + const prodIndex = priceChangedProdList?.findIndex( + (prod) => prod?.InwardDtlId === updatedTableData[index]?.InwardDtlId + ); + + if (prodIndex !== -1) { + priceChangedProdList[prodIndex] = { + ...priceChangedProdList[prodIndex], + SellPrice: String(value), + }; + } else { + priceChangedProdList.push({ + ProdId: updatedTableData[index]?.ProdId, + ProdName: updatedTableData[index]?.ProdName, + MRP: String( + updatedTableData[index]?.NewMRP || updatedTableData[index]?.MRP + ), + SellPrice: String(value), + AdjComment: 'string', + InwardDtlId: updatedTableData[index]?.InwardDtlId, + }); } - const onComplete = useCallback(() => { - setMessageData(null); - setMessageType(null); - }, []) + setPriceChangedProducts(priceChangedProdList); + }; - return ( - <> + const edit = (record, index) => { + console.log('edit', record, index); + setEditingKey(index); + }; - - {showButton ? - - : <>} - { - setPriceChangeModal(false); - setProductPriceChange(false); - setEditingKey(null); - setPriceChangedProducts([]); - formRef?.current?.resetFields(); - setPriceChangeProduct(null); - setCurrentPage(1); - }} - handleSubmit={handleSubmit} + const handleSubmit = async () => { + console.log('submit'); + + if (priceChangedProducts?.length > 0) { + console.log('priceChangedProducts', priceChangedProducts); + const validation = priceChangedProducts?.every((prod) => { + if (parseFloat(prod?.MRP) < parseFloat(prod?.SellPrice)) { + setMessageType('error'); + setMessageData( + `${prod?.ProdName}: MRP cannot be less than Sell Price` + ); + return false; + } + if (!parseFloat(prod?.SellPrice) || !parseFloat(prod?.MRP)) { + setMessageType('error'); + setMessageData(`${prod?.ProdName}: Please give Sell Price or MRP`); + return false; + } + return true; + }); + if (!validation) return; + + const data = { + AppId: AppId, + CompId: CompId, + BranchId: BranchId, + ProductDetails: priceChangedProducts, + UpdatedBy: UserId, + }; + + const res = await dispatch(PutStockPrice(data))?.unwrap(); + if (res?.data?.statusCode === 1) { + setMessageData('Price Changed Successfully'); + setMessageType('success'); + setPriceChangeModal(false); + setProductPriceChange(false); + setEditingKey(null); + setPriceChangedProducts([]); + setTableData([]); + dispatch(triggerProductCard()); + setPriceChangeProduct(null); + formRef.current.resetFields(); + } else { + setMessageData('Error Updating Product Price'); + setMessageType('error'); + } + } else { + setMessageType('error'); + setMessageData('No changes made / No sell price entered'); + } + }; + + const onComplete = useCallback(() => { + setMessageData(null); + setMessageType(null); + }, []); + + return ( + <> + + {showButton ? ( + + + + ) : ( + <> + )} + { + setPriceChangeModal(false); + setProductPriceChange(false); + setEditingKey(null); + setPriceChangedProducts([]); + formRef?.current?.resetFields(); + setPriceChangeProduct(null); + setCurrentPage(1); + }} + handleSubmit={handleSubmit} + > +
+ {/*
Note : Click on a row to edit/modify
*/} +
+ ({ + onClick: () => { + edit(record, index); + }, + })} + /> +
-
- {/*
Note : Click on a row to edit/modify
*/} - - ({ - onClick: () => { - edit(record, index); - }, - })} - /> -
- setCurrentPage(page)} - showSizeChanger={false} - showTotal={(total, range) => `${range[0]}-${range[1]} of ${total} items`} - /> -
- -
- - - ) -} + setCurrentPage(page)} + showSizeChanger={false} + showTotal={(total, range) => + `${range[0]}-${range[1]} of ${total} items` + } + /> +
+ +
+
+ + ); +}; -export default ProductPriceChange; \ No newline at end of file +export default ProductPriceChange; diff --git a/src/Pages/BookingScreen/Template/BSLayout1/BSLayout1.jsx b/src/Pages/BookingScreen/Template/BSLayout1/BSLayout1.jsx index 09b10a3..3416a36 100644 --- a/src/Pages/BookingScreen/Template/BSLayout1/BSLayout1.jsx +++ b/src/Pages/BookingScreen/Template/BSLayout1/BSLayout1.jsx @@ -63,6 +63,7 @@ import TooltipWrapper from '../../../../Components/Tooltip/Tooltip.jsx'; import BookingCloseIcon from '../../Components/UtillComponents/BookingCloseIcon.jsx'; import BSEwayBillicon from '../../Components/UtillComponents/BSEwayBillicon.jsx'; import SAdminUserNotification from '../../Components/BookingFunctionality/SAdminUserNotification.jsx'; +import CardSkeleton from '../../../../Components/Skeleton/CardSkeleton.jsx'; // Jsx Files const BSKioskCounterPayment = lazy( () => import('../../Components/UtillComponents/BSKioskCounterPayment.jsx') @@ -320,7 +321,7 @@ const BSLayout1 = () => { }; // BSLayout1Data?.BookingNavbar?.[1]?.some((item) => item?.OptionName === "AddCustomer") return ( - Loading…
}> + }> {' '} <> import('../../Components/BSBillingTables/ListofInvoices/ListOfSalesInvoices.jsx') @@ -339,7 +340,7 @@ const BSLayout2 = () => { (AppExpDate?.RemainingDays <= 7 || AppExpDate === 'undefined' || AppExpDate?.PlanType?.toLowerCase() === 'extend') && ( - Loading...
}> + }> )} @@ -347,13 +348,12 @@ const BSLayout2 = () => { className="BSLayout2-Master" style={{ height: containerHeight, overflow: 'hidden' }} > - Loading...
}> -
- {BookingNavbar == 'Navbar1' && } - {BookingNavbar == 'Navbar2' && } - {BookingNavbar == 'Navbar3' && } -
- +
+ {BookingNavbar == 'Navbar1' && } + {BookingNavbar == 'Navbar2' && } + {BookingNavbar == 'Navbar3' && } +
+
import('../../Components/BSNavbar/BSNavbar1')); const BSNavbar2 = lazy(() => import('../../Components/BSNavbar/BSNavbar2')); // Scss import '../../../../Styles/BookingScreen/Template/BSLayout3/BSLayout3.scss'; +import CardSkeleton from '../../../../Components/Skeleton/CardSkeleton.jsx'; const subDirectory = import.meta.env.BASE_URL; const commonDirectory = import.meta.env.COMMON_BASE_URL; @@ -301,7 +302,7 @@ const BSLayout3 = () => { setListOfInvoices(false); }; return ( - Suspense Loading...
}> + }> <> { setBookingModalOpen(false); }; return ( - Loading...
}> + }> <> { const OrderStatus = useSelector(GlobalOrderStatus); const SessionData = useSelector(StoredSessionData); const badgeCount = useSelector(globalKioskSalesCount); - const [count, setcount] = useState(0); + const [count, setcount] = useState(0); const BookingStatus = useSelector(GlobalBookingStatus); const tableData = useSelector(GlobalOrderCardDetails); const CheckBookingStatus = @@ -154,12 +155,14 @@ const BSLayout5 = () => { const animations = ['example1', 'example2', 'example3']; let ss = animations[count]; let containerHeight = isMobile - ? AppExpDate?.RemainingDays <= 7 || AppExpDate?.PlanType?.toLowerCase() === 'extend' + ? AppExpDate?.RemainingDays <= 7 || + AppExpDate?.PlanType?.toLowerCase() === 'extend' ? '580px' : '590px' - : UserType != 'Super Admin' && - UserType != 'Super Admin User' && - AppExpDate?.RemainingDays <= 7 || AppExpDate?.PlanType?.toLowerCase() === 'extend' + : (UserType != 'Super Admin' && + UserType != 'Super Admin User' && + AppExpDate?.RemainingDays <= 7) || + AppExpDate?.PlanType?.toLowerCase() === 'extend' ? '96vh' : '99vh'; const [ListOfInvoices, setListOfInvoices] = useState(false); @@ -234,7 +237,6 @@ const BSLayout5 = () => { }; }, []); - const openModalKiosk = () => { setKioskopen(true); }; @@ -304,205 +306,208 @@ const BSLayout5 = () => { setBookingModalOpen(false); }; return ( - <> - - {UserType != 'Super Admin' && - UserType != 'Super Admin User' && - (AppExpDate?.RemainingDays <= 7 || AppExpDate === 'undefined' || AppExpDate?.PlanType?.toLowerCase() === 'extend') && ( - - )} -
-
- {BSLayout5Data?.BookingNavbar?.[0] == 'Navbar1' && } - {BSLayout5Data?.BookingNavbar?.[0] == 'Navbar2' && } - {BSLayout5Data?.BookingNavbar?.[0] == 'Navbar3' && } -
- + }> + <> + + {UserType != 'Super Admin' && + UserType != 'Super Admin User' && + (AppExpDate?.RemainingDays <= 7 || + AppExpDate === 'undefined' || + AppExpDate?.PlanType?.toLowerCase() === 'extend') && ( + + )}
- {BookingNavbar != 'Navbar3' ? ( -
-
- {UserType !== 'Employee' && ( -
- {PricingAppPricingName?.[0]?.PricingName + - ' / ' + - PricingAppPricingName?.[0]?.Type} -
- )} - {!OtherServicesglobal && ( - - )} +
+ {BSLayout5Data?.BookingNavbar?.[0] == 'Navbar1' && } + {BSLayout5Data?.BookingNavbar?.[0] == 'Navbar2' && } + {BSLayout5Data?.BookingNavbar?.[0] == 'Navbar3' && } +
- {!OtherServicesglobal && - SessionData?.FeatureAddonData?.FeatureDtls?.find( - (item) => - item?.FeatureAddonName?.toLowerCase() === 'kiosk sales' - ) && - !sportsAppPreference && ( -
0 ? 'none' : 'auto', - opacity: OrderStatus > 0 ? 0.5 : 1, - }} - > - - {''} - - openModalKiosk()} - style={{ cursor: 'pointer', fontSize: '1.5rem' }} - className="iconsize" - /> - - +
+ {BookingNavbar != 'Navbar3' ? ( +
+
+ {UserType !== 'Employee' && ( +
+ {PricingAppPricingName?.[0]?.PricingName + + ' / ' + + PricingAppPricingName?.[0]?.Type}
)} - {!OtherServicesglobal && ( - - {' '} - - - )} - {!OtherServicesglobal && Kioskopen && ( - - )} - {SAdminuserPin?.length > 0 && - UserType != 'Super Admin User' && ( -
- -
+ {!OtherServicesglobal && ( + )} - {!OtherServicesglobal && ( - <> - {' '} - {CheckBookingStatus == 'Open' ? ( -
- - {' '} - - {/* */} - -
- ) : ( -
- - BookingOpenFun('Open')} + + {!OtherServicesglobal && + SessionData?.FeatureAddonData?.FeatureDtls?.find( + (item) => + item?.FeatureAddonName?.toLowerCase() === 'kiosk sales' + ) && + !sportsAppPreference && ( +
0 ? 'none' : 'auto', + opacity: OrderStatus > 0 ? 0.5 : 1, + }} + > + + {''} + - - - - - + openModalKiosk()} + style={{ cursor: 'pointer', fontSize: '1.5rem' }} + className="iconsize" + /> + + +
+ )} + {!OtherServicesglobal && ( + + {' '} + + + )} + {!OtherServicesglobal && Kioskopen && ( + + )} + {SAdminuserPin?.length > 0 && + UserType != 'Super Admin User' && ( +
+ +
+ )} + {!OtherServicesglobal && ( + <> + {' '} + {CheckBookingStatus == 'Open' ? ( +
+ + {' '} + + {/* */} + +
+ ) : ( +
+ + BookingOpenFun('Open')} + > + + + + + +
+ )} + + )} + {!OtherServicesglobal && ( +
+ + {''} + + +
+ )} +
+
+ ) : ( + + )} + +
+
+ {action ? ( + + ) : ( + <> + {BookingBilling == 'Billing1' && } + {BookingBilling == 'Billing2' && } + {BookingBilling == 'Billing3' && } + {BookingBilling == 'Billing4' && } + {BookingBilling == 'Billing5' && } + {BookingBilling == 'Billing6' && } + {BookingBilling == 'Billing7' && } + {BookingBilling == 'Billing8' && } + {BookingBilling == 'StandardBilling' && ( +
+
)} )} - {!OtherServicesglobal && ( -
- - {''} - - -
- )} -
-
- ) : ( - - )} - -
-
- {action ? ( - - ) : ( - <> - {BookingBilling == 'Billing1' && } - {BookingBilling == 'Billing2' && } - {BookingBilling == 'Billing3' && } - {BookingBilling == 'Billing4' && } - {BookingBilling == 'Billing5' && } - {BookingBilling == 'Billing6' && } - {BookingBilling == 'Billing7' && } - {BookingBilling == 'Billing8' && } - {BookingBilling == 'StandardBilling' && ( -
- -
- )} - - )} - {/*
{ >
*/} -
- -
-
- {!OtherServicesglobal && ( - - )} - {OtherServicesglobal && ( - - )}
- {!OtherServicesglobal && Comboglobal === false && ( - - )} - {!OtherServicesglobal && Comboglobal === true && ( - - )} - {OtherServicesglobal && ( - - )} +
+ {!OtherServicesglobal && ( + + )} + {OtherServicesglobal && ( + + )} +
+ +
+ {!OtherServicesglobal && Comboglobal === false && ( + + )} + {!OtherServicesglobal && Comboglobal === true && ( + + )} + {OtherServicesglobal && ( + + )} +
-
- {BookingModalOpen && !OtherServicesglobal && ( - - )} - {ListOfInvoices && !OtherServicesglobal && ( - - )} - + {BookingModalOpen && !OtherServicesglobal && ( + + )} + {ListOfInvoices && !OtherServicesglobal && ( + + )} + + ); }; diff --git a/src/Pages/BookingScreen/Template/BSLayout6/BSLayout6.jsx b/src/Pages/BookingScreen/Template/BSLayout6/BSLayout6.jsx index 35a5afa..9df72ae 100644 --- a/src/Pages/BookingScreen/Template/BSLayout6/BSLayout6.jsx +++ b/src/Pages/BookingScreen/Template/BSLayout6/BSLayout6.jsx @@ -117,6 +117,7 @@ import SalesCountForStandard from '../SalesCountForStandard.jsx'; import StandardTable from '../../Components/BSBillingTables/StandardTable/StandardTable.jsx'; import ComboSalesBillTable from '../../Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.jsx'; import PlanExpireNotification from '../PlanExpireNotification.jsx'; +import CardSkeleton from '../../../../Components/Skeleton/CardSkeleton.jsx'; const BSLayout6 = () => { const dispatch = useDispatch(); const { action, selectedProducts } = useSelector( @@ -314,7 +315,7 @@ const BSLayout6 = () => { setBookingModalOpen(false); }; return ( - Loading components...
}> + }> <> { display: 'flex', alignItems: 'center', gap: '10px', - width: '180px', + width: '160px', }} > Loading... @@ -96,7 +96,7 @@ const BranchName = ({ IconStatus }) => { alignItems: 'center', gap: '10px', cursor: 'pointer', - width: '180px', + width: '160px', }} > { display: 'flex', alignItems: 'center', gap: '10px', - width: '180px', + width: '160px', }} > {!imageLoaded && ( diff --git a/src/Pages/EmpMaster/EmpMasterForm.jsx b/src/Pages/EmpMaster/EmpMasterForm.jsx index 56e6606..2ef020c 100644 --- a/src/Pages/EmpMaster/EmpMasterForm.jsx +++ b/src/Pages/EmpMaster/EmpMasterForm.jsx @@ -806,7 +806,7 @@ const EmployeeForm = ({ formType }) => { isOnchanges={formType == 'edit' ? true : false} valueData={selectedUserData} disabled={formType == 'edit' ? true : false} - // defaultValue={LastSelectConfig} + // defaultValue={LastSelectConfig} /> ) : null} @@ -920,7 +920,7 @@ const EmployeeForm = ({ formType }) => { disabled={true} isOnChange={ formRef.current?.getFieldsValue()?.MobileNo != - undefined + undefined ? true : false } @@ -969,8 +969,8 @@ const EmployeeForm = ({ formType }) => { {SelectedUserCreation === 'N' ? ( { addonBefore="Password" isOnChange={formType == 'edit' ? true : false} style={{ width: '250px' }} - // disabled={formType == "edit" ? true : false} + // disabled={formType == "edit" ? true : false} /> ) : null} @@ -1041,7 +1041,7 @@ const EmployeeForm = ({ formType }) => { onChangeFunction={(e) => EmpTypeDropDownChange(e)} isOnchanges={formType == 'edit' ? true : false} valueData={seletedEmpTypeDrop} - // defaultValue={LastSelectConfig} + // defaultValue={LastSelectConfig} /> {/* EmpDesig */} @@ -1068,7 +1068,7 @@ const EmployeeForm = ({ formType }) => { onChangeFunction={(e) => EmpDesigDropDownChange(e)} isOnchanges={formType == 'edit' ? true : false} valueData={seletedEmpDesigDrop} - // defaultValue={LastSelectConfig} + // defaultValue={LastSelectConfig} /> {/* EmpDept */} @@ -1095,7 +1095,7 @@ const EmployeeForm = ({ formType }) => { onChangeFunction={(e) => EmpDeptDropDownChange(e)} isOnchanges={formType == 'edit' ? true : false} valueData={seletedEmpDeptDrop} - // defaultValue={LastSelectConfig} + // defaultValue={LastSelectConfig} /> @@ -1124,7 +1124,7 @@ const EmployeeForm = ({ formType }) => { onChangeFunction={(e) => ShiftDropDownChange(e)} isOnchanges={formType == 'edit' ? true : false} valueData={seletedShiftDrop} - // defaultValue={LastSelectConfig} + // defaultValue={LastSelectConfig} /> @@ -1244,7 +1244,7 @@ const EmployeeForm = ({ formType }) => { formType === 'edit' ? editstate?.EmpPhotoLink : formRef.current?.getFieldsValue() - ?.UserImage || ImageUrl; + ?.UserImage || ImageUrl; // Always return a string return typeof link === 'string' ? link : ''; })()} @@ -1290,7 +1290,7 @@ const EmployeeForm = ({ formType }) => { // isOnChange={editstate?.Address1 ? true : false} isOnChange={ formRef.current?.getFieldsValue()?.Address1 != - undefined + undefined ? true : false } @@ -1329,7 +1329,7 @@ const EmployeeForm = ({ formType }) => { // isOnChange={editstate?.Address2 ? true : false} isOnChange={ formRef.current?.getFieldsValue()?.Address2 != - undefined + undefined ? true : false } @@ -1352,13 +1352,13 @@ const EmployeeForm = ({ formType }) => { { validator: (_, value) => (value || editstate?.Zip) && - value?.toString().length === 6 + value?.toString().length === 6 ? Promise.resolve() : editstate?.Zip?.toString().length === 6 ? Promise.resolve() : Promise.reject( - 'Please enter a 6-digit ZIP code' - ), + 'Please enter a 6-digit ZIP code' + ), }, ]} > @@ -1511,7 +1511,7 @@ const EmployeeForm = ({ formType }) => { isOnChange={ SelectedLatitude || (formRef.current?.getFieldsValue()?.Latitude != - undefined + undefined ? true : false) } @@ -1564,7 +1564,7 @@ const EmployeeForm = ({ formType }) => { isOnChange={ SelectedLatitude || (formRef.current?.getFieldsValue()?.Longitude != - undefined + undefined ? true : false) } @@ -1603,7 +1603,7 @@ const EmployeeForm = ({ formType }) => { } isOnChange={ formType == 'edit' || - fieldChangeMap['Description'] + fieldChangeMap['Description'] ? true : false } @@ -1620,7 +1620,7 @@ const EmployeeForm = ({ formType }) => { } isOnChange={ formType == 'edit' || - fieldChangeMap['Certification'] + fieldChangeMap['Certification'] ? true : false } @@ -1632,8 +1632,6 @@ const EmployeeForm = ({ formType }) => { length: Math.max(1, imageUrls.length), }).map((_, idx) => (
- -
{ prevlca={ editstate ? { - lat: editstate.Latitude, - lng: editstate.Longitude, - } + lat: editstate.Latitude, + lng: editstate.Longitude, + } : null } /> @@ -1717,7 +1715,7 @@ const EmployeeForm = ({ formType }) => { buttonText="SUBMIT" color="901D77" icon={} - // handleSubmit={handleSubmit} + // handleSubmit={handleSubmit} />
diff --git a/src/Pages/EmpMaster/EmpMasterList.jsx b/src/Pages/EmpMaster/EmpMasterList.jsx index 146dbff..38f1ebc 100644 --- a/src/Pages/EmpMaster/EmpMasterList.jsx +++ b/src/Pages/EmpMaster/EmpMasterList.jsx @@ -92,9 +92,11 @@ const EmployeeMaster = () => { } const gettingTableData = await dispatch(getshift(CompId)).unwrap(); if (gettingTableData?.data?.statusCode === 1) { - const activeEmployees = gettingTableData?.data?.data?.filter(emp => emp.ActiveStatus === "A"); + const activeEmployees = gettingTableData?.data?.data?.filter( + (emp) => emp.ActiveStatus === 'A' + ); - setShiftData(activeEmployees); + setShiftData(activeEmployees); } const gettingEmpDesgDropDown = await dispatch( EmpDesgDropDown({ AppId: AppId }) @@ -229,7 +231,9 @@ const EmployeeMaster = () => { String(record.EmpFirstName) ?.toLowerCase() ?.includes(value?.toLowerCase()) || - String(record.CompName)?.toLowerCase()?.includes(value?.toLowerCase()) || + String(record.CompName) + ?.toLowerCase() + ?.includes(value?.toLowerCase()) || String(record.BrName)?.toLowerCase()?.includes(value?.toLowerCase()) ); }, @@ -360,9 +364,8 @@ const EmployeeMaster = () => { setMessageData('Please Add Shift Details'); setMessageType('warning'); setTimeout(() => { - navigate(`${subDirectory}setting/shift-master`); - },1000); - + navigate(`${subDirectory}setting/shift-master`); + }, 1000); } } else { setMessageData('Please Add Designation Details'); diff --git a/src/Pages/ExtraCharges/ExtraChargesList.jsx b/src/Pages/ExtraCharges/ExtraChargesList.jsx index 4ef0244..469da00 100644 --- a/src/Pages/ExtraCharges/ExtraChargesList.jsx +++ b/src/Pages/ExtraCharges/ExtraChargesList.jsx @@ -31,6 +31,8 @@ import { getAdmin } from '../../Features/ProductPage/ProductPage.js'; import { useAuth } from '../../AuthContext.jsx'; import { getPreferenceData } from '../../Features/BookingScreen/BookingData/BookingData.js'; import Imageupload from '../../Components/Forms/Upload.jsx'; +// src\Styles\OverAllStyle\OverAllStyle.scss +import '../../Styles/OverAllStyle/OverAllStyle.scss'; const subDirectory = import.meta.env.ENV_BASE_URL; const items = [ @@ -453,7 +455,7 @@ function ExtraChargesList() { return allowDecimal ? num.toFixed(2) : Math.round(num).toString(); } return ( -
+
{ const [paymentModalOpen, setPaymentModalOpen] = useState(false); const getmobilepage = useSelector(GlobalPaymentgatewayRedirect); const appPreferences = useSelector(ApplicationPreferences); - const bookingTypePreference = appPreferences?.find((preference) => preference?.PreferredCatName === 'Booking Type')?.PreferenceCatDetails - const dinePreference = bookingTypePreference?.find((type) => type?.PreferredSubCatName?.toLowerCase() === "dine in" && type?.PreferredStatus === 'Y') + const bookingTypePreference = appPreferences?.find( + (preference) => preference?.PreferredCatName === 'Booking Type' + )?.PreferenceCatDetails; + const dinePreference = bookingTypePreference?.find( + (type) => + type?.PreferredSubCatName?.toLowerCase() === 'dine in' && + type?.PreferredStatus === 'Y' + ); const clicked = useSelector(GlobalOrderbtnClicked); const kioskTemplateData = props?.data; @@ -111,7 +117,7 @@ const KioskFooter2 = (props) => {
- {(KioskCurrentPage !== 'OrderView' && dinePreference) && ( + {KioskCurrentPage !== 'OrderView' && dinePreference && (
div { - // width: 25px !important; - // height: 35px !important; - // } .bs-membership__icon-btn { svg { color: #fbbf24; @@ -86,24 +75,11 @@ .BSBillingnav1-threedots { display: none; cursor: pointer; - //nk width: 1.7rem; - // margin-right: 1rem; color: var(--DEFAULT_SELECTED_COLOR); } -// .BSNavBar1-Accmenu { -// position: absolute; -// right: 0rem; -// width: 160px; -// top: 2rem; -// height: 80px; -// color: black; -// display: flex; -// justify-content: center; -// background-color: #f3f3f3; -// } .BSBillingNavBar1-smallscreen-Inputsearch-container { display: none; align-items: center; @@ -171,10 +147,6 @@ } } - // .custom-input { - // width: 53vw !important; - // } - .BSBillingNavBar1-Inputsearch { width: 50vw !important; height: 2rem; @@ -213,7 +185,6 @@ align-items: center; column-gap: 1rem; width: 100%; - // margin-left: 10px; } .BSNavbar1-timer { @@ -221,11 +192,6 @@ } } -// .BSBillingNavBar1-AllIcons-column { -// display: flex; -// flex-direction: column; -// row-gap: 1.5rem; -// } .BSBillingNavBar1-AllIcons-column { display: flex; flex-direction: column; @@ -322,13 +288,6 @@ text-wrap: nowrap; } -// .BSNavbar1-timer { -// width: 9vw; -// font-family: 'Gilroy'; -// font-weight: 600; -// color: #212529 !important; -// font-size: 2.7vh; -// } .BSBillingNavBar1-logo { display: flex; } @@ -343,8 +302,6 @@ .BSBillingNav1div2 .ant-input { width: max-content; - // height: 2rem; - // border-radius: 0; } .BSBillingNavBar1-Inputsearch { @@ -361,11 +318,6 @@ .BSBillingNavBar1-Inputsearch-container { transition: transform 0.5s; - //nk - // & .custom-input { - // // width: 23vw; - // width: 18vw; - // } } .BSBillingnav1-Smallscreen { @@ -383,7 +335,7 @@ } 50% { - transform: scale(1.2); + transform: scale(1.03) !important; } 100% { @@ -433,10 +385,6 @@ width: 6rem !important; } - // .favItem-SearchBar { - // width: 7.6rem; - // } - .AddFavItemList { padding: 0 !important; } @@ -444,7 +392,6 @@ @media (max-width: 600px) { .AddFavList { - // width: 50vw !important; padding: 2rem 1rem !important; } diff --git a/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar2.scss b/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar2.scss index 8d4ef10..93504fd 100644 --- a/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar2.scss +++ b/src/Styles/BookingScreen/Components/BSNavbar/BSNavbar2.scss @@ -6,8 +6,6 @@ padding: 0rem 1rem; box-shadow: var(--BOX_SHADOW_LEVEL2); background-color: #ffffff; - - // background-color: #ffffff; .RiVerifiedBadgeFill { color: #1292ee !important; } @@ -29,7 +27,6 @@ .BSBillingNavBar2-SearchBar { display: flex; height: 32px; - // border: 1px solid black; border-radius: 50px; } @@ -51,21 +48,6 @@ padding: 8px 16px; color: var(--DEFAULT_SELECTED_COLOR); } - -// .BSBillingNavBar2-SearchBar { -// display: flex; - -// border: 1px solid black; -// border-radius: 5px; -// } - -// .BSBillingNav2-search-icon { -// display: flex; -// align-items: center; -// border: 1px solid black; -// border-radius: 5px; -// padding: 1px; -// } .BSBillingNav2-toggle-icon { padding-left: 5px; font-size: 25px; @@ -79,7 +61,6 @@ .BSBillingNavBar2-AllIcons { display: flex; color: var(--DEFAULT_SELECTED_COLOR); - // column-gap: 1.5rem; } .BSBillingnav2-threedots { @@ -92,7 +73,6 @@ position: absolute; width: 33vw; top: 0; - // height: 90vh; height: 100vh; background-color: white; right: 2px; @@ -114,10 +94,6 @@ } .favsbmtbtn { - // position: fixed; - // bottom: 40px; - // right: 12px; - // vicky display: flex; justify-content: flex-end; align-items: flex-end; @@ -131,7 +107,6 @@ width: 100%; height: 40px; background-color: #fcfcfc; - // background-color: #fafafa; justify-content: space-between; border-radius: 6px; align-items: center; @@ -172,9 +147,9 @@ gap: 6px; flex-direction: column; padding: 10px 1rem; - font-family: 'Poppins'; + font-family: "Poppins"; - >div { + > div { width: 100%; font-size: 14px; display: flex; @@ -216,10 +191,6 @@ } @media (max-width: 499px) { - // .AddFavList .primary_Button { - // width: 6rem !important; - // } - .favItem-SearchBar { width: 7.6rem; } @@ -232,7 +203,6 @@ top: 17rem; width: 100vw !important; padding: 1rem 1rem !important; - // height: 100% !important; } .smallScreenclose { @@ -252,8 +222,6 @@ .fav-close { display: flex; justify-content: flex-end; - /* background-color: #ff4d4f; */ - /* color: #080808; */ border: none; border-radius: 5px; cursor: pointer; @@ -323,7 +291,6 @@ } .BSBillingNav2div2 .EstimateButton { - // margin: 0 5px; cursor: pointer; display: flex; align-items: center; @@ -404,7 +371,6 @@ top: 10px; } - .MultiSearchIconDiv2 { background-color: #1292ee; color: #ffffff !important; @@ -417,7 +383,6 @@ height: 32px; padding: 4px; - svg { font-size: 22px; width: 32px !important; @@ -425,4 +390,4 @@ display: flex; } -} \ No newline at end of file +} diff --git a/src/Styles/BookingScreen/Components/SelectionComponent/SelectionComponent.scss b/src/Styles/BookingScreen/Components/SelectionComponent/SelectionComponent.scss index 1cb2899..a73046f 100644 --- a/src/Styles/BookingScreen/Components/SelectionComponent/SelectionComponent.scss +++ b/src/Styles/BookingScreen/Components/SelectionComponent/SelectionComponent.scss @@ -1,7 +1,6 @@ .Selection-Component-Heading { color: #161a1e; - // text-align: center; - font-family: Gilroy-SemiBold; + font-family: "Gilroy-SemiBold"; font-size: 33px; font-style: normal; font-weight: 400; @@ -10,7 +9,7 @@ .Selection-Component-SubHeading { color: #4d4d4d; - font-family: Manrope; + font-family: "Poppins"; font-size: 12px; font-style: normal; font-weight: 400; @@ -20,10 +19,10 @@ .Selection-Component-selectheading { color: #000; - font-family: Manrope; + font-family: "Poppins"; font-size: 14px; font-style: normal; - font-weight: 600; + font-weight: 500; line-height: normal; display: flex; align-items: center; @@ -127,17 +126,6 @@ } } -// - -// .Selection-Component-OverallDiv{ -// padding:2rem 0 0 2rem; -// width:100%; -// } - -// .ant-modal .ant-modal-footer .ant-btn+.ant-btn:not(.ant-dropdown-trigger){ -// display: none -// } - .colorBtn { background-color: var(--PRIMARY_BUTTON_BG_COLOR); color: rgb(255, 255, 255); @@ -150,10 +138,6 @@ margin-top: 18px; } -// .ant-btn-default{ -// display: none; -// } - .Selection-Component-InputDiv { display: flex; flex-direction: row; @@ -165,6 +149,7 @@ background-color: #f2f9fd; transition: all 0.2s; margin-top: 12px; + font-family: "Poppins"; & .ant-form-item { margin-bottom: 0px !important; @@ -181,7 +166,11 @@ .Selection-Component-selectContainerDiv { display: flex; flex-direction: column; - // row-gap: 2rem; + .ant-checkbox-label { + font-family: "Poppins"; + font-weight: 400; + font-size: 12px; + } } .Selection-Component-SubDivContainer { @@ -391,7 +380,6 @@ > div { cursor: pointer; - // border-bottom: 1px solid #1292ee; color: #1292ee; margin: 4px 10px 4px 4px; } @@ -404,7 +392,6 @@ cursor: pointer; color: #ff0000; margin: 6px 10px 6px 4px; - // background-color: #ff00002b; border-radius: 4px; padding: 1px 6px; display: inline-flex; @@ -423,10 +410,8 @@ > div { cursor: pointer; - //border-bottom: 1px solid #1292ee; color: rgb(0, 126, 28); margin: 6px 10px 6px 4px; - // background-color: rgba(0, 126, 27, 0.181); padding: 1px 6px; border-radius: 4px; display: inline-flex; @@ -489,7 +474,6 @@ .addNewSalesFiledBTN { background-color: #2563eb; - // background-color: #1292ee; color: #fff !important; width: max-content; height: max-content; diff --git a/src/Styles/BookingScreen/Template/BSLayout2/BSLayout2.scss b/src/Styles/BookingScreen/Template/BSLayout2/BSLayout2.scss index ddb682c..45d029b 100644 --- a/src/Styles/BookingScreen/Template/BSLayout2/BSLayout2.scss +++ b/src/Styles/BookingScreen/Template/BSLayout2/BSLayout2.scss @@ -373,11 +373,12 @@ body { @media (max-width: 768px) { display: none; } + div { gap: 4px; display: flex; align-items: center; - justify-content: center; + justify-content: flex-start; } } diff --git a/src/Styles/DashBoard/RetailDashBoard.scss b/src/Styles/DashBoard/RetailDashBoard.scss index 5548c20..2465178 100644 --- a/src/Styles/DashBoard/RetailDashBoard.scss +++ b/src/Styles/DashBoard/RetailDashBoard.scss @@ -1577,6 +1577,7 @@ max-height: 14vh; overflow: scroll; border: 1px solid #eeeeee; + scrollbar-width: thin; } .notificationCenterTitle { diff --git a/src/Styles/Employee/EmpMaster.scss b/src/Styles/Employee/EmpMaster.scss index 9f0d13c..3ad497f 100644 --- a/src/Styles/Employee/EmpMaster.scss +++ b/src/Styles/Employee/EmpMaster.scss @@ -9,16 +9,13 @@ .MapDiv { position: relative; - //srinath height: 100%; - // height: 55%; flex-grow: 1; - // width: var(--INPUT_FIELD_WIDTH); overflow: hidden; border: none; } -.subinputForm .ant-input-affix-wrapper>input.ant-input { +.subinputForm .ant-input-affix-wrapper > input.ant-input { font-size: inherit; border: none; padding: 18px 14px 6px 1px !important; @@ -169,4 +166,11 @@ width: 100%; display: flex; justify-content: flex-end; -} \ No newline at end of file +} +@media (max-width: 768px) { + .ClassEmployeeMaster { + .searchAddDiv { + flex-wrap: wrap !important; + } + } +} diff --git a/src/Styles/OverAllStyle/OverAllStyle.scss b/src/Styles/OverAllStyle/OverAllStyle.scss index 7a77a0d..f28d105 100644 --- a/src/Styles/OverAllStyle/OverAllStyle.scss +++ b/src/Styles/OverAllStyle/OverAllStyle.scss @@ -215,10 +215,6 @@ } .address-type-section { - // padding: 12px; - // background-color: #f8fafc; - // border-radius: 8px; - // border: 1px solid #e2e8f0; .ant-checkbox-inner { height: 14px; width: 14px; @@ -259,28 +255,6 @@ border-radius: 4px; line-height: 1.3; - // &.address1 { - // border-left: 2px solid #d0c8ff; - // } - // &.address2 { - // border-left: 2px solid #d0c8ff; - // } - // &.zip { - // border-left: 2px solid #d0c8ff; - // } - // &.city { - // border-left: 2px solid #d0c8ff; - // } - // &.district { - // border-left: 2px solid #d0c8ff; - // } - // &.state { - // border-left: 2px solid #d0c8ff; - // } - // &.coordinates { - // border-left: 2px solid #d0c8ff; - // } - .labelCoordinates { font-size: 10px; color: #3b424d; @@ -339,7 +313,6 @@ .commonMaster-btn { .tertiary_Button { width: 40vw !important; - // font-size: 11px; } .primary_Button { @@ -350,7 +323,6 @@ .productMaster-input .primary_Button { width: 33.33vw !important; font-size: 13px; - // background-color: #f1c40f !important; } .subRowFlex { @@ -367,9 +339,6 @@ .searchAddDiv { font-size: 11px; - // .primary_Button { - // // width: 76.39vw !important; - // } .searchDiv { width: 76.39vw !important; @@ -381,12 +350,8 @@ } .subinputForm { - // width: 100%; display: flex; flex-direction: row !important; - // gap: 1rem; - // align-items: center; - // justify-content: flex-start; } .Counter-Category-mapping { @@ -413,7 +378,6 @@ } .commonMaster-btn { - // flex-direction: column; flex-wrap: wrap; height: unset !important; @@ -923,7 +887,7 @@ display: flex; flex-direction: row; gap: 1rem; - .ant-form-item{ + .ant-form-item { margin-bottom: 0 !important; } } @@ -1072,7 +1036,6 @@ table { height: 15mm; text-align: center; font-size: 6px; - //border:1px solid black; font-weight: bold; background-color: #fff; display: flex; @@ -1331,10 +1294,6 @@ table { } } - // .OverAllSticker8 { - // height: 149mm; - // } - .Sticker8 { display: flex; justify-content: space-between; @@ -1610,7 +1569,6 @@ table { width: 100%; } - // Sree .component-table-purchae { display: flex; @@ -1645,7 +1603,6 @@ table { background-color: #fafafa; } - .userPageContent { .wspreorder-input1 { display: flex; @@ -1668,4 +1625,12 @@ table { color: white; } } -} \ No newline at end of file +} + +@media (max-width: 768px) { + .ClassExtraChargesList { + .searchAddDiv { + flex-wrap: wrap !important; + } + } +}