summaryrefslogtreecommitdiff
path: root/src/components/variants/VariantCard.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/variants/VariantCard.js')
-rw-r--r--src/components/variants/VariantCard.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/components/variants/VariantCard.js b/src/components/variants/VariantCard.js
index 2d27371b..a821480c 100644
--- a/src/components/variants/VariantCard.js
+++ b/src/components/variants/VariantCard.js
@@ -41,6 +41,15 @@ export default function VariantCard({
{product.code || '-'}
{product.attributes.length > 0 ? ` ・ ${product.attributes.join(', ')}` : ''}
</p>
+ <div className="flex flex-wrap gap-x-1 items-center mt-auto">
+ {product.price.discount_percentage > 0 && (
+ <>
+ <p className="text-caption-2 text-gray_r-11 line-through">{currencyFormat(product.price.price)}</p>
+ <span className="badge-red">{product.price.discount_percentage}%</span>
+ </>
+ )}
+ <p className="text-caption-2 text-gray_r-12">{currencyFormat(product.price.price_discount)}</p>
+ </div>
<p className="text-caption-2 text-gray_r-11 mt-1">
{currencyFormat(product.price.price_discount)} × {product.quantity} Barang
</p>