{"size": 826, "ext": "js", "max_stars_repo_path": "imports/ui/pages/register/index.js", "max_stars_repo_name": "luciaeveberger/snowdays", "max_stars_repo_stars_event_min_datetime": "2019-08-17T15:02:08.000Z", "max_stars_repo_stars_event_max_datetime": "2019-08-17T15:02:08.000Z", "max_issues_repo_path": "imports/ui/pages/register/index.js", "max_issues_repo_name": "luciaeveberger/snowdays", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "imports/ui/pages/register/index.js", "max_forks_repo_name": "luciaeveberger/snowdays", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 826.0, "max_line_length": 826, "alphanum_fraction": 0.7070217918}
import './register.html'
import swal from 'sweetalert2';
import moment from 'moment';
import 'sweetalert2/dist/sweetalert2.min.css';
import Participants from "../../../collections/participants";

Template.RegisterPage.onCreated(function () {
  let loggedIn = !_.isNull(Meteor.user());
  this.currentTab = new ReactiveVar(loggedIn ? 'RegisterFormSection' : "RegisterWelcomeSection");
});

Template.RegisterPage.events({
  // proceed to FORM form WELCOME screen
  'click #welcome-button': (event, template) => {
    template.currentTab.set('RegisterFormSection')
  }
});

Template.RegisterPage.helpers({
  tab: function () {
    return Template.instance().currentTab.get();
  },
  registrationIsOpen: () => {
    return moment().isBetween('2018-01-01', '2018-01-21')
  }
});

Template.RegisterPage.onDestroyed(function () {

});