summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-07-24 10:31:52 +0700
committerHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-07-24 10:31:52 +0700
commitb348c80f52fe070e9fd1b72db359b31a478435fd (patch)
tree7d1df5a7fded9a3ad59450f4db97f91b9f6a64ab /src/lib
parent96cdb9a7b7ac9751f85d7967a3cdd1c04da42fbd (diff)
sla
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/product/components/Product/ProductDesktop.jsx60
1 files changed, 59 insertions, 1 deletions
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>}