Renaming function to more accurately reflect its group app ID lookup purpose.
This commit is contained in:
parent
25b8f0ca3b
commit
31208b1f8f
|
@ -53,7 +53,7 @@
|
|||
: publishedApps.filter(app => {
|
||||
return userGroups.find(group => {
|
||||
return groups.actions
|
||||
.getGroupApps(group)
|
||||
.getGroupAppIds(group)
|
||||
.map(role => apps.extractAppId(role))
|
||||
.includes(app.appId)
|
||||
})
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
$: group = $groups.find(x => x._id === groupId)
|
||||
$: filtered = $users.data
|
||||
$: groupApps = $apps.filter(app =>
|
||||
groups.actions.getGroupApps(group).includes(app.appId)
|
||||
groups.actions.getGroupAppIds(group).includes(app.appId)
|
||||
)
|
||||
$: {
|
||||
if (loaded && !group?._id) {
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
if (!group.roles) {
|
||||
return false
|
||||
}
|
||||
return groups.actions.getGroupApps(group).includes(fixedAppId)
|
||||
return groups.actions.getGroupAppIds(group).includes(fixedAppId)
|
||||
})
|
||||
|
||||
async function removeUser(user) {
|
||||
|
@ -114,7 +114,9 @@
|
|||
autoWidth
|
||||
quiet
|
||||
value={group.roles[
|
||||
groups.actions.getGroupApps(group).find(x => x === fixedAppId)
|
||||
groups.actions
|
||||
.getGroupAppIds(group)
|
||||
.find(x => x === fixedAppId)
|
||||
]}
|
||||
allowPublic={false}
|
||||
/>
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
search = search?.toLowerCase()
|
||||
return (allGroups || []).filter(group => {
|
||||
// Filter out assigned groups
|
||||
const appIds = groups.actions.getGroupApps(group)
|
||||
const appIds = groups.actions.getGroupAppIds(group)
|
||||
if (appIds.includes(appId)) {
|
||||
return false
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ export function createGroupsStore() {
|
|||
await getGroup(groupId)
|
||||
},
|
||||
|
||||
getGroupApps: group => {
|
||||
getGroupAppIds: group => {
|
||||
return Object.keys(group?.roles || {})
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue