Added red-green circle to board lists item for indicating board which has overtime logs or normal spent time log

This commit is contained in:
Thuan Pham Quoc 2017-11-20 23:24:27 +07:00
parent d38071457c
commit 6dba4ccd4d
5 changed files with 47 additions and 0 deletions

View file

@ -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 } });
},