From 66e1c9c19a2fae6a025b4f94f3c2d7a293fd4458 Mon Sep 17 00:00:00 2001 From: Michael Foiani Date: Thu, 7 Feb 2019 13:06:07 -0500 Subject: Allowed for registration of states and nationals. --- src/components/mao-competitions.js | 57 +++++++++++++++++++++++++++++++------- src/components/mao-home.js | 10 +++---- 2 files changed, 52 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/components/mao-competitions.js b/src/components/mao-competitions.js index e3601ca..3d3b117 100644 --- a/src/components/mao-competitions.js +++ b/src/components/mao-competitions.js @@ -175,8 +175,8 @@ class MaoCompetitions extends connect(store)(PageViewElement) {

Upcoming Competition!

-

The CSN Competition is Saturday, January 5th.

-

We host this, and it counts as a full MAO competition. Please sign up for it in regional competitions!

+

The AMC is Thursday, February 7th or Wednesday, February 13th.

+

Also, please register for states and nationals early! We need these headcounts.

@@ -196,10 +196,21 @@ class MaoCompetitions extends connect(store)(PageViewElement) { @@ -217,10 +228,21 @@ class MaoCompetitions extends connect(store)(PageViewElement) { @@ -260,7 +282,8 @@ class MaoCompetitions extends connect(store)(PageViewElement) { location="Dunbar, Fort Myers" signedIn="${props.signedIn}" isRegistered="${props.registeredComps.includes('January')}" - on-register-comp="${() => store.dispatch(registerComp('January'))}"> + on-register-comp="${() => store.dispatch(registerComp('January'))}" + closed="${true}"> @@ -273,7 +296,8 @@ class MaoCompetitions extends connect(store)(PageViewElement) { location="Golden Gate" signedIn="${props.signedIn}" isRegistered="${props.registeredComps.includes('February')}" - on-register-comp="${() => store.dispatch(registerComp('February'))}"> + on-register-comp="${() => store.dispatch(registerComp('February'))}" + closed="${true}"> @@ -299,7 +323,8 @@ class MaoCompetitions extends connect(store)(PageViewElement) { location="American Hertiage-Boca, Delray Beach" signedIn="${props.signedIn}" isRegistered="${props.registeredComps.includes('March2')}" - on-register-comp="${() => store.dispatch(registerComp('March2'))}"> + on-register-comp="${() => store.dispatch(registerComp('March2'))}" + closed="${true}"> @@ -312,7 +337,8 @@ class MaoCompetitions extends connect(store)(PageViewElement) { location="Community School of Naples" signedIn="${props.signedIn}" isRegistered="${props.registeredComps.includes('CSN')}" - on-register-comp="${() => store.dispatch(registerComp('CSN'))}"> + on-register-comp="${() => store.dispatch(registerComp('CSN'))}" + closed="${true}"> @@ -417,19 +443,30 @@ class MaoCompetitions extends connect(store)(PageViewElement) { `; } + static get properties() { return { // This is the data from the store. registeredComps : Array, signedIn : Boolean }} - - _stateChanged(state) { this.signedIn = state.firebaseAuth .signedIn; this.registeredComps = state.firebaseFirestore .registeredComps; } + registerNationals() { + if(confirm('Are you sure you want to register for nationals?')) { + store.dispatch(registerComp('nationals')); + } + } + + registerStates() { + if(confirm('Are you sure you want to register for states?')) { + store.dispatch(registerComp('states')); + } + } + } window.customElements.define('mao-competitions', MaoCompetitions); diff --git a/src/components/mao-home.js b/src/components/mao-home.js index dbaeb3d..934928e 100644 --- a/src/components/mao-home.js +++ b/src/components/mao-home.js @@ -68,7 +68,7 @@ class MaoHome extends PageViewElement { Announcements

- Welcome to the beta release of the website. First release coming in January or Febrary. + Welcome to the beta release of the website. First release coming in March.

If you haven't yet, please add this website to your home screen. It will act like an app. Cool! @@ -85,7 +85,7 @@ class MaoHome extends PageViewElement { We meet once a week on D Day Flex.

- Math Madness after school Thrsday. + Math Madness after school Thursday.

@@ -93,8 +93,8 @@ class MaoHome extends PageViewElement {

Upcoming Dates

@@ -107,7 +107,7 @@ class MaoHome extends PageViewElement { Competitions

- Our January Competitions are coming up soon! Please register and have fun. + States competition comint up soon! Make sure you have met your requirements. Also, AMC and other funs tests are arriving. Please check the competition page.

-- cgit v1.2.3-70-g09d2