From 08dd698402382bc074fccfe0ee957e9874ef90e5 Mon Sep 17 00:00:00 2001 From: ilham Date: Mon, 3 Jan 2022 00:54:26 +0700 Subject: [PATCH 1/2] fix: profit in profil --- src/pages/Profile/Profile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Profile/Profile.js b/src/pages/Profile/Profile.js index c390507..5fa9a55 100644 --- a/src/pages/Profile/Profile.js +++ b/src/pages/Profile/Profile.js @@ -234,8 +234,8 @@ export const Profile = observer(() => { - {store.authentication.userData.role === "Admin" || - (store.authentication.userData.role === "Supervisor" && ( + {store.authentication.userData.role != "Admin Partner" && + (store.authentication.userData.role != "Retail" && ( From 2fedb5fa6eb21acd257771f8424164164233a61a Mon Sep 17 00:00:00 2001 From: ilham Date: Mon, 3 Jan 2022 01:05:31 +0700 Subject: [PATCH 2/2] fix: fix detail user --- src/pages/Membership/DetailUser.js | 214 ++++++++++++++++++----------- 1 file changed, 136 insertions(+), 78 deletions(-) diff --git a/src/pages/Membership/DetailUser.js b/src/pages/Membership/DetailUser.js index 14eb0b4..159bc47 100644 --- a/src/pages/Membership/DetailUser.js +++ b/src/pages/Membership/DetailUser.js @@ -189,6 +189,7 @@ export const DetailUser = observer(() => { }, }, ]; + const routeData = [ { route: LINKS.HOME, @@ -204,6 +205,19 @@ export const DetailUser = observer(() => { }, ]; + const styleSaldoTitle = store.ui.mediaQuery.isDesktop + ? { + display: "flex", + justifyContent: "center", + } + : { fontSize: "0.75rem" }; + const styleSaldoContent = store.ui.mediaQuery.isDesktop + ? { + fontSize: "1.25rem", + display: "flex", + justifyContent: "center", + } + : null; return (
@@ -251,84 +265,128 @@ export const DetailUser = observer(() => { - {store.authentication.userData.role === "Admin" && ( - - Action User Detail - - )} - {store.authentication.userData.role === "Admin" && ( - - - - - - - )} + + + {store.authentication.userData.role === "Admin" && ( + + Action User Detail + + )} + {store.authentication.userData.role === "Admin" && ( + + + + + + + )} + + + + + + + + Saldo + + + + + {new Intl.NumberFormat("id-ID", { + style: "currency", + currency: "IDR", + }).format(store.authentication.profileData?.wallet || 0)} + + + + + + + + + + Profit + + + + + {new Intl.NumberFormat("id-ID", { + style: "currency", + currency: "IDR", + }).format(store.authentication.profileData?.profit || 0)} + + + + + + + +