From f2fc34da455d755b8d5b3252299e2fae04e37c21 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Fri, 22 Sep 2023 10:35:48 +0700
Subject: fixing error cart

---
 src/lib/cart/components/Cartheader.jsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/lib/cart/components/Cartheader.jsx')

diff --git a/src/lib/cart/components/Cartheader.jsx b/src/lib/cart/components/Cartheader.jsx
index dd6c276e..ab5dfdaa 100644
--- a/src/lib/cart/components/Cartheader.jsx
+++ b/src/lib/cart/components/Cartheader.jsx
@@ -158,14 +158,14 @@ const Cardheader = (cartCount) => {
                   </div>
                 </div>
               ))}
-            {products.length === 0 && !isLoading && (
+            {auth && products.length === 0 && !isLoading && (
               <div className='justify-center p-4'>
                 <p className='text-gray-500 text-center '>
                   Tidak Ada Produk di Keranjang Belanja Anda
                 </p>
               </div>
             )}
-            {products.length > 0 && !isLoading && (
+            {auth && products.length > 0 && !isLoading && (
               <>
                 <ul role='list' class='divide-y divide-gray-200 dark:divide-gray-700'>
                   {products &&
@@ -251,10 +251,10 @@ const Cardheader = (cartCount) => {
               </>
             )}
           </div>
-          {products.length > 0 && !isLoading && (
+          {auth && products.length > 0 && !isLoading && (
             <>
               <div className='mt-3'>
-                <span className='text-gray-400 text-caption-2'>Sub Total Sebelum PPN : </span>
+                <span className='text-gray-400 text-caption-2'>Subtotal Sebelum PPN : </span>
                 <span className='font-semibold text-red-600'>Rp. {currencyFormat(subTotal)}</span>
               </div>
               <div className='mt-5 mb-2'>
-- 
cgit v1.2.3


From 8e4e981060b612f5d21f141d62656df80e2a0a4b Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Fri, 22 Sep 2023 11:31:14 +0700
Subject: bugs fix rp double

---
 src/lib/cart/components/Cartheader.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/lib/cart/components/Cartheader.jsx')

diff --git a/src/lib/cart/components/Cartheader.jsx b/src/lib/cart/components/Cartheader.jsx
index ab5dfdaa..863b8a46 100644
--- a/src/lib/cart/components/Cartheader.jsx
+++ b/src/lib/cart/components/Cartheader.jsx
@@ -255,7 +255,7 @@ const Cardheader = (cartCount) => {
             <>
               <div className='mt-3'>
                 <span className='text-gray-400 text-caption-2'>Subtotal Sebelum PPN : </span>
-                <span className='font-semibold text-red-600'>Rp. {currencyFormat(subTotal)}</span>
+                <span className='font-semibold text-red-600'>{currencyFormat(subTotal)}</span>
               </div>
               <div className='mt-5 mb-2'>
                 <button
-- 
cgit v1.2.3


From 562f5c23badaeb8640236de38193dccf38d6d1ed Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Fri, 22 Sep 2023 16:43:11 +0700
Subject: update variant

---
 src/lib/cart/components/Cartheader.jsx | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src/lib/cart/components/Cartheader.jsx')

diff --git a/src/lib/cart/components/Cartheader.jsx b/src/lib/cart/components/Cartheader.jsx
index 863b8a46..085b9408 100644
--- a/src/lib/cart/components/Cartheader.jsx
+++ b/src/lib/cart/components/Cartheader.jsx
@@ -8,6 +8,7 @@ import { useRouter } from 'next/router'
 import odooApi from '@/core/api/odooApi'
 import { useProductCartContext } from '@/contexts/ProductCartContext'
 import whatsappUrl from '@/core/utils/whatsappUrl'
+import SummaryProduct from '@/core/components/elements/Product/SummaryProduct'
 
 const { ShoppingCartIcon, PhotoIcon } = require('@heroicons/react/24/outline')
 const { default: Link } = require('next/link')
@@ -73,6 +74,7 @@ const Cardheader = (cartCount) => {
   useEffect(() => {
     if (refreshCart) {
       refreshCartf()
+      console.log('ini masuk')
     }
     setRefreshCart(false)
   }, [refreshCart, refreshCartf, setRefreshCart])
@@ -131,6 +133,7 @@ const Cardheader = (cartCount) => {
             </Link>
           </div>
           <hr className='mt-3 mb-3 border border-gray-100' />
+          {/* <SummaryProduct products = {products} isLoading={isLoading} itemLoading = {itemLoading}/> */}
           <div className='flow-root max-h-[250px] overflow-y-auto'>
             {!auth && (
               <div className='justify-center p-4'>
-- 
cgit v1.2.3


From 48cd6983f253319940cb27b2fbbb14eb597253a6 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Mon, 25 Sep 2023 09:21:33 +0700
Subject: add update cart di page variant product

---
 src/lib/cart/components/Cartheader.jsx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'src/lib/cart/components/Cartheader.jsx')

diff --git a/src/lib/cart/components/Cartheader.jsx b/src/lib/cart/components/Cartheader.jsx
index 085b9408..d330ccb6 100644
--- a/src/lib/cart/components/Cartheader.jsx
+++ b/src/lib/cart/components/Cartheader.jsx
@@ -49,7 +49,7 @@ const Cardheader = (cartCount) => {
     setProductCart(cart)
     setCountCart(cart.productTotal)
     setIsloading(false)
-  }, [setProductCart])
+  }, [setProductCart, setIsloading])
 
   useEffect(() => {
     if (!products) return
@@ -74,7 +74,6 @@ const Cardheader = (cartCount) => {
   useEffect(() => {
     if (refreshCart) {
       refreshCartf()
-      console.log('ini masuk')
     }
     setRefreshCart(false)
   }, [refreshCart, refreshCartf, setRefreshCart])
-- 
cgit v1.2.3


From 4d329fbe4ecadd7864809f340d9e4f46d910e418 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Mon, 25 Sep 2023 09:28:23 +0700
Subject: delete coponent summary product

---
 src/lib/cart/components/Cartheader.jsx | 2 --
 1 file changed, 2 deletions(-)

(limited to 'src/lib/cart/components/Cartheader.jsx')

diff --git a/src/lib/cart/components/Cartheader.jsx b/src/lib/cart/components/Cartheader.jsx
index d330ccb6..cbe7c7e1 100644
--- a/src/lib/cart/components/Cartheader.jsx
+++ b/src/lib/cart/components/Cartheader.jsx
@@ -8,7 +8,6 @@ import { useRouter } from 'next/router'
 import odooApi from '@/core/api/odooApi'
 import { useProductCartContext } from '@/contexts/ProductCartContext'
 import whatsappUrl from '@/core/utils/whatsappUrl'
-import SummaryProduct from '@/core/components/elements/Product/SummaryProduct'
 
 const { ShoppingCartIcon, PhotoIcon } = require('@heroicons/react/24/outline')
 const { default: Link } = require('next/link')
@@ -132,7 +131,6 @@ const Cardheader = (cartCount) => {
             </Link>
           </div>
           <hr className='mt-3 mb-3 border border-gray-100' />
-          {/* <SummaryProduct products = {products} isLoading={isLoading} itemLoading = {itemLoading}/> */}
           <div className='flow-root max-h-[250px] overflow-y-auto'>
             {!auth && (
               <div className='justify-center p-4'>
-- 
cgit v1.2.3

