Assignee field like Jira #2452 , in progress.

When there is one selected assignee on card, don't show + button
for adding more assignees, because there can only be one assignee.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2019-11-07 00:14:50 +02:00
parent 22083787f9
commit 3cf09efb13
2 changed files with 11 additions and 2 deletions

View file

@ -79,8 +79,9 @@ template(name="cardDetails")
+userAvatarAssignee(userId=this cardId=../_id)
| {{! XXX Hack to hide syntaxic coloration /// }}
if canModifyCard
a.assignee.add-assignee.card-details-item-add-button.js-add-assignees(title="{{_ 'assignee'}}")
i.fa.fa-plus
unless assigneeSelected
a.assignee.add-assignee.card-details-item-add-button.js-add-assignees(title="{{_ 'assignee'}}")
i.fa.fa-plus
.card-details-item.card-details-item-labels
h3.card-details-item-title {{_ 'labels'}}

View file

@ -364,6 +364,14 @@ Template.cardDetails.helpers({
});
},
assigneeSelected() {
if (this.getAssignees().length === 0) {
return false;
} else {
return true;
}
},
memberType() {
const user = Users.findOne(this.userId);
return user && user.isBoardAdmin() ? 'admin' : 'normal';