Filter with new implementation of roles list
This commit is contained in:
@@ -4,6 +4,7 @@ export default {
|
||||
|
||||
props: {
|
||||
members: Array,
|
||||
choices: Array,
|
||||
},
|
||||
|
||||
data: function () {
|
||||
@@ -21,8 +22,8 @@ export default {
|
||||
member.status === this.status | this.status === 'all'
|
||||
: true
|
||||
).filter(
|
||||
member => this.role ?
|
||||
member.role.toLowerCase() === this.role | this.role === 'all'
|
||||
member => this.role ? (
|
||||
this.getRoleFromDisplayName(member.role) === this.role | this.role === 'all')
|
||||
: true
|
||||
).filter(
|
||||
member => this.searchValue ? member.name.toLowerCase()
|
||||
@@ -30,4 +31,10 @@ export default {
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getRoleFromDisplayName: function (role) {
|
||||
return this.choices.find(choice => choice.display_name === role).name
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user