diff --git a/hourglass/client/main/main.html b/hourglass/client/main/main.html
index adefef2..fdb3e09 100644
--- a/hourglass/client/main/main.html
+++ b/hourglass/client/main/main.html
@@ -101,6 +101,16 @@
No
+
diff --git a/hourglass/client/main/main.js b/hourglass/client/main/main.js
index ec695ad..19b1b30 100644
--- a/hourglass/client/main/main.js
+++ b/hourglass/client/main/main.js
@@ -154,20 +154,21 @@ Template.registerHelper('myClasses', () => { // Gets all classes and respective
var offset = (moment().subtract(hide, 'days'))._d;
if (offset > due) { // If due is before hide days before today
thisWork[j] = "no";
- j = 0;
}
}
if (thisWork[j] !== "no" && Session.get("user").preferences.done) { // If done filter is true
if (thisWork[j].done.indexOf(Meteor.userId()) !== -1) { // If user marked this work done.
thisWork[j] = "no";
- j = 0;
}
}
if (thisWork[j] !== "no" && sideFilter.length !== 0 && !_.contains(sideFilter, thisWork[j].type)) {
+ thisWork[j] = "no"
+ }
+
+ if(thisWork[j] !== "no" && Session.get("user").preferences.hideReport && (thisWork[j].confirmations.length/thisWork[j].reports.length) <= 0.9) {
thisWork[j] = "no";
- j = 0;
}
}
@@ -225,7 +226,7 @@ Template.registerHelper('myClasses', () => { // Gets all classes and respective
Template.registerHelper('pref', (val) => { // Obtains all user preferences.
var preferences = Session.get("user").preferences;
- if(val === 'timeHide' || val === 'done') {
+ if(val === 'timeHide' || val === 'done' || val == 'hideReport') {
var invert = _.invert(ref);
return invert[preferences[val]];
}
@@ -988,7 +989,8 @@ function getPreferencesData() { // Get all data relating to preferences.
"theme": document.getElementById("prefTheme").childNodes[0].nodeValue.toLowerCase(),
"mode": document.getElementById("prefMode").childNodes[0].nodeValue.toLowerCase(),
"timeHide": ref[document.getElementById("prefHide").childNodes[0].nodeValue],
- "done": ref[document.getElementById("prefDone").childNodes[0].nodeValue]
+ "done": ref[document.getElementById("prefDone").childNodes[0].nodeValue],
+ "hideReport": ref[document.getElementById("prefReport").childNodes[0].nodeValue]
};
profile.preferences = options;
return profile;
diff --git a/hourglass/client/profile/profile.html b/hourglass/client/profile/profile.html
index fc901ed..2668852 100644
--- a/hourglass/client/profile/profile.html
+++ b/hourglass/client/profile/profile.html
@@ -89,6 +89,17 @@
No
+
+
diff --git a/hourglass/client/profile/profile.js b/hourglass/client/profile/profile.js
index e9b6a39..5c5c41e 100644
--- a/hourglass/client/profile/profile.js
+++ b/hourglass/client/profile/profile.js
@@ -624,7 +624,8 @@ function getProfileData() { // Gets all data related to profile.
"theme":document.getElementById("prefTheme").childNodes[0].nodeValue.toLowerCase(),
"mode":document.getElementById("prefMode").childNodes[0].nodeValue.toLowerCase(),
"timeHide":ref[document.getElementById("prefHide").childNodes[0].nodeValue],
- "done":ref[document.getElementById("prefDone").childNodes[0].nodeValue]
+ "done":ref[document.getElementById("prefDone").childNodes[0].nodeValue],
+ "hideReport":ref[document.getElementById("prefReport").childNodes[0].nodeValue]
};
return profile;
}
diff --git a/hourglass/server/main.js b/hourglass/server/main.js
index c1fad95..ec43cad 100644
--- a/hourglass/server/main.js
+++ b/hourglass/server/main.js
@@ -510,7 +510,8 @@ Meteor.methods({
"theme": "light",
"mode": "classes",
"timeHide": 1,
- "done": true
+ "done": true,
+ "hideReport": true
};
Meteor.users.update({
_id: userId