From 87e8dd6516d944ee71ccb2a540743f032bcaea43 Mon Sep 17 00:00:00 2001 From: bkristmundsson Date: Fri, 27 Dec 2024 09:35:10 +0000 Subject: [PATCH] TS-936 Municipality - Fix after code rabbit review --- apps/skilavottord/web/screens/AccessControl/AccessControl.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/skilavottord/web/screens/AccessControl/AccessControl.tsx b/apps/skilavottord/web/screens/AccessControl/AccessControl.tsx index 5a19257ba006..b668b457eb27 100644 --- a/apps/skilavottord/web/screens/AccessControl/AccessControl.tsx +++ b/apps/skilavottord/web/screens/AccessControl/AccessControl.tsx @@ -258,7 +258,7 @@ const AccessControl: FC> = () => { !hasDeveloperRole(user?.role) ? role !== Role.developer : role, ) .filter((role) => { - if (hasMunicipalityRole(Role.municipality)) { + if (hasMunicipalityRole(user?.role)) { return ( role === Role.recyclingCompany || role === Role.recyclingCompanyAdmin || @@ -272,6 +272,7 @@ const AccessControl: FC> = () => { label: getRoleTranslation(role as Role, activeLocale), value: role, })) + .sort((a, b) => a.label.localeCompare(b.label)) const handleCreateAccessControlCloseModal = () => setIsCreateAccessControlModalVisible(false)