From 80e532f59d3a70799503fa237b3a593e52b8c412 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 22 Oct 2024 15:33:21 +0100 Subject: [PATCH] Fix app count in groups list --- .../users/groups/_components/GroupAppsTableRenderer.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/users/groups/_components/GroupAppsTableRenderer.svelte b/packages/builder/src/pages/builder/portal/users/groups/_components/GroupAppsTableRenderer.svelte index 48b1bfbce6..37e44a277e 100644 --- a/packages/builder/src/pages/builder/portal/users/groups/_components/GroupAppsTableRenderer.svelte +++ b/packages/builder/src/pages/builder/portal/users/groups/_components/GroupAppsTableRenderer.svelte @@ -4,15 +4,16 @@ export let value export let row - $: count = getCount(Object.keys(value || {}).length) - const getCount = () => { + $: count = getCount(row, value) + + const getCount = (row, value) => { return sdk.users.hasAppBuilderPermissions(row) ? row.builder.apps.length + Object.keys(row.roles || {}).filter(appId => row.builder.apps.includes(appId) ).length - : value?.length || 0 + : Object.keys(value || {}).length }