From 0b8a20fc763c0a6ce45acff2f4f6a8929471461e Mon Sep 17 00:00:00 2001 From: KoWeiJAC Date: Fri, 12 Apr 2024 15:51:44 +0100 Subject: [PATCH] filter on JCIO download report --- src/views/Exercise/Reports/Agency.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/views/Exercise/Reports/Agency.vue b/src/views/Exercise/Reports/Agency.vue index ac94e45fd..1bd5715ad 100644 --- a/src/views/Exercise/Reports/Agency.vue +++ b/src/views/Exercise/Reports/Agency.vue @@ -815,6 +815,19 @@ export default { return reportData; }, + gatherJCIOReportData() { + const reportData = []; + + // get headers + reportData.push(this.report.headers.map(header => header.title)); + + // get rows + this.jcioRows.forEach((row) => { + reportData.push(this.report.headers.map(header => row[header.ref])); + }); + + return reportData; + }, exportData() { const title = 'Agency Report'; let data = null; @@ -828,6 +841,8 @@ export default { data = this.gatherBSBReportData(); } else if (this.activeTab === 'sra') { data = this.gatherSRAReportData(); + } else if (this.activeTab === 'jcio') { + data = this.gatherJCIOReportData(); } else { data = this.gatherReportData(); }