From eb0a022d9b0acc884aaeebb5c0be79c15cde204c Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Fri, 23 Jun 2023 09:32:49 +0700
Subject: change request layout harga

---
 .../components/Product/ProductMobileVariant.jsx    | 71 ++++++++++++----------
 1 file changed, 40 insertions(+), 31 deletions(-)

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

diff --git a/src/lib/product/components/Product/ProductMobileVariant.jsx b/src/lib/product/components/Product/ProductMobileVariant.jsx
index 29d7700d..26c3fea3 100644
--- a/src/lib/product/components/Product/ProductMobileVariant.jsx
+++ b/src/lib/product/components/Product/ProductMobileVariant.jsx
@@ -115,39 +115,48 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => {
         </div>
         <h1 className='leading-6 font-medium mb-3'>{activeVariant?.name}</h1>
 
-        {activeVariant?.price?.discountPercentage > 0 && (
-          <div className='flex gap-x-1 items-center'>
-            <div className='text-gray_r-11 line-through text-caption-1'>
-              {currencyFormat(activeVariant?.price?.price * 1.11)}
+        {activeVariant?.price?.priceDiscount > 0 ? (
+          <>
+            <div className='flex gap-x-1 items-center'>
+              <div className='text-gray_r-11 line-through text-caption-1'>Harga Sebelum PPN :</div>
+              <div className='text-gray_r-12 line-through text-caption-1'>
+                {' '}
+                {currencyFormat(activeVariant?.price?.priceDiscount)}
+              </div>
             </div>
-            <div className='badge-solid-red'>{activeVariant?.price?.discountPercentage}%</div>
-          </div>
+            <div className='mt-2'>
+              <span className='font-semibold '>Termasuk PPN :</span>
+              <div className='flex gap-x-2 items-center mt-2'>
+                {activeVariant?.price?.discountPercentage > 0 && (
+                  <>
+                    <div className='badge-solid-red'>
+                      {activeVariant?.price?.discountPercentage}%
+                    </div>
+                    <div className='text-gray_r-11 line-through text-caption-1'>
+                      {currencyFormat(activeVariant?.price?.price * 1.11)}
+                    </div>
+                  </>
+                )}
+                <h3 className='text-danger-500 font-semibold'>
+                  {currencyFormat(activeVariant?.price?.priceDiscount * 1.11)}
+                </h3>
+              </div>
+            </div>
+          </>
+        ) : (
+          <span className='text-gray_r-11 leading-6 font-normal'>
+            Hubungi kami untuk dapatkan harga terbaik,&nbsp;
+            <a
+              href={whatsappUrl('product', {
+                name: product.name,
+                url: createSlug('/shop/product/', product.name, product.id, true)
+              })}
+              className='text-danger-500 underline'
+            >
+              klik disini
+            </a>
+          </span>
         )}
-        <h3 className='font-semibold mt-1 text-caption-1'>
-          {currencyFormat(activeVariant?.price?.priceDiscount)}
-        </h3>
-        <h3 className='text-danger-500 font-semibold mt-1'>
-          {activeVariant?.price?.priceDiscount > 0 ? (
-            currencyFormat(activeVariant?.price?.priceDiscount * 1.11)
-          ) : (
-            <span className='text-gray_r-11 leading-6 font-normal'>
-              Hubungi kami untuk dapatkan harga terbaik,&nbsp;
-              <a
-                href={whatsappUrl('product', {
-                  name: product.name,
-                  url: createSlug('/shop/product/', product.name, product.id, true)
-                })}
-                className='text-danger-500 underline'
-              >
-                klik disini
-              </a>
-            </span>
-          )}
-
-          {activeVariant?.price?.priceDiscount > 0 && (
-            <span className='text-xs text-gray_r-11'> *include PPN</span>
-          )}
-        </h3>
       </div>
 
       <Divider />
-- 
cgit v1.2.3

