From 96e413f0056ed83dad251417d5e1bcf8bf716b2a Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Sat, 27 Aug 2016 01:11:37 -0400 Subject: [PATCH] Work should be removed when 'done', fixed #47 --- hourglass/client/main/main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hourglass/client/main/main.js b/hourglass/client/main/main.js index 680a09d..05cd8c7 100644 --- a/hourglass/client/main/main.js +++ b/hourglass/client/main/main.js @@ -130,6 +130,10 @@ Template.registerHelper('myClasses', () => { j = 0; } } + if(thisWork[j] !== "no" && thisWork[j].done.indexOf(Meteor.userId()) !== -1) { + thisWork[j] = "no"; + j = 0; + } } while(thisWork.indexOf("no") !== -1) thisWork.splice(thisWork.indexOf("no"),1);