From 3752cf7415fc576c5e1f37b216b83995fa94df53 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Mon, 23 Apr 2018 00:27:30 -0400 Subject: [PATCH] feat: user-search component UI --- client/components/admin/admin-groups-edit.vue | 12 ++- client/components/common/user-search.vue | 82 +++++++++++++++++++ client/graph/common-users-query-search.gql | 9 ++ 3 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 client/components/common/user-search.vue create mode 100644 client/graph/common-users-query-search.gql diff --git a/client/components/admin/admin-groups-edit.vue b/client/components/admin/admin-groups-edit.vue index b360d1f7..83ed5f9c 100644 --- a/client/components/admin/admin-groups-edit.vue +++ b/client/components/admin/admin-groups-edit.vue @@ -78,7 +78,7 @@ v-tab-item(key='users', :transition='false', :reverse-transition='false') v-card v-card-title.pb-0 - v-btn(color='primary') + v-btn(color='primary', @click='assignUser') v-icon(left) assignment_ind | Assign User v-data-table( @@ -106,17 +106,21 @@ v-alert.ma-3(icon='warning', :value='true', outline) No users to display. .text-xs-center.py-2(v-if='users.length > 15') v-pagination(v-model='pagination.page', :length='pages') + + user-search(v-model='searchUserDialog') diff --git a/client/graph/common-users-query-search.gql b/client/graph/common-users-query-search.gql new file mode 100644 index 00000000..fb317882 --- /dev/null +++ b/client/graph/common-users-query-search.gql @@ -0,0 +1,9 @@ +query ($query: String!) { + users { + search(query:$query) { + id + name + email + } + } +}