Merge branch 'bentiss-ui-fixes' into edge

This commit is contained in:
Lauri Ojansivu 2018-10-25 18:12:13 +03:00
commit c72b3a870e
2 changed files with 12 additions and 3 deletions

View file

@ -15,9 +15,8 @@ template(name="listHeader")
|/#{wipLimit.value})
if showCardsCountForList cards.count
= cards.count
span
| {{_ '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();