This commit is contained in:
2020-09-02 15:10:20 +00:00
parent 994015a504
commit fefee9fa73
2 changed files with 38 additions and 50 deletions

View File

@@ -14,14 +14,12 @@
</v-card-title>
<v-card-text style="height: 500px;">
<v-list>
<v-list-item
v-for="item in reportList"
:key="item.id"
@click="renderReport(item.id)"
>
<v-list-item-title>{{ item.name }}</v-list-item-title>
<v-list-item-action>
<v-btn icon @click.stop="editReport(item.id)">
@@ -32,7 +30,7 @@
</v-list>
</v-card-text>
<v-divider></v-divider>
<v-divider></v-divider>
<v-card-actions>
<v-btn
@@ -73,10 +71,18 @@ export default {
}),
methods: {
editReport(reportid) {
console.log("EDIT", reportid);
this.isVisible = false;
this.resolve(null);
this.$router.push({
name: "ay-report-edit",
params: {
recordid: reportid,
reportDataOptions: this.reportDataOptions
}
});
},
renderReport(reportid) {
console.log("RENDER REPORT", reportid);
alert(`RENDER REPORT ${reportid}`);
},
async open(reportDataOptions) {
let vm = this;
@@ -111,9 +117,11 @@ export default {
} else {
this.reportList = res.data;
}
for (let x = 20; x < 60; x++) {
this.reportList.push({ name: "REPORT NAME HERE", id: x });
}
//TESTING generate extra items
// for (let x = 20; x < 60; x++) {
// this.reportList.push({ name: "REPORT NAME HERE", id: x });
// }
this.isVisible = true;
return new Promise((resolve, reject) => {
@@ -121,10 +129,10 @@ export default {
this.reject = reject;
});
},
ok() {
this.isVisible = false;
this.resolve(this.selectedReport);
},
// ok() {
// this.isVisible = false;
// this.resolve(this.selectedReport);
// },
cancel() {
this.isVisible = false;
this.resolve(null);