diff options
Diffstat (limited to 'src/components/request-element.js')
-rw-r--r-- | src/components/request-element.js | 11 |
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)); } } |