mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-07 20:40:26 +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
|
end
|
||||||
|
|
||||||
def assigned_users_list
|
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
|
render json: { data: users.map { |u| [u.id, u.name, { avatar_url: avatar_path(u, :icon_small) }] } }, status: :ok
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<div class="px-2">
|
<div class="px-2">
|
||||||
<div class="sci-input-container-v2 left-icon mb-1 -mx-2.5">
|
<div class="sci-input-container-v2 left-icon mb-1 -mx-2.5">
|
||||||
<input type="text"
|
<input type="text"
|
||||||
|
ref="searchInput"
|
||||||
v-model="query"
|
v-model="query"
|
||||||
class="sci-input-field"
|
class="sci-input-field"
|
||||||
autofocus="true"
|
autofocus="true"
|
||||||
|
@ -74,9 +75,16 @@ export default {
|
||||||
this.loadUsers();
|
this.loadUsers();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.searchInput) {
|
||||||
|
this.$refs.searchInput.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
canManage() {
|
canManage() {
|
||||||
return this.params.data.urls.assigned_users;
|
return this.params.data.urls.assigned_users && !this.params.data.archived_on;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue