From 039165b57fe20f24ba0ef406ded60edb35929fe9 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Wed, 25 Oct 2023 09:54:51 +0700
Subject: bugs fix - brand undifine ketika kilik call for inquery (redirect ke
 wa) di product card

---
 src/lib/product/components/ProductCard.jsx | 1 +
 1 file changed, 1 insertion(+)

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

diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx
index 9500a3fd..71466259 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -12,6 +12,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
 
   const callForPriceWhatsapp = whatsappUrl('product', {
     name: product.name,
+    manufacture: product.manufacture?.name,
     url: createSlug('/shop/product/', product.name, product.id, true)
   })
 
-- 
cgit v1.2.3


From 53c6be06b157761ce79ef4f0ce869d6f7c16682d Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Wed, 25 Oct 2023 10:01:49 +0700
Subject: set target blank

---
 src/lib/product/components/ProductCard.jsx | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

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

diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx
index 71466259..f7df29e2 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -103,7 +103,9 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
                 {product?.lowestPrice.priceDiscount > 0 ? (
                   currencyFormat(product?.lowestPrice.priceDiscount)
                 ) : (
-                  <a href={callForPriceWhatsapp}>Call for Inquiry</a>
+                  <a rel='noopener noreferrer' target='_blank' href={callForPriceWhatsapp}>
+                    Call for Inquiry
+                  </a>
                 )}
               </div>
             </>
@@ -118,7 +120,9 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
                   </div>
                 </>
               ) : (
-                <a href={callForPriceWhatsapp}>Call for Inquiry</a>
+                <a rel='noopener noreferrer' target='_blank' href={callForPriceWhatsapp}>
+                  Call for Inquiry
+                </a>
               )}
             </div>
           )}
@@ -126,7 +130,11 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
           <div className='flex w-full items-center gap-x-1 '>
             {product?.stockTotal > 0 && <div className='badge-solid-red'>Ready Stock</div>}
             {/* <div className='badge-gray'>{product?.stockTotal > 5 ? '> 5' : '< 5'}</div> */}
-            {product?.qtySold > 0 && <div className='text-gray_r-9 text-[11px]'>{sellingProductFormat(product?.qtySold) + ' Terjual'}</div>}
+            {product?.qtySold > 0 && (
+              <div className='text-gray_r-9 text-[11px]'>
+                {sellingProductFormat(product?.qtySold) + ' Terjual'}
+              </div>
+            )}
           </div>
         </div>
       </div>
@@ -206,7 +214,9 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
                 {product?.lowestPrice?.priceDiscount > 0 ? (
                   currencyFormat(product?.lowestPrice?.priceDiscount)
                 ) : (
-                  <a href={callForPriceWhatsapp}>Call for Inquiry</a>
+                  <a rel='noopener noreferrer' target='_blank' href={callForPriceWhatsapp}>
+                    Call for Inquiry
+                  </a>
                 )}
               </div>
             </>
@@ -221,7 +231,9 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
                   </div>
                 </>
               ) : (
-                <a href={callForPriceWhatsapp}>Call for Inquiry</a>
+                <a rel='noopener noreferrer' target='_blank' href={callForPriceWhatsapp}>
+                  Call for Inquiry
+                </a>
               )}
             </div>
           )}
@@ -229,7 +241,11 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
           <div className='flex w-full items-center gap-x-1 '>
             {product?.stockTotal > 0 && <div className='badge-solid-red'>Ready Stock</div>}
             {/* <div className='badge-gray'>{product?.stockTotal > 5 ? '> 5' : '< 5'}</div> */}
-            {product?.qtySold > 0 && <div className='text-gray_r-9 text-[11px]'>{sellingProductFormat(product?.qtySold) + ' Terjual'}</div>}
+            {product?.qtySold > 0 && (
+              <div className='text-gray_r-9 text-[11px]'>
+                {sellingProductFormat(product?.qtySold) + ' Terjual'}
+              </div>
+            )}
           </div>
         </div>
       </div>
-- 
cgit v1.2.3


From 6ebe202147269100cd63ef125e877e8f693a27a1 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Fri, 17 Nov 2023 10:13:21 +0700
Subject: hotfix/round down discount precentage

---
 src/lib/product/components/ProductCard.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx
index f7df29e2..fa555bcf 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -42,7 +42,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
                 <div className='flex gap-x-1 items-center p-2 justify-center'>
                   <div className='bg-yellow-400 rounded-lg p-1 h-6 w-19 flex items-center justify-center '>
                     <span className='text-sm font-bold text-black'>
-                      {product?.lowestPrice.discountPercentage}%
+                      {Math.floor(product?.lowestPrice.discountPercentage)}%
                     </span>
                   </div>
                   <div className='bg-red-600 border border-solid border-yellow-400 p-2 rounded-full h-6 flex w-fit items-center justify-center gap-x-2'>
-- 
cgit v1.2.3

