From 8067589f21bc41b651622240c491bf1a9e5e9d51 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Sat, 23 Aug 2025 11:21:21 +0700 Subject: Done --- .../product-detail/components/PriceAction.tsx | 227 +++++++++++++-------- 1 file changed, 147 insertions(+), 80 deletions(-) (limited to 'src-migrate') diff --git a/src-migrate/modules/product-detail/components/PriceAction.tsx b/src-migrate/modules/product-detail/components/PriceAction.tsx index 2cdfc9a2..a90faee0 100644 --- a/src-migrate/modules/product-detail/components/PriceAction.tsx +++ b/src-migrate/modules/product-detail/components/PriceAction.tsx @@ -88,59 +88,49 @@ const PriceAction = ({ product }: Props) => { > {!!activePrice && activePrice.price > 0 && ( <> -
- + +
{activePrice.discount_percentage > 0 && ( <>
{Math.floor(activePrice.discount_percentage)}%
-
- Rp {formatCurrency(activePrice.price_discount || 0)} +
+ Rp {formatCurrency(activePrice.price || 0)}
)} -
- Rp {formatCurrency(activePrice.price || 0)} +
+ Rp {formatCurrency(activePrice.price_discount || 0)}
- - +
+
+
+ Termasuk PPN: Rp{' '} + {formatCurrency(Math.round(activePrice.price_discount * PPN))} +
+ + +
{activePrice.discount_percentage > 0 && ( <>
{Math.floor(activePrice.discount_percentage)}% -
- -
- Rp {formatCurrency(activePrice.price || 0)} +
{' '} +
+ Rp {formatCurrency(activePrice.price_discount || 0)}
)} -
- Rp {formatCurrency(activePrice.price_discount || 0)} +
+ Rp {formatCurrency(activePrice.price || 0)}
- -
-
-
- Termasuk PPN: Rp{' '} - {formatCurrency(Math.round(activePrice.price_discount * PPN))} -
- {isMobile && ( -
- - Stock : {sla?.qty}{' '} - - {/* - {' '} - */}
- )} +
+ Termasuk PPN: Rp{' '} + {formatCurrency(Math.round(activePrice.price_discount * PPN))} +
+ )} @@ -157,70 +147,147 @@ const PriceAction = ({ product }: Props) => { )} +
-
-
- - setQuantityInput(e.target.value)} - className={style['quantity-input']} - /> - -
+
+ {/* Qty */} +
+ + setQuantityInput(e.target.value)} + className='w-12 text-center outline-none border-x' + /> + +
- {isDesktop && ( + {/* Stok */}
Stock : {sla?.qty}{' '} - {/* - {' '} - */}
- )} -
- {qtyPickUp > 0 && ( - - pickup now + {qtyPickUp > 0 && ( + + pickup now + + )} +
+
+ + + {/* ===== MOBILE: grid kiri-kanan, kanan hanya qty ===== */} + +
+ {/* Kiri */} +
+ + Stock : {sla?.qty}{' '} + + + {qtyPickUp > 0 && ( +
+ + pickup now + +
+ * {qtyPickUp} barang bisa di pickup +
+
+ )} +
+ + {/* Kanan: hanya qty, rata kanan */} +
+
+ + setQuantityInput(e.target.value)} + className='w-12 text-center outline-none border-x' /> - - )} + +
+
-
+ {qtyPickUp > 0 && (
* {qtyPickUp} barang bisa di pickup
)}
+