From 6bd88bdb765c1ecc0518abeca77eca25bde2857b Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Tue, 17 Oct 2023 14:57:48 +0700
Subject: add lebel product terjual di product card dan product detail, bugfix
 queri solr untuk filter brand

---
 src/lib/product/components/Product/ProductDesktop.jsx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'src/lib/product/components/Product/ProductDesktop.jsx')

diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx
index 701750b2..ab4943eb 100644
--- a/src/lib/product/components/Product/ProductDesktop.jsx
+++ b/src/lib/product/components/Product/ProductDesktop.jsx
@@ -25,6 +25,7 @@ import { useProductCartContext } from '@/contexts/ProductCartContext'
 import { Box, Skeleton, Tooltip } from '@chakra-ui/react'
 import { Info } from 'lucide-react'
 import Breadcrumb from './Breadcrumb'
+import { sellingProductFormat } from '@/core/utils/formatValue'
 
 const ProductDesktop = ({ products, wishlist, toggleWishlist }) => {
   const router = useRouter()
@@ -418,7 +419,7 @@ const ProductDesktop = ({ products, wishlist, toggleWishlist }) => {
             </div>
           </div>
 
-          <div className='w-[25%]'>
+          <div className='w-[30%]'>
             {product.variants.length > 1 && product.lowestPrice.priceDiscount > 0 && (
               <div className='text-gray_r-12/80'>Harga mulai dari: </div>
             )}
@@ -447,7 +448,11 @@ const ProductDesktop = ({ products, wishlist, toggleWishlist }) => {
                 )}
               </div>
             )} */}
-
+            {product?.qtySold > 0 && (
+              <div className='text-gray_r-9'>
+                {sellingProductFormat(product?.qtySold) + ' Terjual'}
+              </div>
+            )}
             {lowestPrice?.isFlashsale && lowestPrice?.price.discountPercentage > 0 ? (
               <>
                 <div className='flex gap-x-1 items-center mt-2'>
-- 
cgit v1.2.3

