Compare commits
2 Commits
41605781f4
...
6bf4cb6399
| Author | SHA1 | Date | |
|---|---|---|---|
| 6bf4cb6399 | |||
| a0e558d416 |
@@ -196,6 +196,12 @@
|
|||||||
"cancel": "إلغاء",
|
"cancel": "إلغاء",
|
||||||
"success": "تم حذف العنصر من سلة المشتريات"
|
"success": "تم حذف العنصر من سلة المشتريات"
|
||||||
},
|
},
|
||||||
|
"clearCartConfirmation": {
|
||||||
|
"title": "مسح السلة",
|
||||||
|
"content": "هل أنت متأكد أنك تريد مسح السلة؟",
|
||||||
|
"confirm": "مسح",
|
||||||
|
"cancel": "إلغاء"
|
||||||
|
},
|
||||||
"quantity": "الكمية",
|
"quantity": "الكمية",
|
||||||
"price": "السعر",
|
"price": "السعر",
|
||||||
"perItem": "للقطعة",
|
"perItem": "للقطعة",
|
||||||
|
|||||||
@@ -213,6 +213,12 @@
|
|||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"success": ",Item removed from cart"
|
"success": ",Item removed from cart"
|
||||||
},
|
},
|
||||||
|
"clearCartConfirmation": {
|
||||||
|
"title": "Clear Cart",
|
||||||
|
"content": "Are you sure you want to clear the cart?",
|
||||||
|
"confirm": "Clear",
|
||||||
|
"cancel": "Cancel"
|
||||||
|
},
|
||||||
"quantity": "Quantity",
|
"quantity": "Quantity",
|
||||||
"price": "Price",
|
"price": "Price",
|
||||||
"perItem": "Per Item",
|
"perItem": "Per Item",
|
||||||
|
|||||||
@@ -26,9 +26,7 @@ export default function OrderSummary() {
|
|||||||
const { subdomain } = useParams();
|
const { subdomain } = useParams();
|
||||||
const { data: restaurant } = useGetRestaurantDetailsQuery(subdomain);
|
const { data: restaurant } = useGetRestaurantDetailsQuery(subdomain);
|
||||||
const { orderType, tip } = useAppSelector(selectCart);
|
const { orderType, tip } = useAppSelector(selectCart);
|
||||||
const dispatch = useAppDispatch();
|
|
||||||
const subtotal = useAppSelector(selectCartTotal);
|
const subtotal = useAppSelector(selectCartTotal);
|
||||||
const loyaltyValidation = useAppSelector(selectLoyaltyValidation);
|
|
||||||
const highestLoyaltyItem = useAppSelector(selectHighestPricedLoyaltyItem);
|
const highestLoyaltyItem = useAppSelector(selectHighestPricedLoyaltyItem);
|
||||||
const taxAmount = useAppSelector(selectTaxAmount);
|
const taxAmount = useAppSelector(selectTaxAmount);
|
||||||
const grandTotal = useAppSelector(selectGrandTotal);
|
const grandTotal = useAppSelector(selectGrandTotal);
|
||||||
@@ -125,7 +123,7 @@ export default function OrderSummary() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{orderType !== OrderType.Redeem && (
|
{/* {orderType !== OrderType.Redeem && (
|
||||||
<div className={styles.summaryRow}>
|
<div className={styles.summaryRow}>
|
||||||
<ProText type="secondary" style={titlesStyle}>
|
<ProText type="secondary" style={titlesStyle}>
|
||||||
{t("cart.tip")}
|
{t("cart.tip")}
|
||||||
@@ -135,7 +133,7 @@ export default function OrderSummary() {
|
|||||||
textStyle={{ ...titlesStyle, color: "#434E5C" }}
|
textStyle={{ ...titlesStyle, color: "#434E5C" }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)} */}
|
||||||
{orderType === OrderType.Redeem && (
|
{orderType === OrderType.Redeem && (
|
||||||
<div className={styles.summaryRow}>
|
<div className={styles.summaryRow}>
|
||||||
<ProText type="secondary" style={titlesStyle}>
|
<ProText type="secondary" style={titlesStyle}>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Card, Divider, Space, Layout, Button } from "antd";
|
import { Card, Divider, Space, Layout, Button, Popconfirm } from "antd";
|
||||||
import ArabicPrice from "components/ArabicPrice";
|
import ArabicPrice from "components/ArabicPrice";
|
||||||
import CartActionsButtons from "components/CartActionsButtons/CartActionsButtons.tsx";
|
import CartActionsButtons from "components/CartActionsButtons/CartActionsButtons.tsx";
|
||||||
import ImageWithFallback from "components/ImageWithFallback";
|
import ImageWithFallback from "components/ImageWithFallback";
|
||||||
@@ -101,6 +101,17 @@ export default function CartMobileTabletLayout({
|
|||||||
</ProTitle>
|
</ProTitle>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<Popconfirm
|
||||||
|
title={t("cart.clearCartConfirmation.title")}
|
||||||
|
description={t("cart.clearCartConfirmation.content")}
|
||||||
|
onConfirm={() => {
|
||||||
|
dispatch(clearCart());
|
||||||
|
}}
|
||||||
|
okText={t("cart.clearCartConfirmation.confirm")}
|
||||||
|
cancelText={t("cart.clearCartConfirmation.cancel")}
|
||||||
|
okButtonProps={{ danger: true }}
|
||||||
|
placement={isRTL ? "left" : "right"}
|
||||||
|
>
|
||||||
<Button
|
<Button
|
||||||
shape="circle"
|
shape="circle"
|
||||||
iconPlacement="start"
|
iconPlacement="start"
|
||||||
@@ -118,10 +129,8 @@ export default function CartMobileTabletLayout({
|
|||||||
height: 32,
|
height: 32,
|
||||||
border: "1px solid #DEDEE0",
|
border: "1px solid #DEDEE0",
|
||||||
}}
|
}}
|
||||||
onClick={() => {
|
|
||||||
dispatch(clearCart());
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{items.length >= 1 && (
|
{items.length >= 1 && (
|
||||||
|
|||||||
@@ -126,9 +126,9 @@ export default function CheckoutPage() {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Reward Your Waiter */}
|
{/* Reward Your Waiter */}
|
||||||
{orderType !== OrderType.Redeem && orderType !== OrderType.Gift && (
|
{/* {orderType !== OrderType.Redeem && orderType !== OrderType.Gift && (
|
||||||
<RewardWaiterCard />
|
<RewardWaiterCard />
|
||||||
)}
|
)} */}
|
||||||
{orderType !== OrderType.Redeem && orderType !== OrderType.Gift && (
|
{orderType !== OrderType.Redeem && orderType !== OrderType.Gift && (
|
||||||
<EarnLoyaltyPointsCard />
|
<EarnLoyaltyPointsCard />
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user