fixes
This commit is contained in:
@@ -238,7 +238,12 @@
|
|||||||
"pleaseAddLoyaltyItems": "يرجى إضافة عناصر ولاء إلى سلة المشتريات لاستخدام نقاط الولاء",
|
"pleaseAddLoyaltyItems": "يرجى إضافة عناصر ولاء إلى سلة المشتريات لاستخدام نقاط الولاء",
|
||||||
"loyaltyDiscountApplied": "تم تطبيق خصم الولاء: {{itemName}} (خصم {{amount}})",
|
"loyaltyDiscountApplied": "تم تطبيق خصم الولاء: {{itemName}} (خصم {{amount}})",
|
||||||
"deliveryFee": "رسوم التوصيل",
|
"deliveryFee": "رسوم التوصيل",
|
||||||
"scheduledDate": "تاريخ الطلب المجدول"
|
"scheduledDate": "تاريخ الطلب المجدول",
|
||||||
|
"couponApplied": "تم تطبيق القسيمة بنجاح",
|
||||||
|
"couponInvalid": "رمز القسيمة غير صالح",
|
||||||
|
"couponExpired": "رمز القسيمة منتهي الصلاحية",
|
||||||
|
"couponAlreadyUsed": "رمز القسيمة مستخدم بالفعل",
|
||||||
|
"couponNotApplicable": "رمز القسيمة غير مطبق"
|
||||||
},
|
},
|
||||||
"checkout": {
|
"checkout": {
|
||||||
"title": "الدفع",
|
"title": "الدفع",
|
||||||
|
|||||||
@@ -248,7 +248,12 @@
|
|||||||
"pleaseAddLoyaltyItems": "Please add loyalty items to your cart to use loyalty points",
|
"pleaseAddLoyaltyItems": "Please add loyalty items to your cart to use loyalty points",
|
||||||
"loyaltyDiscountApplied": "Loyalty discount applied: {{itemName}} ({{amount}} off)",
|
"loyaltyDiscountApplied": "Loyalty discount applied: {{itemName}} ({{amount}} off)",
|
||||||
"deliveryFee": "Delivery Fee",
|
"deliveryFee": "Delivery Fee",
|
||||||
"scheduledDate": "Scheduled Date"
|
"scheduledDate": "Scheduled Date",
|
||||||
|
"couponApplied": "Coupon applied successfully",
|
||||||
|
"couponInvalid": "Invalid coupon code",
|
||||||
|
"couponExpired": "Coupon expired",
|
||||||
|
"couponAlreadyUsed": "Coupon already used",
|
||||||
|
"couponNotApplicable": "Coupon not applicable"
|
||||||
},
|
},
|
||||||
"checkout": {
|
"checkout": {
|
||||||
"title": "Checkout",
|
"title": "Checkout",
|
||||||
|
|||||||
@@ -29,18 +29,14 @@
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark theme support */
|
:global(.darkApp) .loadingContainer {
|
||||||
@media (prefers-color-scheme: dark) {
|
background-color: #343a40;
|
||||||
.loadingContainer {
|
}
|
||||||
background-color: #343a40;
|
|
||||||
}
|
:global(.darkApp) .loadingState {
|
||||||
|
background-color: #343a40;
|
||||||
.loadingState {
|
}
|
||||||
background-color: #343a40;
|
|
||||||
}
|
:global(.darkApp) .errorState {
|
||||||
|
background-color: #45232a;
|
||||||
.errorState {
|
|
||||||
background-color: #45232a;
|
|
||||||
color: #f8d7da;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export default function OrderSummary() {
|
|||||||
<ProText type="secondary">{t("cart.basketTotal")}</ProText>
|
<ProText type="secondary">{t("cart.basketTotal")}</ProText>
|
||||||
<ArabicPrice price={subtotal} />
|
<ArabicPrice price={subtotal} />
|
||||||
</div>
|
</div>
|
||||||
{orderType != OrderType.DineIn && (
|
{orderType === OrderType.Delivery && (
|
||||||
<div className={styles.summaryRow}>
|
<div className={styles.summaryRow}>
|
||||||
<ProText type="secondary">{t("cart.deliveryFee")}</ProText>
|
<ProText type="secondary">{t("cart.deliveryFee")}</ProText>
|
||||||
<ArabicPrice price={Number(restaurant?.delivery_fees || 0)} />
|
<ArabicPrice price={Number(restaurant?.delivery_fees || 0)} />
|
||||||
|
|||||||
@@ -698,7 +698,7 @@ export const selectGrandTotal = (state: RootState) => {
|
|||||||
const taxAmount = selectTaxAmount(state);
|
const taxAmount = selectTaxAmount(state);
|
||||||
const subtotal = selectCartTotal(state);
|
const subtotal = selectCartTotal(state);
|
||||||
const deliveryFee =
|
const deliveryFee =
|
||||||
state.order.orderType !== OrderType.DineIn
|
state.order.orderType === OrderType.Delivery
|
||||||
? Number(state.order.restaurant?.delivery_fees) || 0
|
? Number(state.order.restaurant?.delivery_fees) || 0
|
||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ export default function CouponCard() {
|
|||||||
isDiscount: response.isDiscount,
|
isDiscount: response.isDiscount,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
message.success(t("cart.couponApplied"));
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
message.error(error.data.message || t("cart.couponInvalid"));
|
message.error(error.data.message || t("cart.couponInvalid"));
|
||||||
|
|||||||
Reference in New Issue
Block a user