From c6b0a8b176e74bf52bfa758ea2753138c6d8e1b3 Mon Sep 17 00:00:00 2001 From: Ashesh3 <3626859+Ashesh3@users.noreply.github.com> Date: Fri, 12 Jan 2024 23:13:03 +0530 Subject: [PATCH] Refactor user delete button in FacilityUsers and ManageUsers components --- src/Components/Facility/FacilityUsers.tsx | 14 ++++++++------ src/Components/Users/ManageUsers.tsx | 16 ++++++++-------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/Components/Facility/FacilityUsers.tsx b/src/Components/Facility/FacilityUsers.tsx index ca2e1d0e363..f18b9578192 100644 --- a/src/Components/Facility/FacilityUsers.tsx +++ b/src/Components/Facility/FacilityUsers.tsx @@ -296,7 +296,10 @@ export default function FacilityUsers(props: any) { -
+
{`${user.first_name} ${user.last_name}`} {user.last_login && isUserOnline(user) ? ( @@ -306,13 +309,12 @@ export default function FacilityUsers(props: any) { > ) : null} {showUserDelete(authUser, user) && ( - + +
)}
diff --git a/src/Components/Users/ManageUsers.tsx b/src/Components/Users/ManageUsers.tsx index 750603ccf6f..300f9846a89 100644 --- a/src/Components/Users/ManageUsers.tsx +++ b/src/Components/Users/ManageUsers.tsx @@ -218,7 +218,10 @@ export default function ManageUsers() { )} -
+
{`${user.first_name} ${user.last_name}`} {user.last_login && cur_online ? ( @@ -228,15 +231,12 @@ export default function ManageUsers() { > ) : null} {showUserDelete(authUser, user) && ( - handleDelete(user)} > - Delete - + +
)}