Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update JCIO Agency Report #2366

Merged
merged 2 commits into from
Apr 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/views/Exercise/Reports/Agency.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) : [];
Expand Down Expand Up @@ -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;
Expand All @@ -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();
}
Expand Down
Loading