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:
aignatov-bio 2025-06-06 14:45:45 +02:00 committed by GitHub
commit 92de60ddcb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View file

@ -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

View file

@ -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: {