From bdfaa0b8564e89d72ffd2de93eb088e8cf0db31e Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Mon, 2 Oct 2023 17:07:20 +0700
Subject: mapping new pricelist

---
 src/lib/product/components/ProductCard.jsx | 43 +++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 13 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 10ffdaec..83b26449 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -89,23 +89,40 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
           >
             {product?.name}
           </Link>
-          {product?.lowestPrice.discountPercentage > 0 && (
-            <div className='flex gap-x-1 mb-1 items-center'>
-              <div className='text-gray_r-11 line-through text-[11px] sm:text-caption-2'>
-                {currencyFormat(product.lowestPrice.price)}
+          {product?.flashSale?.id > 0 ? (
+            <>
+              {product?.lowestPrice.discountPercentage > 0 && (
+                <div className='flex gap-x-1 mb-1 items-center'>
+                  <div className='text-gray_r-11 line-through text-[11px] sm:text-caption-2'>
+                    {currencyFormat(product.lowestPrice.price)}
+                  </div>
+                  <div className='badge-solid-red'>{product?.lowestPrice.discountPercentage}%</div>
+                </div>
+              )}
+
+              <div className='text-danger-500 font-semibold mb-2'>
+                {product?.lowestPrice.priceDiscount > 0 ? (
+                  currencyFormat(product?.lowestPrice.priceDiscount)
+                ) : (
+                  <a href={callForPriceWhatsapp}>Call for price</a>
+                )}
               </div>
-              <div className='badge-solid-red'>{product?.lowestPrice.discountPercentage}%</div>
+            </>
+          ) : (
+            <div className='text-danger-500 font-semibold mb-2 min-h-[40px]'>
+              {product?.lowestPrice.price > 0 ? (
+                <>
+                  {currencyFormat(product?.lowestPrice.price)}
+                  <div className='text-gray_r-9  text-[11px] sm:text-caption-2 mt-2'>
+                    Incl {currencyFormat(product.lowestPrice.price * process.env.NEXT_PUBLIC_PPN )}
+                  </div>
+                </>
+              ) : (
+                <a href={callForPriceWhatsapp}>Call for price</a>
+              )}
             </div>
           )}
 
-          <div className='text-danger-500 font-semibold mb-2'>
-            {product?.lowestPrice.priceDiscount > 0 ? (
-              currencyFormat(product?.lowestPrice.priceDiscount)
-            ) : (
-              <a href={callForPriceWhatsapp}>Call for price</a>
-            )}
-          </div>
-
           {product?.stockTotal > 0 && (
             <div className='flex gap-x-1'>
               <div className='badge-solid-red'>Ready Stock</div>
-- 
cgit v1.2.3


From 787d3aaa3187d3432c8e6b743b555ea3e4a4980c Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Tue, 3 Oct 2023 15:25:14 +0700
Subject: new pricelist di page product cart, product detail & product variant

---
 src/lib/product/components/ProductCard.jsx | 50 ++++++++++++++++++++----------
 1 file changed, 33 insertions(+), 17 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 83b26449..16c63c00 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -82,7 +82,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
           )}
           <Link
             href={createSlug('/shop/product/', product?.name, product?.id)}
-            className={`mb-2 !text-gray_r-12 leading-6 block ${
+            className={`mb-3 !text-gray_r-12 leading-6 block ${
               simpleTitle ? 'line-clamp-2 h-12' : 'line-clamp-3 h-[64px]'
             }`}
             title={product?.name}
@@ -113,8 +113,8 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
               {product?.lowestPrice.price > 0 ? (
                 <>
                   {currencyFormat(product?.lowestPrice.price)}
-                  <div className='text-gray_r-9  text-[11px] sm:text-caption-2 mt-2'>
-                    Incl {currencyFormat(product.lowestPrice.price * process.env.NEXT_PUBLIC_PPN )}
+                  <div className='text-gray_r-9  text-[11px] font-normal sm:text-caption-2 mt-2'>
+                    + PPN: {currencyFormat(product.lowestPrice.price * process.env.NEXT_PUBLIC_PPN)}
                   </div>
                 </>
               ) : (
@@ -186,30 +186,46 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
           )}
           <Link
             href={createSlug('/shop/product/', product?.name, product?.id)}
-            className={`mb-2 !text-gray_r-12 leading-6 ${
+            className={`mb-3 !text-gray_r-12 leading-6 ${
               simpleTitle ? 'line-clamp-2' : 'line-clamp-3'
             }`}
           >
             {product?.name}
           </Link>
+          {product?.flashSale?.id > 0 ? (
+            <>
+              {product?.lowestPrice.discountPercentage > 0 && (
+                <div className='flex gap-x-1 mb-1 items-center'>
+                  <div className='badge-solid-red'>{product?.lowestPrice?.discountPercentage}%</div>
+                  <div className='text-gray_r-11 line-through text-caption-2'>
+                    {currencyFormat(product?.lowestPrice?.price)}
+                  </div>
+                </div>
+              )}
 
-          {product?.lowestPrice?.discountPercentage > 0 && (
-            <div className='flex gap-x-1 mb-1 items-center'>
-              <div className='badge-solid-red'>{product?.lowestPrice?.discountPercentage}%</div>
-              <div className='text-gray_r-11 line-through text-caption-2'>
-                {currencyFormat(product?.lowestPrice?.price)}
+              <div className='text-danger-500 font-semibold mb-2'>
+                {product?.lowestPrice?.priceDiscount > 0 ? (
+                  currencyFormat(product?.lowestPrice?.priceDiscount)
+                ) : (
+                  <a href={callForPriceWhatsapp}>Call for price</a>
+                )}
               </div>
+            </>
+          ) : (
+            <div className='text-danger-500 font-semibold mb-2 min-h-[40px]'>
+              {product?.lowestPrice.price > 0 ? (
+                <>
+                  {currencyFormat(product?.lowestPrice.price)}
+                  <div className='text-gray_r-9 text-[11px] sm:text-caption-2 font-normal mt-2'>
+                    + PPN: {currencyFormat(product.lowestPrice.price * process.env.NEXT_PUBLIC_PPN)}
+                  </div>
+                </>
+              ) : (
+                <a href={callForPriceWhatsapp}>Call for price</a>
+              )}
             </div>
           )}
 
-          <div className='text-danger-500 font-semibold mb-2'>
-            {product?.lowestPrice?.priceDiscount > 0 ? (
-              currencyFormat(product?.lowestPrice?.priceDiscount)
-            ) : (
-              <a href={callForPriceWhatsapp}>Call for price</a>
-            )}
-          </div>
-
           {product?.stockTotal > 0 && (
             <div className='flex gap-x-1'>
               <div className='badge-solid-red'>Ready Stock</div>
-- 
cgit v1.2.3


From e72c16eb549488e1ed847b022880f542d2a9c525 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Thu, 5 Oct 2023 09:32:12 +0700
Subject: add component list product for cart, quotation, and checkout

---
 src/lib/product/components/ProductCard.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 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 16c63c00..6a5e29ab 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -113,8 +113,8 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
               {product?.lowestPrice.price > 0 ? (
                 <>
                   {currencyFormat(product?.lowestPrice.price)}
-                  <div className='text-gray_r-9  text-[11px] font-normal sm:text-caption-2 mt-2'>
-                    + PPN: {currencyFormat(product.lowestPrice.price * process.env.NEXT_PUBLIC_PPN)}
+                  <div className='text-gray_r-9 text-[10px] font-normal mt-2'>
+                    Inc. PPN: {currencyFormat(product.lowestPrice.price * process.env.NEXT_PUBLIC_PPN )}
                   </div>
                 </>
               ) : (
@@ -217,7 +217,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
                 <>
                   {currencyFormat(product?.lowestPrice.price)}
                   <div className='text-gray_r-9 text-[11px] sm:text-caption-2 font-normal mt-2'>
-                    + PPN: {currencyFormat(product.lowestPrice.price * process.env.NEXT_PUBLIC_PPN)}
+                    Inc. PPN: {currencyFormat(product.lowestPrice.price * process.env.NEXT_PUBLIC_PPN)}
                   </div>
                 </>
               ) : (
-- 
cgit v1.2.3

