diff --git a/pkgs/clan-app/ui/src/workflows/Service/Service.tsx b/pkgs/clan-app/ui/src/workflows/Service/Service.tsx index 394714f01..54d9edb60 100644 --- a/pkgs/clan-app/ui/src/workflows/Service/Service.tsx +++ b/pkgs/clan-app/ui/src/workflows/Service/Service.tsx @@ -128,7 +128,6 @@ const ConfigureService = () => { ([instances, machines]) => { // Wait for all queries to be ready if (!instances || !machines) return; - const instance = instances[routerProps.id || routerProps.name]; set("roles", {}); @@ -147,6 +146,15 @@ const ConfigureService = () => { ), ); + const currentModuleRoles = createMemo(() => { + const module = selectedModule(); + if (!module) return []; + return Object.keys(module.info.roles).map((role) => ({ + role, + members: store.roles?.[role] || [], + })); + }); + const tagsQuery = useTags(useClanURI()); const options = useOptions(tagsQuery, machinesQuery); @@ -220,12 +228,11 @@ const ConfigureService = () => { when={serviceModulesQuery.data && store.roles} fallback={