/** @license Copyright (c) 2018 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ import { html } from '@polymer/lit-element'; import { PageViewElement } from './page-view-element.js'; import { connect } from 'pwa-helpers/connect-mixin.js'; // This element is connected to the Redux store. import { store } from '../store.js'; //These are the actions needed by this element. import { requestHours } from '../actions/firebaseFirestore.js'; import { uploadPicture } from '../actions/firebaseStorage.js' // These are the }shared styles needed by this element. import { SharedStyles } from './shared-styles.js'; import { ButtonSharedStyles } from './button-shared-styles.js'; // Import iron-icon import '@polymer/iron-icons/communication-icons.js'; // Import paper elements import '@polymer/paper-input/paper-input.js'; import '@polymer/paper-progress/paper-progress.js'; import '@polymer/paper-card/paper-card.js'; import '@polymer/paper-item/paper-item.js'; import '@polymer/paper-item/paper-icon-item.js'; import '@polymer/paper-icon-button/paper-icon-button.js'; import '@polymer/paper-button/paper-button.js'; // Import other customElements import '@vaadin/vaadin-date-picker/vaadin-date-picker.js'; class MaoTutoring extends connect(store)(PageViewElement) { _render(props) { return html` ${SharedStyles} ${ButtonSharedStyles}
Maths
Tutoring

Our Hope

We want to encourage an enviornment of learnin through peer-to-peer tutoring. We offer all tutoring in all subjects for mao competitions and school subjects:

  • Algebra (1 & 2)
  • Geometry
  • Pre-calculus
  • Calculus (AB & BC)
  • Statistics

Need Help Finding A Tutor?

Please meet with your friends to create tutring sessions.

Also, you can try the forum page.

Otherwise, contact our tutoring coordinator Mike Binkowski.

`; } static get properties() { return { // This is the data from the store. signedIn: Boolean, hours: Number, requestedHours: Number, isUploaded: Boolean, pictureName: String, submitFieldsOpened: Boolean }} _stateChanged(state) { this.hours = state.firebaseFirestore .hours; this.requestedHours = state.firebaseFirestore .requestedHours; this.signedIn = state.firebaseAuth .signedIn; this.isUploaded = state.firebaseStorage .uploaded; this.pictureName = state.firebaseStorage .pictureName; this.sumbitFieldsOpened = false; } toggleSubmitFields() { this.submitFieldsOpened = !this.submitFieldsOpened; } requestHours() { if(this.shadowRoot && this.isUploaded) { var timeElement = this.shadowRoot.getElementById('timeField'); var traineeElement = this.shadowRoot.getElementById('traineeField'); var subjectElement = this.shadowRoot.getElementById('subjectField'); var locationElement = this.shadowRoot.getElementById('locationField'); var dateElement = this.shadowRoot.getElementById('dateField'); var uploaderElement = this.shadowRoot.getElementById('uploader'); var fileElement = this.shadowRoot.getElementById('pictureField'); if( timeElement .value.trim() === "" || locationElement .value.trim() === "" || traineeElement .value.trim() === "" || subjectElement .value.trim() === "" || dateElement .value === "") { alert("Please fill out all fields when making hours request."); } else { if(confirm('Are you sure that you want to send this request for hours?')) { const timeHours = (timeElement .value) /60; const location = locationElement .value; const traineeName = traineeElement .value; const subject = subjectElement .value; const date = dateElement .value; store.dispatch(requestHours(timeHours, traineeName, location, subject, date, this.pictureName)); timeElement .value = ""; traineeElement .value = ""; subjectElement .value = ""; locationElement .value = ""; dateElement .value = ""; uploaderElement .value = 0; fileElement .value = ""; } } } else { alert("You must upload an image with your trainee to submit hours.") } } uploadFile() { if(this.shadowRoot) { var uploader = this.shadowRoot.getElementById('uploader'); uploader.value = 0; var file = this.shadowRoot.getElementById('pictureField').inputElement.inputElement.files[0]; store.dispatch(uploadPicture(file, uploader)); } } } window.customElements.define('mao-tutoring', MaoTutoring);