From 46731ba679c0585160e58d796dc26a0d92b0e421 Mon Sep 17 00:00:00 2001 From: zak39 Date: Tue, 29 Oct 2024 14:49:38 +0100 Subject: [PATCH] fix(vue,js): Check if a group is an added group or not --- src/GroupDetails.vue | 4 ++-- src/store/getters.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/GroupDetails.vue b/src/GroupDetails.vue index d427b1b9f..1c73dfbe9 100644 --- a/src/GroupDetails.vue +++ b/src/GroupDetails.vue @@ -40,7 +40,7 @@ - @@ -53,7 +53,7 @@ @submit="onRenameGroup"> {{ t('workspace', 'Group name') }} - {{ t('workspace', 'Delete group') }} diff --git a/src/store/getters.js b/src/store/getters.js index 35e777248..96da06a19 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -68,7 +68,8 @@ export const getters = { // Test if group is from space added groups isSpaceAddedGroup: state => (spaceName, groupName) => { const space = state.spaces[spaceName] - return space.added_groups[groupName] + const gids = Object.keys(space.added_groups) + return gids.includes(groupName) }, // Tests wheter a group is the GE or U group of a space isGEorUGroup: (state, getters) => (spaceName, gid) => {