diff --git a/assets/javascripts/discourse-assign/controllers/assign-user.js.es6 b/assets/javascripts/discourse-assign/controllers/assign-user.js.es6 index bf27fee..cf4df58 100644 --- a/assets/javascripts/discourse-assign/controllers/assign-user.js.es6 +++ b/assets/javascripts/discourse-assign/controllers/assign-user.js.es6 @@ -39,27 +39,27 @@ export default Controller.extend({ }, @action - assignUser(assignee) { + assignUser(name) { if (this.isBulkAction) { - this.bulkAction(assignee.name); + this.bulkAction(name); return; } - if (this.allowedGroupsForAssignment.includes(assignee.name)) { + if (this.allowedGroupsForAssignment.includes(name)) { this.setProperties({ "model.username": null, - "model.group_name": assignee.name, + "model.group_name": name, "model.allowedGroups": this.taskActions.allowedGroups, }); } else { this.setProperties({ - "model.username": assignee.name, + "model.username": name, "model.group_name": null, "model.allowedGroups": this.taskActions.allowedGroups, }); } - if (assignee.name) { + if (name) { return this.assign(); } }, @@ -107,6 +107,6 @@ export default Controller.extend({ @action assignUsername(selected) { - this.assignUser({ name: selected.firstObject }); + this.assignUser(selected.firstObject); }, }); diff --git a/assets/javascripts/discourse/templates/modal/assign-user.hbs b/assets/javascripts/discourse/templates/modal/assign-user.hbs index 6262a0f..dcf847c 100644 --- a/assets/javascripts/discourse/templates/modal/assign-user.hbs +++ b/assets/javascripts/discourse/templates/modal/assign-user.hbs @@ -19,7 +19,7 @@ }}
{{#each assignSuggestions as |user|}} - + {{avatar user imageSize="small"}} {{/each}}