From 5ef6689419ab7106e386c0bec361bc579a468f6f Mon Sep 17 00:00:00 2001 From: David Canas Date: Thu, 4 Aug 2016 13:28:56 -0700 Subject: [PATCH] Added ability to include spaces for full name --- .../plugins/management/assets/src/vue/user-roster.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kolibri/plugins/management/assets/src/vue/user-roster.vue b/kolibri/plugins/management/assets/src/vue/user-roster.vue index b8d26d82243..eb892b4199e 100644 --- a/kolibri/plugins/management/assets/src/vue/user-roster.vue +++ b/kolibri/plugins/management/assets/src/vue/user-roster.vue @@ -98,10 +98,13 @@ }), computed: { visibleUsers() { + const roleFilter = this.roleFilter; + const searchFilter = new RegExp(this.searchFilter, 'i'); + return this.users.filter((user) => { - const roleFilter = this.roleFilter; - const searchFilter = new RegExp(this.searchFilter, 'i'); - const names = [user.first_name, user.last_name, user.username]; + // fullname created using es6 templates + const fullname = `${user.first_name} ${user.last_name}`; + const names = [fullname, user.first_name, user.last_name, user.username]; let hasRole = true; let hasName = true;