From e1f3f57ac35e534d7a777bd7298b67e3752e292c Mon Sep 17 00:00:00 2001 From: KoWeiJAC Date: Mon, 8 Apr 2024 17:02:58 +0100 Subject: [PATCH 1/2] filter JCIO applications --- src/views/Exercise/Reports/Agency.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Exercise/Reports/Agency.vue b/src/views/Exercise/Reports/Agency.vue index fcc4bc0d8..ac94e45fd 100644 --- a/src/views/Exercise/Reports/Agency.vue +++ b/src/views/Exercise/Reports/Agency.vue @@ -653,7 +653,7 @@ export default { return this.report ? this.report.rows.filter((e) => e.bsbQualifications.length > 0) : []; }, jcioRows() { - return this.report ? this.report.rows.filter((e) => e.jcioOffice) : []; + return this.report ? this.report.rows.filter((e) => e.jcioOffice === 'Yes') : []; }, hmrcRows() { return this.report ? this.report.rows.filter((e) => e.hmrcVATNumbers) : []; From f3608a2ad214b23642cab801954c91c978ee3430 Mon Sep 17 00:00:00 2001 From: KoWeiJAC Date: Fri, 12 Apr 2024 15:51:44 +0100 Subject: [PATCH 2/2] 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(); }