From a790a23c93e479479bb23b64f95c53e1b9d5ed7a Mon Sep 17 00:00:00 2001 From: "ajat91.sudrajat" Date: Fri, 4 Feb 2022 20:20:04 +0700 Subject: [PATCH] Bug Fixing --- src/component/ProductComponent.js | 4 ++-- src/pages/Membership/DetailUser.js | 4 ++-- src/pages/Membership/Membership.js | 22 ++++++++++++---------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/component/ProductComponent.js b/src/component/ProductComponent.js index b01aca2..df8ddf6 100644 --- a/src/component/ProductComponent.js +++ b/src/component/ProductComponent.js @@ -128,7 +128,7 @@ export const ProductComponent = observer((props) => { ), }, ]; - if (store.authentication.userData.role !== "Admin") columns.pop(); + //if (store.authentication.userData.role !== "Admin") columns.pop(); //if (store.authentication.userData.role === "Admin Partner") delete columns[2]; if (store.authentication.userData.role === "Admin Partner") delete columns[3]; if (store.authentication.userData.role != "Admin Partner") delete columns[4]; @@ -136,7 +136,7 @@ export const ProductComponent = observer((props) => { if (store.authentication.userData.role !== "Admin") delete columns[2]; if (store.authentication.userData.role !== "Admin") delete columns[5]; if (store.authentication.userData.role === "Admin Partner") delete columns[7]; - if (store.authentication.userData.role !== "Admin") delete columns[8]; + //if (store.authentication.userData.role !== "Admin") delete columns[8]; //if (store.authentication.userData.role === "Admin Partner") delete columns[5]; const deleteData = async (id) => { diff --git a/src/pages/Membership/DetailUser.js b/src/pages/Membership/DetailUser.js index 7257b59..642ae26 100644 --- a/src/pages/Membership/DetailUser.js +++ b/src/pages/Membership/DetailUser.js @@ -412,8 +412,8 @@ export const DetailUser = observer(() => { Detail User { key: "action", render: (text, record) => ( - + {store.authentication.userData.role === "Admin" && ( + + )}