From 6dba4ccd4d0c8d7443e7d9c39ddafed2b8f1b6ca Mon Sep 17 00:00:00 2001 From: Thuan Pham Quoc Date: Mon, 20 Nov 2017 23:24:27 +0700 Subject: Added red-green circle to board lists item for indicating board which has overtime logs or normal spent time log --- client/components/boards/boardsList.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'client/components/boards/boardsList.js') diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js index e4bb050e..4ec4b534 100644 --- a/client/components/boards/boardsList.js +++ b/client/components/boards/boardsList.js @@ -1,3 +1,5 @@ +const subManager = new SubsManager(); + BlazeComponent.extendComponent({ boards() { return Boards.find({ @@ -13,6 +15,16 @@ BlazeComponent.extendComponent({ return user && user.hasStarred(this.currentData()._id); }, + hasOvertimeCards() { + subManager.subscribe('board', this.currentData()._id); + return this.currentData().hasOvertimeCards(); + }, + + hasSpentTimeCards() { + subManager.subscribe('board', this.currentData()._id); + return this.currentData().hasSpentTimeCards(); + }, + isInvited() { const user = Meteor.user(); return user && user.isInvitedTo(this.currentData()._id); -- cgit v1.2.3-1-g7c22