diff --git a/Packages/active-entry/server/methods.js b/Packages/active-entry/server/methods.js index bfb147809..de193e269 100644 --- a/Packages/active-entry/server/methods.js +++ b/Packages/active-entry/server/methods.js @@ -132,20 +132,16 @@ Meteor.methods({ // Check if the user actually exists, and if not, stop here var currentUser = Meteor.users.findOne({"emails.address": emailAddress}); - console.log(currentUser); if (!currentUser) { return; } - console.log(currentUser); var lastLoginDate = currentUser.lastLoginDate; if (!lastLoginDate) { return false; } - console.log(lastLoginDate); lastLoginDate.setDate(lastLoginDate.getDate() + inactivityPeriodDays); - console.log(lastLoginDate); if (lastLoginDate <= new Date()) { return true; diff --git a/Packages/lesiontracker/client/components/conformanceCheckFeedback/conformanceCheckFeedback.js b/Packages/lesiontracker/client/components/conformanceCheckFeedback/conformanceCheckFeedback.js index 9ea592471..f55229704 100644 --- a/Packages/lesiontracker/client/components/conformanceCheckFeedback/conformanceCheckFeedback.js +++ b/Packages/lesiontracker/client/components/conformanceCheckFeedback/conformanceCheckFeedback.js @@ -1,11 +1,32 @@ Template.conformanceCheckFeedback.helpers({ validationErrors: function() { // Return validation errors sorted by last added Target - return ValidationErrors.find({}, { + var errors = ValidationErrors.find({}, { sort: { prefix: -1, type: 1 } }); + + Template.instance().validationErrors.set(errors.fetch()); + return errors; } +}); + +Template.conformanceCheckFeedback.events({ + 'mouseenter #conformanceCheckFeedback': function(e, template) { + if (template.validationErrors.get().length > 0) { + $(e.currentTarget).addClass("conformanceHover"); + } + }, + 'mouseleave #conformanceCheckFeedback': function(e, template) { + var conformanceDiv = e.currentTarget; + if ($(conformanceDiv).hasClass("conformanceHover")) { + $(conformanceDiv).removeClass("conformanceHover"); + } + } +}); + +Template.conformanceCheckFeedback.onCreated(function() { + this.validationErrors = new ReactiveVar([]); }); \ No newline at end of file diff --git a/Packages/lesiontracker/client/components/conformanceCheckFeedback/conformanceCheckFeedback.styl b/Packages/lesiontracker/client/components/conformanceCheckFeedback/conformanceCheckFeedback.styl index 68fdf2d51..fe6f86d16 100644 --- a/Packages/lesiontracker/client/components/conformanceCheckFeedback/conformanceCheckFeedback.styl +++ b/Packages/lesiontracker/client/components/conformanceCheckFeedback/conformanceCheckFeedback.styl @@ -13,7 +13,7 @@ margin: 5px text-align: center - &:hover - overflow: auto - height: 200px - z-index: 200 \ No newline at end of file +.conformanceHover + overflow: auto !important + height: 200px !important + z-index: 200 \ No newline at end of file