diff --git a/app/controllers/user_my_modules_controller.rb b/app/controllers/user_my_modules_controller.rb index 05fc01a42..8e9e2f33b 100644 --- a/app/controllers/user_my_modules_controller.rb +++ b/app/controllers/user_my_modules_controller.rb @@ -92,11 +92,9 @@ class UserMyModulesController < ApplicationController .joins("LEFT OUTER JOIN user_my_modules ON user_my_modules.user_id = users.id "\ "AND user_my_modules.my_module_id = #{@my_module.id}") .search(false, params[:query]) - .order(:full_name) - .limit(Constants::SEARCH_LIMIT) .select('users.*', 'user_my_modules.id as user_my_module_id') - .select('CASE WHEN user_my_modules.id IS NOT NULL '\ - 'THEN true ELSE false END as designated') + .select('CASE WHEN user_my_modules.id IS NOT NULL THEN true ELSE false END as designated') + .order('designated DESC', :full_name) users = users.map do |user| next if params[:skip_assigned] && user.designated diff --git a/app/javascript/vue/my_modules/list.vue b/app/javascript/vue/my_modules/list.vue index d6554cf86..21f6a9f0f 100644 --- a/app/javascript/vue/my_modules/list.vue +++ b/app/javascript/vue/my_modules/list.vue @@ -153,7 +153,8 @@ export default { field: 'designated', headerName: this.i18n.t('experiments.table.column.assigned_html'), sortable: false, - cellRenderer: DesignatedUsers + cellRenderer: DesignatedUsers, + minWidth: 220 }); columns.push({ field: 'tags', diff --git a/app/javascript/vue/my_modules/renderers/designated_users.vue b/app/javascript/vue/my_modules/renderers/designated_users.vue index eb95ccdb9..319c6bd3b 100644 --- a/app/javascript/vue/my_modules/renderers/designated_users.vue +++ b/app/javascript/vue/my_modules/renderers/designated_users.vue @@ -24,14 +24,18 @@ :placeholder="i18n.t('experiments.table.search')" /> -
+
+
+ + +
{{ user.label }}
@@ -95,7 +99,7 @@ export default { closeFlyout() { this.query = ''; if (this.changed) { - this.params.dtComponent.loadData(); + this.params.dtComponent.updateTable(); this.changed = false; } }, @@ -115,7 +119,8 @@ export default { my_module_id: this.params.data.id, user_id: user.value } - }).then(() => { + }).then((response) => { + this.allUsers.find((u) => u.value === user.value).params.unassign_url = response.data.unassign_url; this.selectedUsers.push(user.value); }); } diff --git a/app/javascript/vue/shared/datatable/table.vue b/app/javascript/vue/shared/datatable/table.vue index e8d061f56..73866c12f 100644 --- a/app/javascript/vue/shared/datatable/table.vue +++ b/app/javascript/vue/shared/datatable/table.vue @@ -253,11 +253,7 @@ export default { watch: { reloadingTable() { if (this.reloadingTable) { - if (this.scrollMode === 'pages') { - this.loadData(); - } else { - this.reloadTable(); - } + this.updateTable(); } }, currentViewRender() { @@ -317,6 +313,13 @@ export default { this.gridApi.sizeColumnsToFit(); }, + updateTable() { + if (this.scrollMode === 'pages') { + this.loadData(); + } else { + this.reloadTable(); + } + }, reloadTable() { if (this.dataLoading) return; diff --git a/app/javascript/vue/shared/mixins/fixed_flyout.js b/app/javascript/vue/shared/mixins/fixed_flyout.js index 31b8b59c6..603ae589c 100644 --- a/app/javascript/vue/shared/mixins/fixed_flyout.js +++ b/app/javascript/vue/shared/mixins/fixed_flyout.js @@ -71,10 +71,12 @@ export default { flyout.style.bottom = `${bottom}px`; flyout.style.top = 'unset'; flyout.style.boxShadow = '0px -16px 32px 0px rgba(16, 24, 40, 0.07)'; + flyout.style.maxHeight = `${screenHeight - bottom - 25}px`; } else { flyout.style.top = `${top}px`; flyout.style.bottom = 'unset'; flyout.style.boxShadow = ''; + flyout.style.maxHeight = `${screenHeight - top - 25}px`; } } } diff --git a/config/locales/en.yml b/config/locales/en.yml index 5f12c476c..65414a63a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1592,7 +1592,7 @@ en: archived_tasks: 'Go to Archived tasks' active_tasks: 'Go to Active tasks' add_tag: '+ Add tag' - search: 'Search...' + search: 'Manage assignees' not_set: 'not set' archive_group: success_flash: "%{number} task(s) successfully archived."