mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Merge pull request #378 from YunoHost/enh-filter-by-groups
[enh] Filter by groups
This commit is contained in:
commit
91f89815f2
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
queries: [
|
queries: [
|
||||||
['GET', { uri: 'users' }]
|
['GET', { uri: 'users?fields=username&fields=fullname&fields=mail&fields=mailbox-quota&fields=groups' }]
|
||||||
],
|
],
|
||||||
search: ''
|
search: ''
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ export default {
|
||||||
if (!this.users) return
|
if (!this.users) return
|
||||||
const search = this.search.toLowerCase()
|
const search = this.search.toLowerCase()
|
||||||
const filtered = this.users.filter(user => {
|
const filtered = this.users.filter(user => {
|
||||||
return user.username.toLowerCase().includes(search)
|
return user.username.toLowerCase().includes(search) || user.groups.includes(search)
|
||||||
})
|
})
|
||||||
return filtered.length === 0 ? null : filtered
|
return filtered.length === 0 ? null : filtered
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue