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

@@ -1,3 +1,4 @@
import { ScheduleFilled } from "@ant-design/icons";
import { Card } from "antd";
import BackIcon from "components/Icons/BackIcon";
import BookingIcon from "components/Icons/BookingIcon";
@@ -10,11 +11,11 @@ import ToOfficeIcon from "components/Icons/ToOfficeIcon";
import ToRoomIcon from "components/Icons/ToRoomIcon";
import ProTitle from "components/ProTitle";
import { updateOrderType } from "features/order/orderSlice";
import { OrderType } from "pages/checkout/hooks/types.ts";
import { useTranslation } from "react-i18next";
import { Link, useParams } from "react-router-dom";
import { useAppDispatch, useAppSelector } from "redux/hooks";
import styles from "./restaurant.module.css";
import { OrderType } from "pages/checkout/hooks/types.ts";
interface RestaurantServicesProps {
dineIn?: boolean;
@@ -145,6 +146,21 @@ export default function RestaurantServices({
},
]) ||
[]),
...((true && [
{
id: OrderType.ScheduledOrder,
title: t("common.scheduledOrder"),
description: t("home.services.scheduledOrder"),
icon: (
<ScheduleFilled
className={styles.serviceIcon + " " + styles.scheduledOrderIcon}
/>
),
color: "bg-indigo-50 text-indigo-600",
href: `/${id}/menu?orderType=${OrderType.ScheduledOrder}`,
},
]) ||
[]),
];
// Determine grid class based on number of services