summaryrefslogtreecommitdiffstats
path: root/models/cards.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/cards.js')
-rw-r--r--models/cards.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js
index 0a440697..7d66bf8b 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.wipLimit.enabled && list.wipLimit.value == list.cards().count()){
+ return false;
+ }
+ return true;
+ },
});
Cards.mutations({