From 079f8029445fdd243e267a4af7c7a4d5780afa24 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 8 Aug 2024 14:11:32 +0700
Subject: <iman> update pop up quotation & cart

---
 src/lib/quotation/components/Quotationheader.jsx | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

(limited to 'src/lib/quotation/components/Quotationheader.jsx')

diff --git a/src/lib/quotation/components/Quotationheader.jsx b/src/lib/quotation/components/Quotationheader.jsx
index 14743fd6..10e3e147 100644
--- a/src/lib/quotation/components/Quotationheader.jsx
+++ b/src/lib/quotation/components/Quotationheader.jsx
@@ -25,7 +25,7 @@ const Quotationheader = (quotationCount) => {
   const [buttonLoading, SetButtonTerapkan] = useState(false);
   const itemLoading = [1, 2, 3];
   const [countQuotation, setCountQuotation] = useState(null);
-  const { productCart, setProductCart, refreshCart, setRefreshCart, isLoading, setIsloading, productQuotation, setProductQuotation, refreshQuotation, setRefreshQuotation } =
+  const { productCart, setProductCart, refreshCart, setRefreshCart, isLoading, setIsloading, productQuotation, setProductQuotation } =
   useProductCartContext();
 
   const [isHovered, setIsHovered] = useState(false);
@@ -72,11 +72,11 @@ const Quotationheader = (quotationCount) => {
   }, [qotation])
 
   useEffect(() => {
-    if (refreshQuotation) {
+    if (refreshCart) {
       refreshCartf();
     }
-    setRefreshQuotation(false);
-  }, [refreshQuotation, refreshCartf, setRefreshQuotation]);
+    setRefreshCart(false);
+  }, [ refreshCartf, setRefreshCart]);
 
   useEffect(() => {
     setCountQuotation(quotationCount.quotationCount);
@@ -150,9 +150,6 @@ const Quotationheader = (quotationCount) => {
               >
                 <div className='p-2 flex justify-between items-center'>
                   <h5 className='text-base font-semibold leading-none'>Daftar Quotation</h5>
-                  <Link href='/my/quotations' class='text-sm font-medium text-red-600 underline'>
-                    Lihat Semua
-                  </Link>
                 </div>
                 <hr className='mt-3 mb-3 border border-gray-100' />
                 <div className='flow-root max-h-[250px] overflow-y-auto'>
@@ -221,7 +218,8 @@ const Quotationheader = (quotationCount) => {
                                         <p className='font-semibold text-sm text-red-500'> {product.purchaseOrderName ? product.purchaseOrderName : '-'}</p>
                                       </div>
                                     </div>
-                                    <div className='my-0.5 h-0.5 bg-gray-200'></div>
+                                    {/* <div className='my-0.5 h-0.5 bg-gray-200'></div> */}
+                                    <hr className='mt-3 mb-3 border border-gray-100' />
                                     <div className='bagian bawah flex justify-between mt-2'>
                                       <p className='font-semibold text-sm'>Total</p>
                                       <p className='font-semibold text-sm'>{currencyFormat(product.amountUntaxed)}</p>
@@ -238,18 +236,18 @@ const Quotationheader = (quotationCount) => {
                 </div>
                 {auth && qotation.length > 0 && !isLoading && (
                   <>
-                    <div className='mt-3'>
+                    <div className='mt-3 ml-1'>
                       <span className='text-gray-400 text-caption-2'>Subtotal Sebelum PPN : </span>
                       <span className='font-semibold text-red-600'>{currencyFormat(subTotal)}</span>
                     </div>
                     <div className='mt-5 mb-2'>
                       <button
                         type='button'
-                        className='btn-yellow rounded-lg w-full'
+                        className='btn-solid-red rounded-lg w-full'
                         onClick={handleCheckout}
                         disabled={buttonLoading}
                       >
-                        {buttonLoading ? 'Loading...' : 'Buat Quotation'}
+                        {buttonLoading ? 'Loading...' : 'Lihat Semua'}
                       </button>
                     </div>
                   </>
-- 
cgit v1.2.3

