-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #723 from jembi/feature/CU-86c13vkmc-ui_updates
feat: use icons instead of emojis.
- Loading branch information
Showing
5 changed files
with
88 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,11 +78,12 @@ function UsersList() { | |
window.history.pushState({}, '', `/#!/users/edit-user/` + user._id) | ||
} | ||
|
||
const onDeleteUser = (user: User) => { | ||
const isRootRole = | ||
user?.groups?.includes('admin') && user.email == '[email protected]' | ||
const isRootRole = (user: User) => | ||
user?.groups?.includes('admin') && user.email == '[email protected]' | ||
|
||
|
||
if (isRootRole) { | ||
const onDeleteUser = (user: User) => { | ||
if (isRootRole(user)) { | ||
return showAlert('Cannot delete the root user', 'Error', 'error') | ||
} | ||
|
||
|
@@ -132,7 +133,7 @@ function UsersList() { | |
<IconButton onClick={() => onEditUser(params.row)}> | ||
<CreateIcon /> | ||
</IconButton> | ||
<IconButton onClick={() => onDeleteUser(params.row)}> | ||
<IconButton disabled={isRootRole(params.row)} onClick={() => onDeleteUser(params.row)}> | ||
<GridDeleteForeverIcon /> | ||
</IconButton> | ||
</> | ||
|
@@ -142,7 +143,7 @@ function UsersList() { | |
|
||
return ( | ||
<BasePageTemplate | ||
title="Manager Users" | ||
title="Manage Users" | ||
subtitle="View and manage OpenHIM users, add new users and assign them specific roles to ensure appropriate access and functionality." | ||
button={ | ||
<Button | ||
|