From 717352f8653a71eba003ec33dfa6355463208045 Mon Sep 17 00:00:00 2001 From: Michael Foiani Date: Mon, 13 Aug 2018 16:47:34 -0400 Subject: Now deletes img from storage after use. Done with basic img backend stuff. --- src/components/request-element.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/components/request-element.js') 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 + +
+ + src="${props.imgUrl}"> @@ -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)); } } -- cgit v1.2.3-70-g09d2