From 9622bff4d4902fcef81214236cc7ff035163e5e7 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 13 Nov 2024 16:46:14 +0700
Subject: <iman> pengajuan tempo

---
 src/lib/auth/components/Menu.jsx | 91 ++++++++++++++++++++++++++++++----------
 1 file changed, 70 insertions(+), 21 deletions(-)

(limited to 'src/lib/auth/components/Menu.jsx')

diff --git a/src/lib/auth/components/Menu.jsx b/src/lib/auth/components/Menu.jsx
index f475db1f..b288eae9 100644
--- a/src/lib/auth/components/Menu.jsx
+++ b/src/lib/auth/components/Menu.jsx
@@ -1,76 +1,125 @@
-import Link from '@/core/components/elements/Link/Link'
-import { useRouter } from 'next/router'
-import ImageNext from 'next/image'
-import whatsappUrl from '@/core/utils/whatsappUrl'
+import Link from '@/core/components/elements/Link/Link';
+import { useRouter } from 'next/router';
+import ImageNext from 'next/image';
+import whatsappUrl from '@/core/utils/whatsappUrl';
 
 const Menu = () => {
-  const router = useRouter()
+  const router = useRouter();
 
-  const routeStartWith = (route) => router.pathname.startsWith(route)
+  const routeStartWith = (route) => router.pathname.startsWith(route);
 
   return (
     <div className='grid grid-cols-1 bg-white border border-gray_r-6 rounded py-2 px-4 sticky top-48'>
       <div className='mt-4 mb-1 font-medium'>Menu</div>
       <LinkItem href='/my/quotations' active={routeStartWith('/my/quotations')}>
         <div className='flex gap-x-3 items-center'>
-          <ImageNext src='/images/icon/icon_daftar_quotation.svg' width={18} height={20} />
+          <ImageNext
+            src='/images/icon/icon_daftar_quotation.svg'
+            width={18}
+            height={20}
+          />
           <p>Daftar Quotation</p>
         </div>
       </LinkItem>
-      <LinkItem href='/my/transactions' active={routeStartWith('/my/transactions')}>
+      <LinkItem
+        href='/my/transactions'
+        active={routeStartWith('/my/transactions')}
+      >
         <div className='flex gap-x-3 items-center'>
-          <ImageNext src='/images/icon/icon_daftar_transaksi.svg' width={18} height={20} />
+          <ImageNext
+            src='/images/icon/icon_daftar_transaksi.svg'
+            width={18}
+            height={20}
+          />
           <p>Daftar Transaksi</p>
         </div>
       </LinkItem>
       <LinkItem href='/my/shipments' active={routeStartWith('/my/shipments')}>
         <div className='flex gap-x-3 items-center'>
-          <ImageNext src='/images/icon/icon_pengiriman.svg' width={18} height={20} />
+          <ImageNext
+            src='/images/icon/icon_pengiriman.svg'
+            width={18}
+            height={20}
+          />
           <p>Daftar Pengiriman</p>
         </div>
       </LinkItem>
       <LinkItem href='/my/invoices' active={routeStartWith('/my/invoices')}>
         <div className='flex gap-x-3 items-center'>
-          <ImageNext src='/images/icon/icon_invoice.svg' width={18} height={20} />
+          <ImageNext
+            src='/images/icon/icon_invoice.svg'
+            width={18}
+            height={20}
+          />
           <p>Invoice & Faktur Pajak</p>
         </div>
       </LinkItem>
+      <LinkItem href='/my/tempo' active={routeStartWith('/my/tempo')}>
+        <div className='flex gap-x-3 items-center'>
+          <ImageNext src='/images/icon/icon_tempo.svg' width={18} height={20} />
+          <p>Pembayaran Tempo</p>
+        </div>
+      </LinkItem>
       <LinkItem href='/my/wishlist' active={routeStartWith('/my/wishlist')}>
         <div className='flex gap-x-3 items-center'>
-          <ImageNext src='/images/icon/icon_wishlist.svg' width={18} height={20} />
+          <ImageNext
+            src='/images/icon/icon_wishlist.svg'
+            width={18}
+            height={20}
+          />
           <p>Wishlist</p>
         </div>
       </LinkItem>
       <div className='mt-4 mb-1 font-medium'>Pusat Bantuan</div>
 
-      <LinkItem href={whatsappUrl('', '', '')} rel='noopener noreferrer' target='_blank'>
+      <LinkItem
+        href={whatsappUrl('', '', '')}
+        rel='noopener noreferrer'
+        target='_blank'
+      >
         <div className='flex gap-x-3 items-center'>
-          <ImageNext src='/images/icon/icon_layanan_pelanggan.svg' width={18} height={20} />
+          <ImageNext
+            src='/images/icon/icon_layanan_pelanggan.svg'
+            width={18}
+            height={20}
+          />
           <p>Layanan Pelanggan</p>
         </div>
       </LinkItem>
       <div className='mt-4 mb-1 font-medium'>Pengaturan Akun</div>
       <LinkItem href='/my/address' active={routeStartWith('/my/address')}>
         <div className='flex gap-x-3 items-center'>
-          <ImageNext src='/images/icon/icon_daftar_alamat.svg' width={18} height={20} />
+          <ImageNext
+            src='/images/icon/icon_daftar_alamat.svg'
+            width={18}
+            height={20}
+          />
           <p>Daftar Alamat</p>
         </div>
       </LinkItem>
       <LinkItem href='/my/profile' active={routeStartWith('/my/profile')}>
         <div className='flex gap-x-3 items-center'>
-          <ImageNext src='/images/icon/icon_profile.svg' width={18} height={20} />
+          <ImageNext
+            src='/images/icon/icon_profile.svg'
+            width={18}
+            height={20}
+          />
           <p>Profil Saya</p>
         </div>
       </LinkItem>
       <button type='button' className='text-gray_r-12/80 p-2 text-left'>
         <div className='flex gap-x-3 items-center'>
-          <ImageNext src='/images/icon/icon_logout.svg' width={18} height={20} />
+          <ImageNext
+            src='/images/icon/icon_logout.svg'
+            width={18}
+            height={20}
+          />
           <p>Keluar Akun</p>
         </div>
       </button>
     </div>
-  )
-}
+  );
+};
 
 const LinkItem = ({ children, ...props }) => (
   <Link
@@ -81,6 +130,6 @@ const LinkItem = ({ children, ...props }) => (
   >
     {children}
   </Link>
-)
+);
 
-export default Menu
+export default Menu;
-- 
cgit v1.2.3


From 77f9843ad5072583cb1797d7ecf5ac80394bad3f Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 2 Dec 2024 09:31:44 +0700
Subject: <iman> pengajuan tempo

---
 src/lib/auth/components/Menu.jsx | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

(limited to 'src/lib/auth/components/Menu.jsx')

diff --git a/src/lib/auth/components/Menu.jsx b/src/lib/auth/components/Menu.jsx
index 18d8df91..466b793e 100644
--- a/src/lib/auth/components/Menu.jsx
+++ b/src/lib/auth/components/Menu.jsx
@@ -3,8 +3,10 @@ import { useRouter } from 'next/router';
 import ImageNext from 'next/image';
 import whatsappUrl from '@/core/utils/whatsappUrl';
 import { deleteAuth } from '@/core/utils/auth';
+import useAuth from '@/core/hooks/useAuth';
 const Menu = () => {
   const router = useRouter();
+  const auth = useAuth();
 
   const routeStartWith = (route) => router.pathname.startsWith(route);
 
@@ -60,12 +62,19 @@ const Menu = () => {
           <p>Invoice & Faktur Pajak</p>
         </div>
       </LinkItem>
-      <LinkItem href='/my/tempo' active={routeStartWith('/my/tempo')}>
-        <div className='flex gap-x-3 items-center'>
-          <ImageNext src='/images/icon/icon_tempo.svg' width={18} height={20} />
-          <p>Pembayaran Tempo</p>
-        </div>
-      </LinkItem>
+      {(atuh?.partnerTempo.toLowerCase().includes('tempo') ||
+        atuh.tempoProgres == 'review') && (
+        <LinkItem href='/my/tempo' active={routeStartWith('/my/tempo')}>
+          <div className='flex gap-x-3 items-center'>
+            <ImageNext
+              src='/images/icon/icon_tempo.svg'
+              width={18}
+              height={20}
+            />
+            <p>Pembayaran Tempo</p>
+          </div>
+        </LinkItem>
+      )}
       <LinkItem href='/my/wishlist' active={routeStartWith('/my/wishlist')}>
         <div className='flex gap-x-3 items-center'>
           <ImageNext
-- 
cgit v1.2.3


From 9a49b8d84761781531cb417731cb9ef802f63541 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 4 Dec 2024 10:59:21 +0700
Subject: <iman> update pengajuan tempo

---
 src/lib/auth/components/Menu.jsx | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

(limited to 'src/lib/auth/components/Menu.jsx')

diff --git a/src/lib/auth/components/Menu.jsx b/src/lib/auth/components/Menu.jsx
index 466b793e..82a4de81 100644
--- a/src/lib/auth/components/Menu.jsx
+++ b/src/lib/auth/components/Menu.jsx
@@ -62,19 +62,20 @@ const Menu = () => {
           <p>Invoice & Faktur Pajak</p>
         </div>
       </LinkItem>
-      {(atuh?.partnerTempo.toLowerCase().includes('tempo') ||
-        atuh.tempoProgres == 'review') && (
-        <LinkItem href='/my/tempo' active={routeStartWith('/my/tempo')}>
-          <div className='flex gap-x-3 items-center'>
-            <ImageNext
-              src='/images/icon/icon_tempo.svg'
-              width={18}
-              height={20}
-            />
-            <p>Pembayaran Tempo</p>
-          </div>
-        </LinkItem>
-      )}
+      {auth &&
+        (auth?.partnerTempo.toLowerCase().includes('tempo') ||
+          auth.tempoProgres == 'review') && (
+          <LinkItem href='/my/tempo' active={routeStartWith('/my/tempo')}>
+            <div className='flex gap-x-3 items-center'>
+              <ImageNext
+                src='/images/icon/icon_tempo.svg'
+                width={18}
+                height={20}
+              />
+              <p>Pembayaran Tempo</p>
+            </div>
+          </LinkItem>
+        )}
       <LinkItem href='/my/wishlist' active={routeStartWith('/my/wishlist')}>
         <div className='flex gap-x-3 items-center'>
           <ImageNext
-- 
cgit v1.2.3


From 6f4ecaa362c2333c59d08f775c13fa1c5bf5e13b Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 9 Jan 2025 08:53:25 +0700
Subject: <iman> update tempo

---
 src/lib/auth/components/Menu.jsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/lib/auth/components/Menu.jsx')

diff --git a/src/lib/auth/components/Menu.jsx b/src/lib/auth/components/Menu.jsx
index 82a4de81..b562878d 100644
--- a/src/lib/auth/components/Menu.jsx
+++ b/src/lib/auth/components/Menu.jsx
@@ -63,8 +63,9 @@ const Menu = () => {
         </div>
       </LinkItem>
       {auth &&
-        (auth?.partnerTempo.toLowerCase().includes('tempo') ||
-          auth.tempoProgres == 'review') && (
+        auth.partnerTempo &&
+        (auth.partnerTempo?.toLowerCase().includes('tempo') ||
+          auth.tempoProgres === 'review') && (
           <LinkItem href='/my/tempo' active={routeStartWith('/my/tempo')}>
             <div className='flex gap-x-3 items-center'>
               <ImageNext
-- 
cgit v1.2.3


From fedaceac3e41741c198c94fd20917c9572fa7ec1 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 10 Jan 2025 15:26:44 +0700
Subject: <iman> update tempo page mobile view

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

(limited to 'src/lib/auth/components/Menu.jsx')

diff --git a/src/lib/auth/components/Menu.jsx b/src/lib/auth/components/Menu.jsx
index b562878d..d99917d0 100644
--- a/src/lib/auth/components/Menu.jsx
+++ b/src/lib/auth/components/Menu.jsx
@@ -64,7 +64,7 @@ const Menu = () => {
       </LinkItem>
       {auth &&
         auth.partnerTempo &&
-        (auth.partnerTempo?.toLowerCase().includes('tempo') ||
+        (auth.partnerTempo ||
           auth.tempoProgres === 'review') && (
           <LinkItem href='/my/tempo' active={routeStartWith('/my/tempo')}>
             <div className='flex gap-x-3 items-center'>
-- 
cgit v1.2.3

