diff options
author | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-08-05 01:03:40 -0400 |
---|---|---|
committer | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-08-05 01:03:40 -0400 |
commit | d9d80e24ee61e279e28c028b5fc118db269e91f2 (patch) | |
tree | 0b3ecb2d7a166237bf70d68093941a31124513fb /src/components/request-element.js | |
parent | 30a7181224eac82731f4950dc9f64956aba45c5e (diff) |
Updated ui to display minutes instead of hours. Also, added a location field to tutoring hours request.
Diffstat (limited to 'src/components/request-element.js')
-rw-r--r-- | src/components/request-element.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/components/request-element.js b/src/components/request-element.js index 397e4f1..c2bfa34 100644 --- a/src/components/request-element.js +++ b/src/components/request-element.js @@ -49,8 +49,9 @@ class RequestElement extends connect(store)(LitElement) { <h3>From: ${'\t' + props.email.replace('@communityschoolnaples.org', '')}</h3> <h4>Date: ${'\t' + props.date}</h4> <div class="info-tab" hidden="${!props.infoTabOpen}"> - <p>Time: ${'\t' + this.time}</p> - <p>Trainee: ${'\t' + this.trainee}</p> + <p><em>Location:</em> ${'\t' + this.location }</p> + <p><em>Minutes: </em> ${'\t' + (this.time*60) }</p> + <p><em>Trainee: </em> ${'\t' + this.trainee }</p> </div> </div> <div hidden="${!props.infoTabOpen}" class="card-actions"> @@ -58,13 +59,13 @@ class RequestElement extends connect(store)(LitElement) { class="info" raised on-tap= "${() => this.approveHours()}"> - Approve Hours + Approve Time </paper-button> <paper-button class="alert" raised on-tap= "${() => this.rejectHours()}"> - Reject Hours + Reject Time </paper-button> </div> </paper-card> @@ -74,6 +75,7 @@ class RequestElement extends connect(store)(LitElement) { static get properties() { return { email: String, date: String, + location: String, time: Number, trainee: String, uid: String, @@ -87,6 +89,7 @@ class RequestElement extends connect(store)(LitElement) { this.email = "Unknown email"; this.date = "Unknown date"; + this.location = "Unknown location"; this.time = -1; this.trainee = "Unknown trainee"; this.uid = "Unknown uid"; @@ -104,13 +107,13 @@ class RequestElement extends connect(store)(LitElement) { } approveHours() { - if(confirm('Are you sure you want to APPROVE ' + this.time + ' hours for ' + this.email +' ?')) { + if(confirm('Are you sure you want to APPROVE ' + (this.time*60) + ' minutes for ' + this.email +' ?')) { store.dispatch(adminApproveHours(this.uid, this.time, this.docId)); } } rejectHours() { - if(confirm('Are you sure you want to REJECT ' + this.time + ' hours for ' + this.email +' ?')) { + if(confirm('Are you sure you want to REJECT ' + (this.time*60) + ' minutes for ' + this.email +' ?')) { store.dispatch(adminRejectHours(this.docId)); } } |