diff options
author | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-08-03 16:48:12 -0400 |
---|---|---|
committer | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-08-03 16:48:12 -0400 |
commit | 0b99dd4f1dde513cf142f308c6c29af60cb689e1 (patch) | |
tree | 5dd94d5c06565eb19801cc6b3585b7a893df884f | |
parent | 37bad7137e3f64913705566f904938f98c4c88ef (diff) |
Made changes to some forms and also fixed a small bug with registry element.
-rw-r--r-- | src/actions/firebase.js | 1 | ||||
-rw-r--r-- | src/components/mao-account.js | 34 | ||||
-rw-r--r-- | src/components/mao-tutoring.js | 3 | ||||
-rw-r--r-- | src/components/registry-element.js | 4 |
4 files changed, 26 insertions, 16 deletions
diff --git a/src/actions/firebase.js b/src/actions/firebase.js index 3ea710a..5dca6bf 100644 --- a/src/actions/firebase.js +++ b/src/actions/firebase.js @@ -39,7 +39,6 @@ export const signIn = (_email, _password, divison) => (dispatch) => { */ dispatch(authSuccess(user)); if(divison) { - console.log(divison); dispatch(setUserData(divison)); } dispatch(fetchDivison()); diff --git a/src/components/mao-account.js b/src/components/mao-account.js index e4a206e..d6d3e59 100644 --- a/src/components/mao-account.js +++ b/src/components/mao-account.js @@ -132,8 +132,12 @@ class MaoAccount extends connect(store)(PageViewElement) { <paper-input type="password" label="password" id="createPasswordField"> </paper-input> - <paper-input label="division" id="createDivisionField"> - </paper-input> + <select id="createDivisonField"> + <option value="">--Divison--</option> + <option value="Mu">Mu</option> + <option value="Alpha">Alpha</option> + <option value="Theta">Theta</option> + </select> </div> <div class="card-actions"> @@ -201,25 +205,31 @@ class MaoAccount extends connect(store)(PageViewElement) { makeAccount() { var emailElement = this.shadowRoot.getElementById('createEmailField'); var passwordElement = this.shadowRoot.getElementById('createPasswordField'); - var divisionElement = this.shadowRoot.getElementById('createDivisionField'); + var divisonElement = this.shadowRoot.getElementById('createDivisonField'); - if( emailElement.value.includes('2019') || - emailElement.value.includes('2020') + if( emailElement.value.includes('2022') || + emailElement.value.includes('2021') || + emailElement.value.includes('2020') || + emailElement.value.includes('2019') ) { - const email = emailElement.value - + "@communityschoolnaples.org"; - const password = passwordElement.value; - const division = divisionElement.value; - - store.dispatch(createAccount(email,password,division)); + if(divisonElement.value == "") { + alert('Plase choose your divison'); + } else { + const email = emailElement.value + + "@communityschoolnaples.org"; + const password = passwordElement.value; + const divison = divisonElement.value; + + store.dispatch(createAccount(email,password,divison)); + } } else { alert('Please use a validated email.'); } emailElement.value = ""; passwordElement.value = ""; - divisionElement.value = ""; + divisonElement.value = ""; } } diff --git a/src/components/mao-tutoring.js b/src/components/mao-tutoring.js index a98ee1d..c25c570 100644 --- a/src/components/mao-tutoring.js +++ b/src/components/mao-tutoring.js @@ -208,7 +208,8 @@ class MaoTutoring extends connect(store)(PageViewElement) { type= "number" value= "15" step= "15" - max= "120"> + max= "120" + min= "15"> <span slot="suffix">(minutes)</span> </paper-input> diff --git a/src/components/registry-element.js b/src/components/registry-element.js index 79ef03f..03521ab 100644 --- a/src/components/registry-element.js +++ b/src/components/registry-element.js @@ -126,9 +126,9 @@ class RegistryElement extends LitElement { listElement.innerHTML = this.emails[i] .replace('@communityschoolnaples.org', ''); if (this.divisons[i].includes('Mu')) { mus .appendChild(listElement); - } else if (this.divisons[i].includes('Theta')) { - alphas .appendChild(listElement) } else if (this.divisons[i].includes('Alpha')) { + alphas .appendChild(listElement) + } else if (this.divisons[i].includes('Theta')) { thetas .appendChild(listElement) } else { other .appendChild(listElement); |