浏览代码

Limited number of cards highlighting to true overbooking.

Addresses <https://github.com/wekan/wekan/issues/3467>.
Torsten Bronger 4 年之前
父节点
当前提交
5476a5984c
共有 2 个文件被更改,包括 9 次插入1 次删除
  1. 1 1
      client/components/lists/listHeader.jade
  2. 8 0
      client/components/lists/listHeader.js

+ 1 - 1
client/components/lists/listHeader.jade

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

+ 8 - 0
client/components/lists/listHeader.js

@@ -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;