From 30fed8b12bcfd7f117716cb75254bca99f5a43cb Mon Sep 17 00:00:00 2001 From: Miqdad Date: Wed, 29 Oct 2025 11:16:06 +0700 Subject: cr renca --- .../components/Product/ProductDesktopVariant.jsx | 13 ++- .../components/Product/ProductMobileVariant.jsx | 113 ++++++++++----------- src/lib/product/components/ProductCard.jsx | 10 +- src/lib/product/components/ProductSearch.jsx | 2 - 4 files changed, 72 insertions(+), 66 deletions(-) (limited to 'src/lib') diff --git a/src/lib/product/components/Product/ProductDesktopVariant.jsx b/src/lib/product/components/Product/ProductDesktopVariant.jsx index 13b22802..bc07507b 100644 --- a/src/lib/product/components/Product/ProductDesktopVariant.jsx +++ b/src/lib/product/components/Product/ProductDesktopVariant.jsx @@ -454,7 +454,10 @@ const ProductDesktopVariant = ({
Terjual
-
-
+
+ {product.qtySold > 0 && {product.qtySold}} + {product.qtySold == 0 && -} +
@@ -678,10 +681,10 @@ const ProductDesktopVariant = ({ {discount > 0 && (product?.isFlashSale ?? 0) < 1 && (
-
- - Pakai Voucher Hemat {currencyFormat(discount)} & potongan - ongkir hingga Rp. 20.000 +
+ + Pakai Voucher Belanja {currencyFormat(discount)} & + Potongan Ongkir hingga Rp 20.000 Saat Checkout
diff --git a/src/lib/product/components/Product/ProductMobileVariant.jsx b/src/lib/product/components/Product/ProductMobileVariant.jsx index 39cdebf0..c44de561 100644 --- a/src/lib/product/components/Product/ProductMobileVariant.jsx +++ b/src/lib/product/components/Product/ProductMobileVariant.jsx @@ -176,7 +176,7 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { }; fetchData(); }, [product]); - // console.log(product); + console.log(product); // console.log(product.parent.description); const [fakeStock] = useState(() => { @@ -204,7 +204,7 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { {currencyFormat(activeVariant?.price?.priceDiscount)}
-
+
Termasuk PPN:{' '} {currencyFormat( activeVariant?.price.priceDiscount * process.env.NEXT_PUBLIC_PPN @@ -216,7 +216,7 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { {activeVariant?.price?.price > 0 ? ( <> {currencyFormat(activeVariant?.price?.price)} -
+
Termasuk PPN:{' '} {currencyFormat( activeVariant?.price.price * process.env.NEXT_PUBLIC_PPN @@ -399,7 +399,59 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { active={informationTab == 'specification'} className='rounded border border-gray_r-6 divide-y divide-gray_r-6' > - + {/* + SKU-{product?.id} + */} + + {activeVariant?.code || '-'} + + + + {product?.manufacture.logo ? ( + {product.manufacture.name} + ) : ( +

+ {product.manufacture.name} +

+ )} + +
{' '} + + {product.qtySold || '-'} + {' '} + + {activeVariant?.weight > 0 && ( + {activeVariant?.weight} KG + )} + {activeVariant?.weight == 0 && ( + + Tanya Berat + + )} + + {isLoadingSLA ? ( @@ -443,59 +495,6 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { )} - {/* - SKU-{product?.id} - */} - - {activeVariant?.code || '-'} - - - {activeVariant?.stock > 0 && ( - -
Ready Stock
-
- {activeVariant?.stock > 5 ? '> 5' : '< 5'} -
-
- )} - {activeVariant?.stock == 0 && ( - - Tanya Stok - - )} -
- - {activeVariant?.weight > 0 && ( - {activeVariant?.weight} KG - )} - {activeVariant?.weight == 0 && ( - - Tanya Berat - - )} - { { {product?.name} diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx index 805cc0e0..0c106df7 100644 --- a/src/lib/product/components/ProductSearch.jsx +++ b/src/lib/product/components/ProductSearch.jsx @@ -71,10 +71,8 @@ const ProductSearch = ({ params = _.pickBy(params, _.identity); const qs = toQuery(params); - // ganti URL tanpa nambah history & tanpa full reload router.replace(`${prefixUrl}?${qs}`, undefined, { shallow: true }); - // sinkronkan state lokal setOrderBy('popular'); appliedDefaultBrandOrder.current = true; -- cgit v1.2.3