diff options
author | Lauri Ojansivu <x@xet7.org> | 2017-10-09 14:49:38 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2017-10-09 14:49:38 +0300 |
commit | fb060ed2c52ee80d9f25d9e8431280b092f74da0 (patch) | |
tree | 3e325e5f2d19b72811c596727ca67e02d7b47f4a /models/cards.js | |
parent | c84187bdadb7f1afaa8211773d1d1cb986709099 (diff) | |
parent | f77da76c682ec7ad1b5e141d113d4b74371f46ae (diff) | |
download | wekan-fb060ed2c52ee80d9f25d9e8431280b092f74da0.tar.gz wekan-fb060ed2c52ee80d9f25d9e8431280b092f74da0.tar.bz2 wekan-fb060ed2c52ee80d9f25d9e8431280b092f74da0.zip |
Merge branch 'issue783' of https://github.com/amadilsons/wekan into amadilsons-issue783
Diffstat (limited to 'models/cards.js')
-rw-r--r-- | models/cards.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js index 0a440697..5b752ec3 100644 --- a/models/cards.js +++ b/models/cards.js @@ -179,6 +179,14 @@ Cards.helpers({ cardId: this._id, }); }, + + canBeRestored() { + const list = Lists.findOne({_id: this.listId}); + if(list.getWipLimit() && list.getWipLimit('enabled') && list.getWipLimit('value') === list.cards().count()){ + return false; + } + return true; + }, }); Cards.mutations({ |