add rate feature to orders page & enhance menu page

This commit is contained in:
2025-12-30 01:22:49 +03:00
parent 0edd13f2fb
commit a64f92d1fd
10 changed files with 218 additions and 33 deletions

View File

@@ -298,3 +298,9 @@
margin-bottom: 16px;
box-shadow: none;
}
.profileImage {
border-radius: 50%;
width: 50px;
height: 50px;
}

View File

@@ -1,4 +1,4 @@
import { Button, Card, Divider } from "antd";
import { Button, Card, Divider, Image } from "antd";
import EmptyOrdersIcon from "components/Icons/EmptyOrdersIcon";
import RateIcon from "components/Icons/RateIcon";
import ReOrderIcon from "components/Icons/ReOrderIcon";
@@ -85,6 +85,8 @@ export default function OrdersList() {
};
};
console.log(orders);
return (
<>
{orders.length === 0 ? (
@@ -124,15 +126,13 @@ export default function OrdersList() {
gap: "1rem",
}}
>
<Button
type="text"
shape="circle"
style={{
backgroundColor: "rgba(255, 183, 0, 0.08)",
}}
>
{order.restaurant_name[0]}
</Button>
<Image
src={order.restaurant_icon}
className={styles.profileImage}
width={50}
height={50}
preview={false}
/>
<div
style={{ display: "flex", flexDirection: "column", gap: 8 }}
>

View File

@@ -81,3 +81,9 @@
margin-bottom: 16px;
box-shadow: none;
}
.profileImage {
border-radius: 50%;
width: 50px;
height: 50px;
}

View File

@@ -16,6 +16,7 @@ import { Link, useParams } from "react-router-dom";
import { useGetRestaurantDetailsQuery } from "redux/api/others";
import { useAppDispatch, useAppSelector } from "redux/hooks";
import styles from "./restaurant.module.css";
import ScheduleOrderIcon from "components/Icons/ScheduleOrderIcon";
export default function RestaurantServices() {
const { t } = useTranslation();
@@ -149,7 +150,7 @@ export default function RestaurantServices() {
title: t("common.scheduledOrder"),
description: t("home.services.scheduledOrder"),
icon: (
<ScheduleFilled
<ScheduleOrderIcon
className={styles.serviceIcon + " " + styles.scheduledOrderIcon}
/>
),
@@ -220,9 +221,11 @@ export default function RestaurantServices() {
<ProTitle
level={5}
style={{
margin: 0,
fontWeight: 500,
fontSize: 14,
fontWeight: 600,
lineHeight: "140%",
letterSpacing: "0%",
verticalAlign: "middle",
}}
>
{s?.title}

View File

@@ -39,10 +39,9 @@ export default function RestaurantPage() {
const dispatch = useAppDispatch();
const { t } = useTranslation();
const param = useParams();
const { isMobile } = useBreakPoint();
const [searchParams] = useSearchParams();
const { pathname } = useLocation();
const { orderType, items: cartItems } = useAppSelector(
const { orderType } = useAppSelector(
(state) => state.order,
);
const { isRTL } = useAppSelector((state) => state.locale);
@@ -54,10 +53,10 @@ export default function RestaurantPage() {
);
const [isOrderDetailsOpen, setIsOrderDetailsOpen] = useState(false);
const { containerRef, handleTouchEnd, handleTouchStart } = useSwipeUp({
swipeAction: () => setIsOrderDetailsOpen(true),
isEnabled: isMobile && cartItems.length > 0,
});
// const { containerRef, handleTouchEnd, handleTouchStart } = useSwipeUp({
// swipeAction: () => setIsOrderDetailsOpen(true),
// isEnabled: isMobile && cartItems.length > 0,
// });
// Automatically load restaurant taxes when restaurant data is available
useRestaurant(restaurant);
@@ -107,7 +106,7 @@ export default function RestaurantPage() {
</div>
<RestaurantServices />
<div
{/* <div
ref={containerRef}
onTouchStart={handleTouchStart}
onTouchEnd={handleTouchEnd}
@@ -115,7 +114,7 @@ export default function RestaurantPage() {
<div className={styles.promotionContainer}>
<Ads1 />
</div>
</div>
</div> */}
<div className={styles.socialIconsContainer}>
<Link to={`https://www.instagram.com/${restaurant?.instagram}`}>
<InstagramIcon className={styles.socialIcon} />

View File

@@ -50,7 +50,10 @@
row-gap: 10px;
transition: all 0.3s ease;
border-radius: 50px;
background-color: rgba(255, 183, 0, 0.12);
border: 1px solid #f5f5f6;
/* background-color: rgba(255, 183, 0, 0.12); */
box-shadow: 0px 70px 20px 0px #c9c9c900;
}
.logo {
@@ -103,12 +106,12 @@
gap: 20px;
width: 100%;
z-index: 10;
margin-top: 8px;
margin-top: 19px;
}
.socialIcon {
width: 24px;
height: 24px;
width: 32px;
height: 32px;
transition: all 0.3s ease;
}