hack-rpi / Status-Board

Hackathon commit messages, announcements, mentor requests, and more, all in one place!
https://status.hackrpi.com
MIT License
14 stars 5 forks source link

Set Event Stage Doesn't Work in Admin User Portal #96

Open SLiNv opened 5 years ago

SLiNv commented 5 years ago

I was looking through the codes, found the following listener in client/script/user/server_settings.js

// event stage
  'change .event-stage': function(e) {
    var stage = $(e.target).attr('value');
    console.log(stage)
    Meteor.users.update({ '_id': Meteor.userId() }, {
      $set: {
        'settings.event_stage': stage
      }
    });
  }

and I see that the router has a switch based on settings.public.enent_state switch (Meteor.settings.public.event_state)

But when I change the Event Stage settings in the admin's user portal, the homepage won't change accordingly. It will stay with what ever stage I set in the settings.json (the initial state when the meteor is started). Am I missing something here?