apply coupon discount
This commit is contained in:
@@ -3,6 +3,7 @@ import ArabicPrice from "components/ArabicPrice";
|
||||
import {
|
||||
selectCart,
|
||||
selectCartTotal,
|
||||
selectDiscountTotal,
|
||||
selectGrandTotal,
|
||||
selectHighestPricedLoyaltyItem,
|
||||
selectLoyaltyValidation,
|
||||
@@ -30,6 +31,7 @@ export default function OrderSummary() {
|
||||
const highestLoyaltyItem = useAppSelector(selectHighestPricedLoyaltyItem);
|
||||
const taxAmount = useAppSelector(selectTaxAmount);
|
||||
const grandTotal = useAppSelector(selectGrandTotal);
|
||||
const discountAmount = useAppSelector(selectDiscountTotal);
|
||||
|
||||
const isHasLoyaltyGift =
|
||||
(restaurant?.loyalty_stamps ?? 0) -
|
||||
@@ -54,13 +56,7 @@ export default function OrderSummary() {
|
||||
)}
|
||||
<div className={styles.summaryRow}>
|
||||
<ProText type="secondary">{t("cart.discount")}</ProText>
|
||||
<ArabicPrice
|
||||
price={
|
||||
useLoyaltyPoints && restaurant?.is_loyalty_enabled === 1
|
||||
? highestLoyaltyItem?.price || 0
|
||||
: 0
|
||||
}
|
||||
/>
|
||||
<ArabicPrice price={discountAmount} />
|
||||
</div>
|
||||
<div className={styles.summaryRow}>
|
||||
<ProText type="secondary">{t("cart.tax")}</ProText>
|
||||
|
||||
Reference in New Issue
Block a user