From 016cbe790dd698ee258f17c8218ef6fdc667ad0d Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Fri, 27 Sep 2024 17:00:00 +0700 Subject: update switch account --- src/lib/auth/components/Menu.jsx | 187 ++++++++++++++++++++++++++------------- 1 file changed, 124 insertions(+), 63 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..ddbb0760 100644 --- a/src/lib/auth/components/Menu.jsx +++ b/src/lib/auth/components/Menu.jsx @@ -1,76 +1,137 @@ -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'; +import useAuth from '@/core/hooks/useAuth'; +import Divider from '@/core/components/elements/Divider/Divider'; const Menu = () => { - const router = useRouter() - - const routeStartWith = (route) => router.pathname.startsWith(route) - + const router = useRouter(); + const auth = useAuth(); + const routeStartWith = (route) => router.pathname.startsWith(route); return (
-
Menu
- -
- -

Daftar Quotation

-
-
- -
- -

Daftar Transaksi

-
-
- -
- -

Daftar Pengiriman

-
-
- -
- -

Invoice & Faktur Pajak

-
-
- -
- -

Wishlist

-
-
+
+
Akun Saya
+ {auth?.company && ( +
Akun Bisnis
+ )} + {!auth?.company && ( +
Akun Individu
+ )} +
+
Menu
+
+ +
+ +

Daftar Quotation

+
+
+ +
+ +

Daftar Transaksi

+
+
+ +
+ +

Daftar Pengiriman

+
+
+ +
+ +

Invoice & Faktur Pajak

+
+
+ +
+ +

Wishlist

+
+
+
Pusat Bantuan
- +
- +

Layanan Pelanggan

Pengaturan Akun
- -
- -

Daftar Alamat

-
-
- -
- -

Profil Saya

-
-
- +
+ +
+ +

Daftar Alamat

+
+
+ +
+ +

Profil Saya

+
+
+ +
- ) -} + ); +}; const LinkItem = ({ children, ...props }) => ( ( > {children} -) +); -export default Menu +export default Menu; -- cgit v1.2.3 From 6de06f74f0a004900ecc415b91eb03d1b58a872f Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Sat, 28 Sep 2024 08:57:08 +0700 Subject: add hover --- src/lib/auth/components/Menu.jsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 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 ddbb0760..979de83b 100644 --- a/src/lib/auth/components/Menu.jsx +++ b/src/lib/auth/components/Menu.jsx @@ -118,7 +118,10 @@ const Menu = () => {

Profil Saya

- - ) -} + ); +}; const LinkItem = ({ children, ...props }) => ( ( > {children} -) +); -export default Menu +export default Menu; -- cgit v1.2.3 From 77f9843ad5072583cb1797d7ecf5ac80394bad3f Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Mon, 2 Dec 2024 09:31:44 +0700 Subject: 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 = () => {

Invoice & Faktur Pajak

- -
- -

Pembayaran Tempo

-
-
+ {(atuh?.partnerTempo.toLowerCase().includes('tempo') || + atuh.tempoProgres == 'review') && ( + +
+ +

Pembayaran Tempo

+
+
+ )}
Date: Wed, 4 Dec 2024 10:59:21 +0700 Subject: 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 = () => {

Invoice & Faktur Pajak

- {(atuh?.partnerTempo.toLowerCase().includes('tempo') || - atuh.tempoProgres == 'review') && ( - -
- -

Pembayaran Tempo

-
-
- )} + {auth && + (auth?.partnerTempo.toLowerCase().includes('tempo') || + auth.tempoProgres == 'review') && ( + +
+ +

Pembayaran Tempo

+
+
+ )}
Date: Thu, 9 Jan 2025 08:53:25 +0700 Subject: 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 = () => {
{auth && - (auth?.partnerTempo.toLowerCase().includes('tempo') || - auth.tempoProgres == 'review') && ( + auth.partnerTempo && + (auth.partnerTempo?.toLowerCase().includes('tempo') || + auth.tempoProgres === 'review') && (
Date: Fri, 10 Jan 2025 15:26:44 +0700 Subject: 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 = () => { {auth && auth.partnerTempo && - (auth.partnerTempo?.toLowerCase().includes('tempo') || + (auth.partnerTempo || auth.tempoProgres === 'review') && (
-- cgit v1.2.3