1
0
Fork 0
mirror of synced 2024-09-08 21:51:58 +12:00

Renaming function to more accurately reflect its group app ID lookup purpose.

This commit is contained in:
mike12345567 2022-09-22 13:57:44 +01:00
parent 25b8f0ca3b
commit 31208b1f8f
5 changed files with 8 additions and 6 deletions

View file

@ -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)
})

View file

@ -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) {

View file

@ -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}
/>

View file

@ -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
}

View file

@ -77,7 +77,7 @@ export function createGroupsStore() {
await getGroup(groupId)
},
getGroupApps: group => {
getGroupAppIds: group => {
return Object.keys(group?.roles || {})
},
}