1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

fix show existing collaborator name in project edition

This commit is contained in:
Sylvain 2016-06-16 11:10:56 +02:00
parent a325211552
commit dbeb0717df
3 changed files with 8 additions and 6 deletions

View File

@ -325,7 +325,9 @@ Application.Controllers.controller "EditProjectController", ["$scope", "$state",
## Retrieve the project's details, if an error occured, redirect the user to the projects list page
$scope.project = projectPromise
$scope.matchingMembers = []
$scope.matchingMembers = $scope.project.project_users.map (u) ->
id: u.id
name: u.full_name
## Using the ProjectsController
new ProjectsController($scope, $state, Project, Machine, Member, Component, Theme, Licence, $document, Diacritics)

View File

@ -171,7 +171,7 @@
<span ng-bind="$item.name"></span>
<input type="hidden" name="project[user_ids][]" value="{{$item.id}}" />
</ui-select-match>
<ui-select-choices repeat="m in matchingMembers" refresh="autoCompleteName($select.search)" refresh-delay="300">
<ui-select-choices repeat="m.id as m in matchingMembers" refresh="autoCompleteName($select.search)" refresh-delay="300">
<span ng-bind-html="m.name | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>

View File

@ -227,7 +227,7 @@ ActiveRecord::Schema.define(version: 20160613093842) do
t.boolean "is_read", default: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "receiver_type"
t.string "receiver_type", limit: 255
t.boolean "is_send", default: false
t.jsonb "meta_data", default: {}
end
@ -368,7 +368,7 @@ ActiveRecord::Schema.define(version: 20160613093842) do
t.datetime "published_at"
end
add_index "projects", ["slug"], name: "index_projects_on_slug", using: :btree
add_index "projects", ["slug"], name: "index_projects_on_slug", unique: true, using: :btree
create_table "projects_components", force: :cascade do |t|
t.integer "project_id"
@ -438,8 +438,8 @@ ActiveRecord::Schema.define(version: 20160613093842) do
t.datetime "updated_at"
t.integer "availability_id"
t.datetime "ex_start_at"
t.datetime "ex_end_at"
t.datetime "canceled_at"
t.datetime "ex_end_at"
t.boolean "offered", default: false
end
@ -597,6 +597,7 @@ ActiveRecord::Schema.define(version: 20160613093842) do
add_index "user_trainings", ["user_id"], name: "index_user_trainings_on_user_id", using: :btree
create_table "users", force: :cascade do |t|
t.string "username", limit: 255
t.string "email", limit: 255, default: "", null: false
t.string "encrypted_password", limit: 255, default: "", null: false
t.string "reset_password_token", limit: 255
@ -619,7 +620,6 @@ ActiveRecord::Schema.define(version: 20160613093842) do
t.boolean "is_allow_contact", default: true
t.integer "group_id"
t.string "stp_customer_id", limit: 255
t.string "username", limit: 255
t.string "slug", limit: 255
t.boolean "is_active", default: true
t.boolean "invoicing_disabled", default: false