<commit_before>TasksList = new Mongo.Collection("tasks");

  Meteor.subscribe("TasksList");
  
    Template.todayTasks.helpers({
      'studyTask': function() {
        return TasksList.findOne({category: "Study"});
      },
      'sleepTask': function() {
        return TasksList.findOne({category: "Sleep"});
      },
      'socialTask': function() {
        return TasksList.findOne({category: "Social"});
      },
      'playTask': function() {
        return TasksList.findOne({category: "Play"});
      },
      'healthTask': function() {
        return TasksList.findOne({category: "Health"});
      },
    });
  
     Template.bonus.events({
      "click .toggle-checked": function () {
        // Set the checked property to the opposite of its current value
        TasksList.update(this._id, {$set: {checked: ! this.checked}});
      },
      "click .delete": function () {
        TasksList.remove(this._id);
       // TasksList.update(this._id, {$set: {skipped: true}});
      }
    });

    Template.body.helpers({
        
        firstName: function(){
            var user = Meteor.user(); 
            if (user) {
                return user.services.google.given_name;    
            } 
        },<commit_msg>checkbox<commit_after>TasksList = new Mongo.Collection("tasks");

  Meteor.subscribe("TasksList");
  
    Template.todayTasks.helpers({
      'studyTask': function() {
        return TasksList.findOne({category: "Study"});
      },
      'sleepTask': function() {
        return TasksList.findOne({category: "Sleep"});
      },
      'socialTask': function() {
        return TasksList.findOne({category: "Social"});
      },
      'playTask': function() {
        return TasksList.findOne({category: "Play"});
      },
      'healthTask': function() {
        return TasksList.findOne({category: "Health"});
      },
    });

  
  
     Template.bonus.events({
      "click .toggle-checked": function () {
        // Set the checked property to the opposite of its current value
        TasksList.update(this._id, {$set: {checked: ! this.checked}});
          if (this.category == "Study"){
              console.log("Study bonus task is selected");
              Meteor.users.update( { _id: Meteor.userId() }, {$inc:{ "profile.studyPoints": 15}});
              TasksList.remove(this._id);
              console.log(this._id);
          } else if (this.category == "Social") {
              console.log("Social bonus task is selected");
              Meteor.users.update( { _id: Meteor.userId() }, {$inc:{ "profile.socialPoints": 15}});
              TasksList.remove(this._id);
              TasksList.update(this._id, {$set: {checked: false}});
          } else if (this.category == "Play") {
              console.log("Play bonus task is selected");
              Meteor.users.update( { _id: Meteor.userId() }, {$inc:{ "profile.playPoints": 15}});
              TasksList.remove(this._id);
              TasksList.update(this._id, {$set: {checked: false}});
          } else {
              console.log("Health bonus task is selected");
              Meteor.users.update( { _id: Meteor.userId() }, {$inc:{ "profile.healthPoints": 15}});
              TasksList.remove(this._id);
              TasksList.update(this._id, {$set: {checked: false}});
              //health
          }
        //TasksList.remove(this._id);
      },
      "click .delete": function () {
        TasksList.remove(this._id);
       // TasksList.update(this._id, {$set: {skipped: true}});
      }
    });

    Template.body.helpers({
        
        firstName: function(){
            var user = Meteor.user(); 
            if (user) {
                return user.services.google.given_name;    
            } 
        },
{'fraction_non_alphanumeric': 0.16072863648540048, 'fraction_numerical': 0.0021430484864720066, 'mean_word_length': 2.053147996729354, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4798312', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1051, 'n_words': 209}