aboutsummaryrefslogtreecommitdiff
path: root/src/components/request-element.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/request-element.js')
-rw-r--r--src/components/request-element.js15
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));
}
}