summaryrefslogtreecommitdiff
path: root/src-migrate/modules/cart/components
diff options
context:
space:
mode:
Diffstat (limited to 'src-migrate/modules/cart/components')
-rw-r--r--src-migrate/modules/cart/components/Item.tsx16
1 files changed, 11 insertions, 5 deletions
diff --git a/src-migrate/modules/cart/components/Item.tsx b/src-migrate/modules/cart/components/Item.tsx
index 7a4c22cc..8a6f8822 100644
--- a/src-migrate/modules/cart/components/Item.tsx
+++ b/src-migrate/modules/cart/components/Item.tsx
@@ -66,15 +66,21 @@ const CartItem = ({ item, editable = true }: Props) => {
)}
{item.cart_type === 'product' && (
- <>
+ <div className={style.discPriceSection}>
+ {item.price.discount_percentage > 0 && (
+ <span className={style.priceBefore}>
+ Rp {formatCurrency((item.price.price || 0))}
+ </span>
+ )}
+
<div className={style.price}>
- {item.price.price > 0 && `Rp ${formatCurrency(item.price.price)}`}
- {item.price.price === 0 && '-'}
+ {item.price.price_discount > 0 && `Rp ${formatCurrency(item.price.price_discount)}`}
+ {item.price.price_discount === 0 && '-'}
</div>
- <div>{item.code}</div>
- </>
+ </div>
)}
+ <div>{item.cart_type === 'product' && item.code}</div>
<div>
{item.weight} Kg
</div>