Fix app count in groups list
This commit is contained in:
parent
62d87da024
commit
80e532f59d
|
@ -4,15 +4,16 @@
|
||||||
|
|
||||||
export let value
|
export let value
|
||||||
export let row
|
export let row
|
||||||
$: count = getCount(Object.keys(value || {}).length)
|
|
||||||
|
|
||||||
const getCount = () => {
|
$: count = getCount(row, value)
|
||||||
|
|
||||||
|
const getCount = (row, value) => {
|
||||||
return sdk.users.hasAppBuilderPermissions(row)
|
return sdk.users.hasAppBuilderPermissions(row)
|
||||||
? row.builder.apps.length +
|
? row.builder.apps.length +
|
||||||
Object.keys(row.roles || {}).filter(appId =>
|
Object.keys(row.roles || {}).filter(appId =>
|
||||||
row.builder.apps.includes(appId)
|
row.builder.apps.includes(appId)
|
||||||
).length
|
).length
|
||||||
: value?.length || 0
|
: Object.keys(value || {}).length
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue