implement scheduled order type
This commit is contained in:
@@ -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 && (
|
||||
|
||||
Reference in New Issue
Block a user