mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-30 17:04:31 +08:00
Merge pull request #8539 from aignatov-bio/ai-sci-11964-head-of-project-fixes
Head of project fixes [SCI-11964]
This commit is contained in:
commit
92de60ddcb
2 changed files with 10 additions and 2 deletions
|
@ -294,7 +294,7 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
|
||||
def assigned_users_list
|
||||
users = User.where(id: @project.user_assignments.select(:user_id)).order('full_name ASC')
|
||||
users = @project.users.search(false, params[:query]).order(:full_name)
|
||||
|
||||
render json: { data: users.map { |u| [u.id, u.name, { avatar_url: avatar_path(u, :icon_small) }] } }, status: :ok
|
||||
end
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<div class="px-2">
|
||||
<div class="sci-input-container-v2 left-icon mb-1 -mx-2.5">
|
||||
<input type="text"
|
||||
ref="searchInput"
|
||||
v-model="query"
|
||||
class="sci-input-field"
|
||||
autofocus="true"
|
||||
|
@ -74,9 +75,16 @@ export default {
|
|||
this.loadUsers();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.searchInput) {
|
||||
this.$refs.searchInput.focus();
|
||||
}
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
canManage() {
|
||||
return this.params.data.urls.assigned_users;
|
||||
return this.params.data.urls.assigned_users && !this.params.data.archived_on;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Add table
Reference in a new issue