From 00d1a1925b55ff4f3e9150a451d94531259e368e Mon Sep 17 00:00:00 2001 From: Sulochan Khadka <122200551+Sulochan-khadka@users.noreply.github.com> Date: Tue, 16 Apr 2024 09:32:26 +0530 Subject: [PATCH] keeping showLinkFacility --- src/Components/Facility/FacilityUsers.tsx | 102 +++++++++++----------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/src/Components/Facility/FacilityUsers.tsx b/src/Components/Facility/FacilityUsers.tsx index 65db5d3558d..3194dbe49ac 100644 --- a/src/Components/Facility/FacilityUsers.tsx +++ b/src/Components/Facility/FacilityUsers.tsx @@ -183,57 +183,57 @@ export default function FacilityUsers(props: any) { ); }; - // const showFacilities = (username: string, facilities: FacilityModel[]) => { - // if (!facilities || !facilities.length) { - // return ( - // <> - //
No Facilities!
- // {showLinkFacility(username)} - // - // ); - // } - // return ( - //
- //
- // {facilities.map((facility, i) => ( - //
- //
- //
{facility.name}
- // - // setUnlinkFacilityData({ - // show: true, - // facility: facility, - // userName: username, - // }) - // } - // > - // - // - //
- //
- // ))} - //
- // {showLinkFacility(username)} - // {unlinkFacilityData.show && ( - // - // )} - //
- // ); - // }; + const showFacilities = (username: string, facilities: FacilityModel[]) => { + if (!facilities || !facilities.length) { + return ( + <> +
No Facilities!
+ {showLinkFacility(username)} + + ); + } + return ( +
+
+ {facilities.map((facility, i) => ( +
+
+
{facility.name}
+ + setUnlinkFacilityData({ + show: true, + facility: facility, + userName: username, + }) + } + > + + +
+
+ ))} +
+ {showLinkFacility(username)} + {unlinkFacilityData.show && ( + + )} +
+ ); + }; const addFacility = async (username: string, facility: any) => { hideLinkFacilityModal();