aboutsummaryrefslogtreecommitdiff
path: root/src/components/request-element.js
diff options
context:
space:
mode:
authorMichael Foiani <mfoiani2019@communiyschoolnaples.org>2018-08-01 20:46:52 -0400
committerMichael Foiani <mfoiani2019@communiyschoolnaples.org>2018-08-01 20:46:52 -0400
commit32fed7906a39e4bfa4d98fee1bdc5340d22cb63f (patch)
tree719f7bd92384927a0a6b994f67f020541be68723 /src/components/request-element.js
parent7070c6f28d0e1fb6b519b44a83314c4bdb7a004d (diff)
Fixed small glitch where snapshot would fire twice because the field in the database was called 'date.' Annoying. Also, fixed other bugs and finished the admin requests viewing, but need to connect the 'approve hours button.'
Diffstat (limited to 'src/components/request-element.js')
-rw-r--r--src/components/request-element.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/request-element.js b/src/components/request-element.js
index d5aca82..55c9588 100644
--- a/src/components/request-element.js
+++ b/src/components/request-element.js
@@ -50,6 +50,7 @@ class RequestElement extends LitElement {
class="info"
raised
on-tap= "${() => this.approveHours()}">
+ Approve Hours
</paper-button>
</div>
</paper-card>
@@ -58,6 +59,7 @@ class RequestElement extends LitElement {
static get properties() { return {
email: String,
+ date: String,
time: Number,
trainee: String,
uid: String,
@@ -69,6 +71,7 @@ class RequestElement extends LitElement {
super();
this.email = "Unknown email";
+ this.date = "Unknown date";
this.time = -1;
this.trainee = "Unknown trainee";
this.uid = "Unknown uid";
@@ -81,10 +84,9 @@ class RequestElement extends 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 + ' hours for ' + this.email +' ?')) {
this.dispatchEvent(new CustomEvent('approve-hours'));
}
-
}