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/pages/my/menu.jsx | 104 ++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 75 insertions(+), 29 deletions(-)

(limited to 'src/pages/my/menu.jsx')

diff --git a/src/pages/my/menu.jsx b/src/pages/my/menu.jsx
index a0ce223e..63b4d35c 100644
--- a/src/pages/my/menu.jsx
+++ b/src/pages/my/menu.jsx
@@ -1,24 +1,24 @@
-import Divider from '@/core/components/elements/Divider/Divider'
-import Link from '@/core/components/elements/Link/Link'
-import AppLayout from '@/core/components/layouts/AppLayout'
-import useAuth from '@/core/hooks/useAuth'
-import { deleteAuth } from '@/core/utils/auth'
-import IsAuth from '@/lib/auth/components/IsAuth'
-import { ChevronRightIcon, UserIcon } from '@heroicons/react/24/solid'
-import { signOut, useSession } from 'next-auth/react'
-import { useRouter } from 'next/router'
-import ImageNext from 'next/image'
+import Divider from '@/core/components/elements/Divider/Divider';
+import Link from '@/core/components/elements/Link/Link';
+import AppLayout from '@/core/components/layouts/AppLayout';
+import useAuth from '@/core/hooks/useAuth';
+import { deleteAuth } from '@/core/utils/auth';
+import IsAuth from '@/lib/auth/components/IsAuth';
+import { ChevronRightIcon, UserIcon } from '@heroicons/react/24/solid';
+import { signOut, useSession } from 'next-auth/react';
+import { useRouter } from 'next/router';
+import ImageNext from 'next/image';
 
 export default function Menu() {
-  const auth = useAuth()
-  const router = useRouter()
-  const { data: session } = useSession()
+  const auth = useAuth();
+  const router = useRouter();
+  const { data: session } = useSession();
 
   const logout = () => {
     deleteAuth().then(() => {
-      router.push('/login')
-    })
-  }
+      router.push('/login');
+    });
+  };
 
   return (
     <IsAuth>
@@ -29,8 +29,12 @@ export default function Menu() {
           </div>
           <div className='ml-4'>
             <div className='font-semibold text-gray_r-12'>{auth?.name}</div>
-            {auth?.company && <div className='badge-solid-red mt-1'>Akun Bisnis</div>}
-            {!auth?.company && <div className='badge-gray mt-1'>Akun Individu</div>}
+            {auth?.company && (
+              <div className='badge-solid-red mt-1'>Akun Bisnis</div>
+            )}
+            {!auth?.company && (
+              <div className='badge-gray mt-1'>Akun Individu</div>
+            )}
           </div>
           <div className='ml-auto !text-gray_r-12'>
             <ChevronRightIcon className='w-6' />
@@ -47,32 +51,63 @@ export default function Menu() {
               <LinkItem href='/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'>
                 <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'>
                 <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'>
                 {' '}
                 <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'>
+                {' '}
+                <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'>
                 <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>
@@ -86,7 +121,11 @@ export default function Menu() {
               <LinkItem href='/'>
                 {' '}
                 <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>
@@ -99,7 +138,11 @@ export default function Menu() {
             <div className='divide-y divide-gray_r-6 border-y border-gray_r-6 mt-4'>
               <LinkItem href='/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>
@@ -112,20 +155,23 @@ export default function Menu() {
         </div>
       </AppLayout>
     </IsAuth>
-  )
+  );
 }
 
 const MenuHeader = ({ children, ...props }) => (
   <div {...props} className='font-medium px-4 flex'>
     {children}
   </div>
-)
+);
 
 const LinkItem = ({ children, ...props }) => (
-  <Link {...props} className='!text-gray_r-12/70 !font-normal p-4 flex items-center'>
+  <Link
+    {...props}
+    className='!text-gray_r-12/70 !font-normal p-4 flex items-center'
+  >
     {children}
     <div className='ml-auto !text-gray_r-11'>
       <ChevronRightIcon className='w-5' />
     </div>
   </Link>
-)
+);
-- 
cgit v1.2.3

