Skip to content

Commit

Permalink
Fix group navigation
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Mar 4, 2020
1 parent 4ddf5f7 commit 2978dae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/settings/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default new Router({
name: 'users',
children: [
{
path: ':selectedGroup(.*)',
path: ':selectedGroup',
name: 'group',
component: Users,
},
Expand Down
11 changes: 8 additions & 3 deletions apps/settings/src/views/Users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@
</AppNavigationCounter>
</AppNavigationItem>
<AppNavigationItem
v-if="settings.isAdmin"
id="admin"
:exact="true"
:title="t('settings', 'Admins')"
:to="{ name: 'users', params: { selectedGroup: 'admin' } }"
:to="{ name: 'group', params: { selectedGroup: 'admin' } }"
icon="icon-user-admin">
<AppNavigationCounter v-if="adminGroupMenu.count" slot="counter">
{{ adminGroupMenu.count }}
Expand All @@ -65,7 +66,7 @@
id="disabled"
:exact="true"
:title="t('settings', 'Disabled users')"
:to="{ name: 'users', params: { selectedGroup: 'disabled' } }"
:to="{ name: 'group', params: { selectedGroup: 'disabled' } }"
icon="icon-disabled-users">
<AppNavigationCounter v-if="disabledGroupMenu.usercount > 0" slot="counter">
{{ disabledGroupMenu.usercount }}
Expand All @@ -78,7 +79,7 @@
:key="group.id"
:exact="true"
:title="group.title"
:to="{ name: 'users', params: { selectedGroup: group.id } }">
:to="{ name: 'group', params: { selectedGroup: group.id } }">
<AppNavigationCounter v-if="group.count" slot="counter">
{{ group.count }}
</AppNavigationCounter>
Expand Down Expand Up @@ -489,6 +490,10 @@ export default {
*/
formatGroupMenu(group) {
const item = {}
if (typeof group === 'undefined') {
return {}
}

item.id = group.id
item.title = group.name
item.usercount = group.usercount
Expand Down

0 comments on commit 2978dae

Please sign in to comment.