diff options
| author | trisusilo <tri.susilo@altama.co.id> | 2023-04-10 04:18:12 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2023-04-10 04:18:12 +0000 |
| commit | 20dd2a819be9c7bdb0571222705bec8b90e1e4b1 (patch) | |
| tree | dad65a3521b7489a2f61a5b349d6a84ba726c002 | |
| parent | 4a05c21f583e1482acb126d51aafe5cbce49707f (diff) | |
| parent | 7f5985ab05ff17eb25f772ca40f61c34a29b459d (diff) | |
Merged in development_tri/feedback_UAT (pull request #2)
Development tri/feedback UAT
| -rw-r--r-- | src/core/components/elements/Footer/BasicFooter.jsx | 4 | ||||
| -rw-r--r-- | src/lib/cart/components/Cart.jsx | 6 | ||||
| -rw-r--r-- | src/lib/checkout/components/Checkout.jsx | 10 | ||||
| -rw-r--r-- | src/lib/product/components/Product/ProductDesktop.jsx | 173 | ||||
| -rw-r--r-- | src/lib/quotation/components/Quotation.jsx | 2 | ||||
| -rw-r--r-- | src/lib/transaction/components/Transaction.jsx | 2 |
6 files changed, 112 insertions, 85 deletions
diff --git a/src/core/components/elements/Footer/BasicFooter.jsx b/src/core/components/elements/Footer/BasicFooter.jsx index 79b78dee..42698cb2 100644 --- a/src/core/components/elements/Footer/BasicFooter.jsx +++ b/src/core/components/elements/Footer/BasicFooter.jsx @@ -22,7 +22,7 @@ const BasicFooter = () => { </div> <OfficeLocation /> - <WarehouseLocation /> + {/* <WarehouseLocation /> */} <InformationCenter /> <OpenHours /> <SocialMedias /> @@ -53,7 +53,7 @@ const BasicFooter = () => { <div className='w-3/12'> <div className='grid grid-cols-1 gap-y-4'> <OfficeLocation /> - <WarehouseLocation /> + {/* <WarehouseLocation /> */} <OpenHours /> <Payments /> </div> diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx index 49fa46e6..e2173268 100644 --- a/src/lib/cart/components/Cart.jsx +++ b/src/lib/cart/components/Cart.jsx @@ -164,7 +164,7 @@ const Cart = () => { <MobileView> <div className='pt-4'> <div className='flex justify-between mb-4 px-4'> - <h1 className='font-semibold'>Daftar Produk Belanja</h1> + <h1 className='font-semibold'>Keranjang</h1> <Link href='/'>Cari Produk Lain</Link> </div> @@ -301,7 +301,7 @@ const Cart = () => { <DesktopView> <div className='container mx-auto py-10 grid grid-cols-12'> <div className='col-span-9 border border-gray_r-6 rounded bg-white p-4 pt-6'> - <h1 className='text-title-sm font-semibold mb-6'>Daftar Produk Belanja</h1> + <h1 className='text-title-sm font-semibold mb-6'>Keranjang</h1> <table className='table-cart'> <thead> @@ -424,7 +424,7 @@ const Cart = () => { height={60} /> <div className='text-gray_r-12/90'> - Tanya stock untuk pembelian anda sebelum melanjutkan pembayaran! + Tanya stock untuk pembelian anda sebelum melanjutkan pembayaran!<span> <a href='https://wa.me/628128080622' className='text-danger-500'>Hubungi Kami</a></span> </div> </div> </div> diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index 17ac20e1..ba45e862 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -202,7 +202,7 @@ const Checkout = () => { {currencyFormat(totalAmount - totalDiscountAmount + taxTotal)} </div> </div> - <p className='text-caption-2 text-gray_r-10 mb-2'>*) Belum termasuk biaya pengiriman</p> + {/* <p className='text-caption-2 text-gray_r-10 mb-2'>*) Belum termasuk biaya pengiriman</p> */} <p className='text-caption-2 text-gray_r-10 leading-5'> Dengan melakukan pembelian melalui website Indoteknik, saya menyetujui{' '} <Link href='/' className='inline font-normal'> @@ -325,7 +325,7 @@ const Checkout = () => { </div> <div className='w-1/4 pl-4'> - <div className='border border-gray_r-6 bg-white rounded p-4'> + <div className='sticky top-48 border border-gray_r-6 bg-white rounded p-4'> <div className='flex justify-between items-center'> <div className='font-medium'>Ringkasan Pesanan</div> <div className='text-gray_r-11 text-caption-1'>{products?.length} Barang</div> @@ -360,9 +360,6 @@ const Checkout = () => { {currencyFormat(totalAmount - totalDiscountAmount + taxTotal)} </div> </div> - <p className='text-caption-2 text-gray_r-11 mb-2'> - *) Belum termasuk biaya pengiriman - </p> <p className='text-caption-2 text-gray_r-11 leading-5'> Dengan melakukan pembelian melalui website Indoteknik, saya menyetujui{' '} <Link href='/' className='inline font-normal'> @@ -447,6 +444,9 @@ const PickupAddress = ({ label }) => ( </p> <p className='mt-1 text-gray_r-11'>Telp : 021-2933 8828/29</p> <p className='mt-1 text-gray_r-11'>Mobile : 0813 9000 7430</p> + <p className='mt-5 text-caption-2 text-gray_r-11 mb-2'> + *) Belum termasuk biaya pengiriman + </p> </div> </div> ) diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx index faff375f..dbe37068 100644 --- a/src/lib/product/components/Product/ProductDesktop.jsx +++ b/src/lib/product/components/Product/ProductDesktop.jsx @@ -161,14 +161,38 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => { </span> )} </h3> - - <button - type='button' - onClick={goToVariantSection} - className='btn-solid-red w-full mt-6' - > - Lihat Varian - </button> + {product.variants.length > 1 ? ( + <button + type='button' + onClick={goToVariantSection} + className='btn-solid-red w-full mt-6' + > + Lihat Varian + </button> + ) : ( + <td className='flex gap-x-3 mt-4'> + <input + type='number' + className='form-input w-16 py-2 text-center bg-gray_r-1' + ref={setVariantQuantityRef(product.variants[0].id)} + defaultValue={1} + /> + <button + type='button' + onClick={() => handleAddToCart(product.variants[0].id)} + className='flex-1 py-2 btn-yellow' + > + Keranjang + </button> + <button + type='button' + onClick={() => handleBuy(product.variants[0].id)} + className='flex-1 py-2 btn-solid-red' + > + Beli + </button> + </td> + )} <div className='flex mt-4'> <button className='flex items-center gap-x-1' onClick={toggleWishlist}> @@ -183,73 +207,76 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => { </div> </div> - <div className='mt-12' ref={variantSectionRef}> - <div className='text-h-lg font-semibold mb-6'>Varian Produk</div> - <div className='table-specification'> - <table> - <thead> - <tr> - <th>Part Number</th> - <th>Varian</th> - <th>Harga</th> - <th>Jumlah</th> - <th>Action</th> - </tr> - </thead> - <tbody> - {product.variants.map((variant) => ( - <tr key={variant.id}> - <td>{variant.code}</td> - <td>{variant.attributes.join(', ') || '-'}</td> - <td> - {variant.price.discountPercentage > 0 && variant.price.priceDiscount > 0 && ( - <> - <div className='line-through text-caption-1 text-gray_r-11 mb-1'> - {currencyFormat(variant.price.price)} - </div>{' '} - </> - )} - <div> - {variant.price.priceDiscount > 0 ? ( - currencyFormat(variant.price.priceDiscount) - ) : ( - <a href='https://wa.me/' className='text-danger-500'> - Call for price - </a> - )} - </div> - {/* <VariantPrice id={variant.id} /> */} - </td> - <td> - <input - type='number' - className='form-input w-16 py-2 text-center bg-gray_r-1' - ref={setVariantQuantityRef(variant.id)} - defaultValue={1} - /> - </td> - <td className='flex gap-x-3'> - <button - type='button' - onClick={() => handleAddToCart(variant.id)} - className='flex-1 py-2 btn-yellow' - > - Keranjang - </button> - <button - type='button' - onClick={() => handleBuy(variant.id)} - className='flex-1 py-2 btn-solid-red' - > - Beli - </button> - </td> + {product.variants.length > 1 && ( + <div className='mt-12' ref={variantSectionRef}> + <div className='text-h-lg font-semibold mb-6'>Varian Produk</div> + <div className='table-specification'> + <table> + <thead> + <tr> + <th>Part Number</th> + <th>Varian</th> + <th>Harga</th> + <th>Jumlah</th> + <th>Action</th> </tr> - ))} - </tbody> - </table> + </thead> + <tbody> + {product.variants.map((variant) => ( + <tr key={variant.id}> + <td>{variant.code}</td> + <td>{variant.attributes.join(', ') || '-'}</td> + <td> + {variant.price.discountPercentage > 0 && + variant.price.priceDiscount > 0 && ( + <> + <div className='line-through text-caption-1 text-gray_r-11 mb-1'> + {currencyFormat(variant.price.price)} + </div>{' '} + </> + )} + <div> + {variant.price.priceDiscount > 0 ? ( + currencyFormat(variant.price.priceDiscount) + ) : ( + <a href='https://wa.me/' className='text-red_r-11'> + Call for price + </a> + )} + </div> + {/* <VariantPrice id={variant.id} /> */} + </td> + <td> + <input + type='number' + className='form-input w-16 py-2 text-center bg-gray_r-1' + ref={setVariantQuantityRef(variant.id)} + defaultValue={1} + /> + </td> + <td className='flex gap-x-3'> + <button + type='button' + onClick={() => handleAddToCart(variant.id)} + className='flex-1 py-2 btn-yellow' + > + Keranjang + </button> + <button + type='button' + onClick={() => handleBuy(variant.id)} + className='flex-1 py-2 btn-solid-red' + > + Beli + </button> + </td> + </tr> + ))} + </tbody> + </table> + </div> </div> - </div> + )} <div className='mt-12'> <div className='text-h-lg font-semibold'>Informasi Produk</div> diff --git a/src/lib/quotation/components/Quotation.jsx b/src/lib/quotation/components/Quotation.jsx index e233efd1..a68889f5 100644 --- a/src/lib/quotation/components/Quotation.jsx +++ b/src/lib/quotation/components/Quotation.jsx @@ -237,7 +237,7 @@ const Quotation = () => { </div> <div className='w-1/4 pl-4'> - <div className='border border-gray_r-6 bg-white rounded p-4'> + <div className='sticky top-48 border border-gray_r-6 bg-white rounded p-4'> <div className='flex justify-between items-center'> <div className='font-medium'>Ringkasan Pesanan</div> <div className='text-gray_r-11 text-caption-1'>{products?.length} Barang</div> diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx index a0455c27..ad59f8dd 100644 --- a/src/lib/transaction/components/Transaction.jsx +++ b/src/lib/transaction/components/Transaction.jsx @@ -295,7 +295,7 @@ const Transaction = ({ id }) => { <button type='button' className='btn-solid-red px-3 py-2' - disabled={transaction.data?.status != 'draft'} + // disabled={transaction.data?.status != 'draft'} onClick={() => downloadQuotation(transaction.data)} > Download |
