From afedcb52d633b80502b1631b1752aa41f5833f2d Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 19 Aug 2022 13:16:01 +0200 Subject: [PATCH] fix(ui) - user list show member --- frontend/app/components/Client/Users/UsersView.tsx | 6 +----- .../Client/Users/components/UserListItem/UserListItem.tsx | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/app/components/Client/Users/UsersView.tsx b/frontend/app/components/Client/Users/UsersView.tsx index 860f62d6d..cc393d3d5 100644 --- a/frontend/app/components/Client/Users/UsersView.tsx +++ b/frontend/app/components/Client/Users/UsersView.tsx @@ -13,16 +13,13 @@ interface Props { isOnboarding?: boolean; account: any; isEnterprise: boolean; - limits: any; } function UsersView(props: Props) { - const { account, limits, isEnterprise, isOnboarding = false } = props; + const { account, isEnterprise, isOnboarding = false } = props; const { userStore, roleStore } = useStore(); const userCount = useObserver(() => userStore.list.length); const roles = useObserver(() => roleStore.list); const { showModal } = useModal(); - - const reachedLimit = limits.remaining + userStore.modifiedCount <= 0; const isAdmin = account.admin || account.superAdmin; const editHandler = (user: any = null) => { @@ -60,5 +57,4 @@ function UsersView(props: Props) { export default connect((state: any) => ({ account: state.getIn(['user', 'account']), isEnterprise: state.getIn(['user', 'account', 'edition']) === 'ee', - limits: state.getIn(['user', 'account', 'limits', 'teamMember']), }))(UsersView); diff --git a/frontend/app/components/Client/Users/components/UserListItem/UserListItem.tsx b/frontend/app/components/Client/Users/components/UserListItem/UserListItem.tsx index c8a42f07d..f8aecf7f6 100644 --- a/frontend/app/components/Client/Users/components/UserListItem/UserListItem.tsx +++ b/frontend/app/components/Client/Users/components/UserListItem/UserListItem.tsx @@ -9,6 +9,7 @@ const AdminPrivilegeLabel = ({ user }) => { <> {user.isAdmin && Admin} {user.isSuperAdmin && Owner} + {!user.isAdmin && !user.isSuperAdmin && Member} ); };