implement scheduled order type

This commit is contained in:
2025-10-29 20:41:26 +03:00
parent 144cfa3f3a
commit ab5d0da47e
18 changed files with 219 additions and 82 deletions

View File

@@ -25,12 +25,13 @@ import useBreakPoint from "hooks/useBreakPoint.ts";
import CarPlateCard from "pages/cart/components/CarPlateCard.tsx";
import CartFooter from "pages/cart/components/cartFooter/CartFooter.tsx";
import CouponCard from "pages/cart/components/CouponCard.tsx";
import DateCard from "pages/cart/components/DateCard.tsx";
import RewardWaiterCard from "pages/cart/components/RewardWaiterCard.tsx";
import SpecialRequestCard from "pages/cart/components/specialRequest/SpecialRequestCard.tsx";
import TableNumberCard from "pages/cart/components/TableNumberCard.tsx";
import TimeEstimateCard from "pages/cart/components/timeEstimate/TimeEstimateCard.tsx";
import { useTranslation } from "react-i18next";
import { OrderType } from "pages/checkout/hooks/types";
import { useTranslation } from "react-i18next";
interface CartMobileTabletLayoutProps {
form: FormInstance;
@@ -58,6 +59,7 @@ export default function CartMobileTabletLayout({
height: 120,
};
};
return (
<>
<ProHeader>{t("cart.title")}</ProHeader>
@@ -225,11 +227,15 @@ export default function CartMobileTabletLayout({
<CouponCard />
{/* Car Plate*/}
{orderType === OrderType.Pickup && <CarPlateCard />}
{(orderType === OrderType.Pickup ||
orderType === OrderType.ScheduledOrder) && <CarPlateCard />}
{/* Estimate Time */}
{(orderType === OrderType.Delivery ||
orderType === OrderType.Pickup) && <TimeEstimateCard />}
orderType === OrderType.Pickup ||
orderType === OrderType.ScheduledOrder) && <TimeEstimateCard />}
{orderType === OrderType.ScheduledOrder && <DateCard form={form} />}
{/* Collection Method */}
{orderType === OrderType.Pickup && (