diff --git a/ayanova/src/components/report-selector-control.vue b/ayanova/src/components/report-selector-control.vue index 653508cb..9b57b21d 100644 --- a/ayanova/src/components/report-selector-control.vue +++ b/ayanova/src/components/report-selector-control.vue @@ -67,7 +67,7 @@ export default { selectedReport: null }), methods: { - open(ayaType, idList) { + async open(ayaType, idList) { let vm = this; if (ayaType == null || idList == null || idList.length == 0) { throw "report-selector:Open missing type and or idList"; @@ -75,15 +75,14 @@ export default { this.ayaType = ayaType; this.idList = idList; //get report list from server - //for now we'll fake it - let fakeReportList = []; - for (let i = 0; i < 3; i++) { - fakeReportList.push({ - name: "Fake report with the number " + i, - id: i - }); + + let res = await window.$gz.api.get(`report/list/${ayaType}`); + console.log("report-selectr report list from server is: ", res); + if (res.error) { + throw res.error; + } else { + this.reportList = res.data; } - this.reportList = fakeReportList; this.isVisible = true; return new Promise((resolve, reject) => {