diff --git a/src/pages/cart/components/CarPlateCard.tsx b/src/pages/cart/components/CarPlateCard.tsx
new file mode 100644
index 0000000..4cc5cdf
--- /dev/null
+++ b/src/pages/cart/components/CarPlateCard.tsx
@@ -0,0 +1,19 @@
+import { Input } from "antd";
+import ProInputCard from "components/ProInputCard/ProInputCard.tsx";
+import { useTranslation } from "react-i18next";
+
+export default function CarPlateCard() {
+ const { t } = useTranslation();
+ return (
+ <>
+
+
+
+ >
+ );
+}
diff --git a/src/pages/cart/components/CartDesktopLayout.tsx b/src/pages/cart/components/CartDesktopLayout.tsx
index 4d781d3..f69ffa4 100644
--- a/src/pages/cart/components/CartDesktopLayout.tsx
+++ b/src/pages/cart/components/CartDesktopLayout.tsx
@@ -1,7 +1,7 @@
import styles from "pages/cart/cart.module.css";
-import { Row, Col, Button, Card, Divider, Space, message } from "antd";
+import { Row, Col, Button, Card, Divider, Space } from "antd";
import ProTitle from "components/ProTitle.tsx";
-import { colors, ProBlack2 } from "ThemeConstants.ts";
+import { colors } from "ThemeConstants.ts";
import ProText from "components/ProText.tsx";
import EmptyOrdersIcon from "components/Icons/EmptyOrdersIcon.tsx";
import { Link } from "react-router-dom";
@@ -10,45 +10,28 @@ import ArabicPrice from "components/ArabicPrice";
import CartActionsButtons from "components/CartActionsButtons/CartActionsButtons.tsx";
import { CartItem } from "utils/types/appTypes.ts";
import ProInputCard from "components/ProInputCard/ProInputCard.tsx";
-import { EditOutlined } from "@ant-design/icons";
-import DonateHandIcon from "components/Icons/cart/DonateHandIcon.tsx";
import ProInModalMultiSelect from "components/ProSelect/ProInModalMultiSelect.tsx";
import {
updateTables,
removeTable,
selectCart,
selectCartTotal,
- updateTip,
} from "features/order/orderSlice.ts";
-import { TipDialog } from "components/CustomBottomSheet/TipDialog.tsx";
import { useTranslation } from "react-i18next";
-import { useAppSelector, useAppDispatch } from "redux/hooks.ts";
-import { useState } from "react";
+import { useAppSelector } from "redux/hooks.ts";
import { getTableOptions } from "pages/cart/page.tsx";
import SpecialRequestCard from "pages/cart/components/SpecialRequestCard.tsx";
import CouponCard from "pages/cart/components/CouponCard.tsx";
+import RewardWaiterCard from "pages/cart/components/RewardWaiterCard.tsx";
export default function CartDesktopLayout() {
const { t } = useTranslation();
- const dispatch = useAppDispatch();
- const { themeName } = useAppSelector((state) => state.theme);
- const { items, tip, tables } = useAppSelector(selectCart);
+ const { items, tables } = useAppSelector(selectCart);
const subtotal = useAppSelector(selectCartTotal);
const tax = subtotal * 0.1; // 10% tax
const total = subtotal + tax;
- const [isTipOpen, setIsTipOpen] = useState(false);
-
- const handleTipSave = (value: string) => {
- dispatch(updateTip(value));
- message.success(t("cart.tip") + " " + t("updatedSuccessfully"));
- };
-
- const handleTipClose = () => {
- setIsTipOpen(false);
- };
-
return (
<>
@@ -201,63 +184,12 @@ export default function CartDesktopLayout() {
>
-
- {/* Reward Your Waiter */}
-
-
-
-
-
-
-
{t("rewardYourWaiter")}
-
{t("rewardYourWaiter100")}
-
-
-
-
-
-
-
-
-
-
-
+
+
{/* Table Number */}
-
- {/* Desktop Dialogs */}
-
-
>
);
}
diff --git a/src/pages/cart/components/CartMobileTabletLayout.tsx b/src/pages/cart/components/CartMobileTabletLayout.tsx
index fa0f8cb..e515251 100644
--- a/src/pages/cart/components/CartMobileTabletLayout.tsx
+++ b/src/pages/cart/components/CartMobileTabletLayout.tsx
@@ -1,6 +1,6 @@
import ProHeader from "components/ProHeader/ProHeader.tsx";
import styles from "pages/cart/cart.module.css";
-import { Space, Card, Divider, Input, Button, message } from "antd";
+import { Space, Card, Divider, Button, message } from "antd";
import ProTitle from "components/ProTitle.tsx";
import { Link, useParams } from "react-router-dom";
import { colors, ProBlack2 } from "ThemeConstants.ts";
@@ -16,15 +16,12 @@ import {
updateCollectionMethod,
updateTables,
removeTable,
- updateTip,
updateEstimateTime,
selectCart,
} from "features/order/orderSlice.ts";
-import DonateHandIcon from "components/Icons/cart/DonateHandIcon.tsx";
-import EditIcon from "components/Icons/EditIcon.tsx";
+
import ProInModalMultiSelect from "components/ProSelect/ProInModalMultiSelect.tsx";
import OrderSummary from "components/OrderSummary/OrderSummary.tsx";
-import { TipBottomSheet } from "components/CustomBottomSheet/TipBottomSheet.tsx";
import { EstimateTimeBottomSheet } from "components/CustomBottomSheet/EstimateTimeBottomSheet.tsx";
import { getTableOptions } from "pages/cart/page.tsx";
import { useAppSelector, useAppDispatch } from "redux/hooks.ts";
@@ -33,11 +30,13 @@ import { useTranslation } from "react-i18next";
import SpecialRequestCard from "pages/cart/components/SpecialRequestCard.tsx";
import useBreakPoint from "hooks/useBreakPoint.ts";
import CouponCard from "pages/cart/components/CouponCard.tsx";
+import RewardWaiterCard from "pages/cart/components/RewardWaiterCard.tsx";
+import CarPlateCard from "pages/cart/components/CarPlateCard.tsx";
export default function CartMobileTabletLayout() {
const { t } = useTranslation();
const dispatch = useAppDispatch();
- const { items, tip, tables, estimateTimeDate, collectionMethod } =
+ const { items, tables, estimateTimeDate, collectionMethod } =
useAppSelector(selectCart);
const { id } = useParams();
@@ -50,16 +49,6 @@ export default function CartMobileTabletLayout() {
const [estimateWay, setEstimateWay] = useState("now");
const [isEstimateTimeOpen, setIsEstimateTimeOpen] = useState(false);
- const [isTipOpen, setIsTipOpen] = useState(false);
-
- const handleTipSave = (value: string) => {
- dispatch(updateTip(value));
- message.success(t("cart.tip") + " " + t("updatedSuccessfully"));
- };
-
- const handleTipClose = () => {
- setIsTipOpen(false);
- };
const handleEstimateTimeSave = (date: Date, time: string) => {
dispatch(updateEstimateTime({ date, time }));
@@ -249,16 +238,7 @@ export default function CartMobileTabletLayout() {
{/* Car Plate*/}
- {orderType === "pickup" && (
-
-
-
- )}
+ {orderType === "pickup" && }
{/* Estimate Time */}
{(orderType === "delivery" || orderType === "pickup") && (
@@ -307,88 +287,7 @@ export default function CartMobileTabletLayout() {
)}
{/* Reward Your Waiter */}
-
-
-
-
-
-
-
- {t("cart.rewardYourWaiter")}
-
-
- {t("cart.rewardYourWaiter100")}
-
-
-
-
-
-
-
-
-
-
+
{/* Table Number */}
{orderType === "dine-in" && (
@@ -481,13 +380,6 @@ export default function CartMobileTabletLayout() {
{/* Mobile/Tablet Bottom Sheets */}
-
-
{
+ dispatch(updateTip(value));
+ message.success(t("cart.tip") + " " + t("updatedSuccessfully"));
+ };
+
+ const handleTipClose = () => {
+ setIsTipOpen(false);
+ };
+ return (
+ <>
+
+
+
+
+
+
+
+ {t("cart.rewardYourWaiter")}
+
+
+ {t("cart.rewardYourWaiter100")}
+
+
+
+
+
+
+
+
+
+
+ {isDesktop ? (
+
+ ) : (
+
+ )}
+ >
+ );
+}