From d62664c156f8fe2a30a32b80b139e311f9b87034 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 23 Sep 2022 15:42:44 +0100 Subject: [PATCH] Fix user groups already assigned to an app not being filtered out --- .../builder/portal/overview/_components/AssignmentModal.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/portal/overview/_components/AssignmentModal.svelte b/packages/builder/src/pages/builder/portal/overview/_components/AssignmentModal.svelte index adfc81bca7..220242f2c9 100644 --- a/packages/builder/src/pages/builder/portal/overview/_components/AssignmentModal.svelte +++ b/packages/builder/src/pages/builder/portal/overview/_components/AssignmentModal.svelte @@ -39,6 +39,7 @@ $: fixedAppId = apps.getProdAppID(app.devId) $: availableUsers = getAvailableUsers($usersFetch.rows, appUsers, data) $: availableGroups = getAvailableGroups($groups, app.appId, search, data) + $: console.log(availableGroups) $: valid = data?.length && !data?.some(x => !x.id?.length || !x.role?.length) $: optionSections = { ...($licensing.groupsEnabled && @@ -114,7 +115,7 @@ return (allGroups || []).filter(group => { // Filter out assigned groups const appIds = groups.actions.getGroupAppIds(group) - if (appIds.includes(appId)) { + if (appIds.includes(`app_${appId}`)) { return false }