Merge pull request #3468 from bronger/issue-3467

Limited number of cards highlighting to true overbooking.
This commit is contained in:
Lauri Ojansivu 2021-01-23 00:48:53 +02:00 committed by GitHub
commit 69c0a3cba3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -15,7 +15,7 @@ template(name="listHeader")
= title
if wipLimit.enabled
| (
span(class="{{#if reachedWipLimit}}highlight{{/if}}") {{cards.count}}
span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cards.count}}
|/#{wipLimit.value})
if showCardsCountForList cards.count

View file

@ -72,6 +72,14 @@ BlazeComponent.extendComponent({
);
},
exceededWipLimit() {
const list = Template.currentData();
return (
list.getWipLimit('enabled') &&
list.getWipLimit('value') < list.cards().count()
);
},
showCardsCountForList(count) {
const limit = this.limitToShowCardsCount();
return limit > 0 && count > limit;