diff options
| author | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-07-29 14:41:44 -0400 |
|---|---|---|
| committer | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-07-29 14:41:44 -0400 |
| commit | 5962ac69cab3eb5fbc8874bb57c4bad88831e304 (patch) | |
| tree | c960973756953d9d5220cd1a2bca51fc8314c5cd /src/components/mao-tutoring.js | |
| parent | eaf489da66c51cce931bceccd569d76704b205f9 (diff) | |
Added backend for requesting tutoring hours. Will revise to make easier.
Diffstat (limited to 'src/components/mao-tutoring.js')
| -rw-r--r-- | src/components/mao-tutoring.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/components/mao-tutoring.js b/src/components/mao-tutoring.js index 5ab3c97..19d844a 100644 --- a/src/components/mao-tutoring.js +++ b/src/components/mao-tutoring.js @@ -144,13 +144,13 @@ class MaoTutoring extends connect(store)(PageViewElement) { </style> <section> - <div class="tutoring-grid" id="tutoring-grid" hidden="${props.signedIn}"> + <div class="tutoring-grid" id="tutoring-grid"> <div class="title"> <h2 class="underline">Tutoring</h2> </div> - <div class="tutorCard"> + <div class="tutorCard" hidden="${props.signedIn}"> <h3>Need to see or document hours?</h3> <paper-button class="info" @@ -304,12 +304,15 @@ class MaoTutoring extends connect(store)(PageViewElement) { } requestHours() { - const timeHours = (this.shadowRoot.getElementById('timeField') .value) - /60; - const traineeName = this.shadowRoot.getElementById('traineeField').value; - const date = this.shadowRoot.getElementById('dateField') .value; - store.dispatch(requestHours(timeHours, traineeName, date)); + if(confirm('Are you sure that you want to send this request for hours?')) { + const timeHours = (this.shadowRoot.getElementById('timeField') .value) + /60; + const traineeName = this.shadowRoot.getElementById('traineeField').value; + const date = this.shadowRoot.getElementById('dateField') .value; + + store.dispatch(requestHours(timeHours, traineeName, date)); + } } } |
