summaryrefslogtreecommitdiffstats
path: root/models/boards.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/boards.js')
-rw-r--r--models/boards.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/models/boards.js b/models/boards.js
index 6ae818c6..594bb7b9 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -187,6 +187,16 @@ Boards.helpers({
return Lists.find({ boardId: this._id, archived: false }, { sort: { sort: 1 } });
},
+ hasOvertimeCards(){
+ const card = Cards.findOne({isOvertime: true, boardId: this._id, archived: false} );
+ return card !== undefined;
+ },
+
+ hasSpentTimeCards(){
+ const card = Cards.findOne({spentTime: { $gt: 0 }, boardId: this._id, archived: false} );
+ return card !== undefined;
+ },
+
activities() {
return Activities.find({ boardId: this._id }, { sort: { createdAt: -1 } });
},