From b348c80f52fe070e9fd1b72db359b31a478435fd Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Mon, 24 Jul 2023 10:31:52 +0700
Subject: sla

---
 .../product/components/Product/ProductDesktop.jsx  | 60 +++++++++++++++++++++-
 1 file changed, 59 insertions(+), 1 deletion(-)

(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 21757f78..41eedc55 100644
--- a/src/lib/product/components/Product/ProductDesktop.jsx
+++ b/src/lib/product/components/Product/ProductDesktop.jsx
@@ -163,7 +163,65 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => {
                     )}
                   </div>
                 </div>
-                <div className='flex p-3 bg-gray_r-4'>
+                <div className='flex p-3 items-center bg-gray_r-4'>
+                  <div className='w-1/4 text-gray_r-12/70'>Persiapan Barang</div>
+                  <div className='w-3/4'>
+                    {product.variants.length > 1 ? (
+                      <button
+                        type='button'
+                        onClick={goToVariantSection}
+                        className={`flex gap-x-1 items-center p-2 rounded-lg w-auto btn-light`}
+                      >
+                        <span className='text-red-600 text-sm'>Lihat Selengkapnya</span>
+                      </button>
+                    ) : product.variants[0].sla ? (
+                      product.variants[0].sla?.slaDate != '-' ? (
+                        <button
+                          type='button'
+                          title={`Masa Persiapan Barang ${product.variants[0].sla?.slaDate}`}
+                          className={`flex gap-x-1 items-center p-2 rounded-lg w-auto ${
+                            product.variants[0].sla?.slaDate === 'indent'
+                              ? 'bg-indigo-900'
+                              : 'btn-light'
+                          }`}
+                        >
+                          <div
+                            className={`flex-1 text-caption-1  ${
+                              product.variants[0].sla?.slaDate === 'indent' ? 'text-white' : ''
+                            }`}
+                          >
+                            {product.variants[0].sla?.slaDate}
+                          </div>
+                          <div className='flex-end'>
+                            <svg
+                              aria-hidden='true'
+                              fill='none'
+                              stroke='currentColor'
+                              stroke-width='1.5'
+                              className={`w-7 h-7 ${
+                                product.variants[0].sla?.slaDate === 'indent' ? 'text-white' : ''
+                              }`}
+                            >
+                              <path
+                                d='M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z'
+                                stroke-linecap='round'
+                                stroke-linejoin='round'
+                              ></path>
+                            </svg>
+                          </div>
+                        </button>
+                      ) : (
+                        '-'
+                      )
+                    ) : (
+                      <Button color='gray'>
+                        <Spinner aria-label='Alternate spinner button example' />
+                        <span className='pl-3'>Loading...</span>
+                      </Button>
+                    )}
+                  </div>
+                </div>
+                <div className='flex p-3 '>
                   <div className='w-1/4 text-gray_r-12/70'>Berat Barang</div>
                   <div className='w-3/4'>
                     {product?.weight > 0 && <span>{product?.weight} KG</span>}
-- 
cgit v1.2.3

