aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/mao-admin.js3
-rw-r--r--src/components/request-element.js11
2 files changed, 10 insertions, 4 deletions
diff --git a/src/components/mao-admin.js b/src/components/mao-admin.js
index ffdcb19..7047cab 100644
--- a/src/components/mao-admin.js
+++ b/src/components/mao-admin.js
@@ -168,7 +168,8 @@ class MaoAdmin extends connect(store)(PageViewElement) {
requestElement.subject = this.requests[i].subject;
requestElement.uid = this.requests[i].uid;
requestElement.docId = this.requests[i].docId;
- requestElement.imgPath = this.requests[i].imgPath;
+ requestElement.imgUrl = this.requests[i].imgUrl;
+ requestElement.imgPath = this.requests[i].path;
requestGrid.appendChild(requestElement);
}
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));
}
}