From 8946922b5bd22971d510a804778b22af1688870d Mon Sep 17 00:00:00 2001 From: rahman Date: Fri, 12 Aug 2022 18:28:38 +0700 Subject: [PATCH] feat: add column sisa saldo in admin partner --- src/pages/Profile/Profile.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pages/Profile/Profile.js b/src/pages/Profile/Profile.js index 28614d4..b14a43e 100644 --- a/src/pages/Profile/Profile.js +++ b/src/pages/Profile/Profile.js @@ -168,6 +168,16 @@ export const Profile = observer(() => { currency: "IDR", }).format(text), }, + { + title: "Sisa Saldo", + dataIndex: "balance_remaining", + key: "balance_remaining", + render: (text) => + new Intl.NumberFormat("id-ID", { + style: "currency", + currency: "IDR", + }).format(text), + }, { title: "Pembeli", dataIndex: "buyer", @@ -342,6 +352,7 @@ export const Profile = observer(() => { }, }, ]; + if (store.authentication.userData.role !== "Admin Partner") delete columns[2]; const styleSaldoTitle = store.ui.mediaQuery.isDesktop ? { display: "flex",