aboutsummaryrefslogtreecommitdiff
path: root/src/components/request-element.js
diff options
context:
space:
mode:
authorMichael Foiani <mfoiani2019@communiyschoolnaples.org>2018-08-13 16:47:34 -0400
committerMichael Foiani <mfoiani2019@communiyschoolnaples.org>2018-08-13 16:47:34 -0400
commit717352f8653a71eba003ec33dfa6355463208045 (patch)
tree62ec6ae72a58d4ab80565e2f4b9cf6b20fb9654f /src/components/request-element.js
parent3c96bc3f51a97b13c76db305502436d54cc35a6b (diff)
Now deletes img from storage after use. Done with basic img backend stuff.
Diffstat (limited to 'src/components/request-element.js')
-rw-r--r--src/components/request-element.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/components/request-element.js b/src/components/request-element.js
index 37f6feb..c01b34e 100644
--- a/src/components/request-element.js
+++ b/src/components/request-element.js
@@ -68,10 +68,13 @@ class RequestElement extends connect(store)(LitElement) {
on-tap= "${() => this.rejectHours()}">
Reject Time
</paper-button>
+
+ <hr/>
+
<iron-image
style:"width:100%; height:auto;"
preload
- src="${props.imgPath}">
+ src="${props.imgUrl}">
</iron-image>
</div>
</paper-card>
@@ -87,6 +90,7 @@ class RequestElement extends connect(store)(LitElement) {
subject: String,
uid: String,
id: String,
+ imgUrl: String,
imgPath: String,
infoTabOpen: Boolean
@@ -103,6 +107,7 @@ class RequestElement extends connect(store)(LitElement) {
this.subject = "Unknown subject";
this.uid = "Unknown uid";
this.docId = "Unknown docId";
+ this.imgUrl = ""
this.imgPath = "";
this.infoTabOpen = false;
@@ -118,13 +123,13 @@ class RequestElement extends connect(store)(LitElement) {
approveHours() {
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));
+ store.dispatch(adminApproveHours(this.uid, this.time, this.docId, this.imgPath));
}
}
rejectHours() {
if(confirm('Are you sure you want to REJECT ' + (this.time*60) + ' minutes for ' + this.email +' ?')) {
- store.dispatch(adminRejectHours(this.docId));
+ store.dispatch(adminRejectHours(this.docId, this.imgPath));
}
}