summaryrefslogtreecommitdiff
path: root/src/pages
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-11-13 16:46:14 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-11-13 16:46:14 +0700
commit9622bff4d4902fcef81214236cc7ff035163e5e7 (patch)
tree666a57d246533aa2b9f547ef306d1293adc5efad /src/pages
parentc873a401f0ea13e1881278e7977d4013d3a87394 (diff)
<iman> pengajuan tempo
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/my/menu.jsx104
-rw-r--r--src/pages/my/tempo/index.jsx27
2 files changed, 102 insertions, 29 deletions
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>
-)
+);
diff --git a/src/pages/my/tempo/index.jsx b/src/pages/my/tempo/index.jsx
new file mode 100644
index 00000000..e540fbda
--- /dev/null
+++ b/src/pages/my/tempo/index.jsx
@@ -0,0 +1,27 @@
+import Seo from '@/core/components/Seo';
+import AppLayout from '@/core/components/layouts/AppLayout';
+import BasicLayout from '@/core/components/layouts/BasicLayout';
+import DesktopView from '@/core/components/views/DesktopView';
+import MobileView from '@/core/components/views/MobileView';
+import IsAuth from '@/lib/auth/components/IsAuth';
+import InvoicesComponent from '@/lib/invoice/components/Invoices';
+
+export default function MyTempo() {
+ return (
+ <IsAuth>
+ <Seo title='Tempo - Indoteknik.com' />
+
+ <MobileView>
+ <AppLayout title='Pembayaran Tempo'>
+ <InvoicesComponent />
+ </AppLayout>
+ </MobileView>
+
+ <DesktopView>
+ <BasicLayout>
+ <InvoicesComponent />
+ </BasicLayout>
+ </DesktopView>
+ </IsAuth>
+ );
+}