UI: lists: only output the number of cards for each swimlane

This commit is contained in:
Benjamin Tissoires 2018-07-26 15:50:51 +02:00
parent 05e0fb8fbe
commit e57269ed57
2 changed files with 11 additions and 1 deletions

View file

@ -16,7 +16,7 @@ template(name="listHeader")
if showCardsCountForList cards.count
| 
p.quiet.small {{cards.count}} {{_ 'cards-count'}}
p.quiet.small {{cardsCount}} {{_ 'cards-count'}}
if isMiniScreen
if currentList
if isWatching

View file

@ -22,6 +22,16 @@ BlazeComponent.extendComponent({
return Meteor.user().getLimitToShowCardsCount();
},
cardsCount() {
const list = Template.currentData();
let swimlaneId = '';
const boardView = Meteor.user().profile.boardView;
if (boardView === 'board-view-swimlanes')
swimlaneId = this.parentComponent().parentComponent().data()._id;
return list.cards(swimlaneId).count();
},
reachedWipLimit() {
const list = Template.currentData();
return list.getWipLimit('enabled') && list.getWipLimit('value') <= list.cards().count();