translations & don't open product details BM if restaurant is closed

This commit is contained in:
2026-01-14 17:00:25 +03:00
parent 179bca3e9f
commit 4fb03a287e
4 changed files with 16 additions and 10 deletions

View File

@@ -168,7 +168,9 @@
"customizable": "قابل للتخصيص", "customizable": "قابل للتخصيص",
"youHaveXEarnedRewardsReadyToRedeem": "🎉 لديك {{rewards}} مكافأة مستحقة للاستخدام!", "youHaveXEarnedRewardsReadyToRedeem": "🎉 لديك {{rewards}} مكافأة مستحقة للاستخدام!",
"justXMorePurchasesToUnlockYourFREEItem": "فقط {{cups}} أكثر للفتح الوجبة المجانية!", "justXMorePurchasesToUnlockYourFREEItem": "فقط {{cups}} أكثر للفتح الوجبة المجانية!",
"youreJustXCupsAwayFromYourNextReward": "🎉 أنت فقط {{cups}} أكثر للحصول على المكافأة التالية!" "youreJustXCupsAwayFromYourNextReward": "🎉 أنت فقط {{cups}} أكثر للحصول على المكافأة التالية!",
"callWaiter": "اتصل بالرادير",
"balance": "الرصيد"
}, },
"cart": { "cart": {
"addSpecialRequestOptional": "إضافة طلب خاص (اختياري)", "addSpecialRequestOptional": "إضافة طلب خاص (اختياري)",

View File

@@ -180,7 +180,9 @@
"customizable": "Customizable", "customizable": "Customizable",
"youHaveXEarnedRewardsReadyToRedeem": "🎉 You have {{rewards}} rewards ready to redeem!", "youHaveXEarnedRewardsReadyToRedeem": "🎉 You have {{rewards}} rewards ready to redeem!",
"justXMorePurchasesToUnlockYourFREEItem": "Just {{cups}} more purchases to unlock your FREE item!", "justXMorePurchasesToUnlockYourFREEItem": "Just {{cups}} more purchases to unlock your FREE item!",
"youreJustXCupsAwayFromYourNextReward": "🎉 You're just {{cups}} stamps away from your next reward!" "youreJustXCupsAwayFromYourNextReward": "🎉 You're just {{cups}} stamps away from your next reward!",
"callWaiter": "Call Waiter",
"balance": "Balance"
}, },
"cart": { "cart": {
"remainingToPay": "Remaining to Pay", "remainingToPay": "Remaining to Pay",

View File

@@ -19,7 +19,7 @@ type Props = {
export default function ProductCard({ item, setIsBottomSheetOpen }: Props) { export default function ProductCard({ item, setIsBottomSheetOpen }: Props) {
const { isRTL } = useAppSelector((state) => state.locale); const { isRTL } = useAppSelector((state) => state.locale);
const { isMobile, isTablet, isDesktop } = useBreakPoint(); const { isMobile, isTablet, isDesktop } = useBreakPoint();
const { items } = useAppSelector((state) => state.order); const { items, restaurant } = useAppSelector((state) => state.order);
const [isDialogOpen, setIsDialogOpen] = useState(false); const [isDialogOpen, setIsDialogOpen] = useState(false);
// const navigate = useNavigate(); // const navigate = useNavigate();
// const { subdomain } = useParams(); // const { subdomain } = useParams();
@@ -37,10 +37,7 @@ export default function ProductCard({ item, setIsBottomSheetOpen }: Props) {
if (isDesktop) { if (isDesktop) {
setIsDialogOpen(true); setIsDialogOpen(true);
} }
setIsBottomSheetOpen(true); if (restaurant?.isOpened) setIsBottomSheetOpen(true);
// else {
// navigate(`/${subdomain}/product/${item.id}`);
// }
}; };
const hasOptions = const hasOptions =

View File

@@ -125,8 +125,13 @@ function MenuPage() {
{orderType === OrderType.Redeem && ( {orderType === OrderType.Redeem && (
<div className={styles.frame}> <div className={styles.frame}>
<div className={styles.div}> <div className={styles.div}>
<div className={styles.pickup}>Balance</div> <div className={styles.pickup}>{t("menu.balance")}</div>
<div className={styles.elementMin}>60 OMR</div> <div className={styles.elementMin}>
60{" "}
{isRTL
? restaurant?.local_currency
: restaurant?.global_currency}
</div>
</div> </div>
</div> </div>
)} )}
@@ -209,7 +214,7 @@ function MenuPage() {
color: "#09237D", color: "#09237D",
}} }}
> >
Call Waiter {t("menu.callWaiter")}
</ProText> </ProText>
</Button> </Button>