Skip to content

Commit

Permalink
Merge pull request #2040 from bcgov/feature/EDX-2829
Browse files Browse the repository at this point in the history
Independent Funding Reports
  • Loading branch information
arcshiftsolutions authored Sep 13, 2024
2 parents 0047bee + 496d309 commit 250dcc9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
5 changes: 4 additions & 1 deletion backend/src/components/ministrySDCReports.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { logApiError, errorResponse, getData } = require('./utils');
const config = require('../config/index');
const HttpStatus = require('http-status-codes');
let reportTypes = ['indy-inclusive-ed-enrollment-headcounts', 'school-enrollment-headcounts', 'indy-school-enrollment-headcounts', 'school-address-report', 'fsa-registration-report',
'offshore-enrollment-headcounts', 'offshore-languages-headcounts', 'indy-inclusive-ed-funding-headcounts', 'inclusive-education-variance-headcounts'];
'offshore-enrollment-headcounts', 'offshore-languages-headcounts', 'indy-inclusive-ed-funding-headcounts', 'indy-funding-report', 'online-indy-funding-report', 'non-graduated-adult-indy-funding-report'];

async function getMinistrySDCReport(req, res) {
try {
Expand Down Expand Up @@ -50,6 +50,9 @@ function getFileDetails(reportType) {
'offshore-enrollment-headcounts': { filename: 'OffshoreSchoolsHeadcounts.csv', contentType: 'text/csv' },
'offshore-languages-headcounts': { filename: 'OffshoreSpokenLanguageHeadcounts.csv', contentType: 'text/csv' },
'indy-inclusive-ed-funding-headcounts': { filename: 'IndependentSchoolsInclusiveEdFundingHeadcounts.csv', contentType: 'text/csv' },
'indy-funding-report': { filename: 'IndependentSchoolsFundingReportStandardStudent.csv', contentType: 'text/csv' },
'online-indy-funding-report': { filename: 'IndependentSchoolsFundingReportOnlineLearning.csv', contentType: 'text/csv' },
'non-graduated-adult-indy-funding-report': { filename: 'IndependentSchoolsFundingReportNonGraduatedAdult.csv', contentType: 'text/csv' },
'DEFAULT': { filename: 'download.pdf', contentType: 'application/pdf' }
};
return mappings[reportType] || mappings['DEFAULT'];
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/data-collection/ReportSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</v-row>

<v-row
v-if="displayAllStudents || reportData !== null"
v-if="(reportData !== null || displayAllStudents) && selectedReport?.url"
no-gutters
>
<v-col>
Expand All @@ -49,7 +49,7 @@
<Spinner />
</v-col>
</v-row>
<v-row v-if="!displayAllStudents && reportData !== null">
<v-row v-if="!displayAllStudents && reportData !== null && selectedReport?.url">
<v-col>
<v-data-table
id="dataTable"
Expand Down
12 changes: 12 additions & 0 deletions frontend/src/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,18 @@ export const SDC_REPORTS = Object.freeze(
label: 'Eligible Inclusive Education Variance Headcounts',
reportID: 'INCLUSIVE_EDUCATION_VARIANCE',
},
{
label: 'Independent School Funding Report - Standard Student',
csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/indy-funding-report/'
},
{
label: 'Independent School Funding Report - Online Learning',
csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/online-indy-funding-report/'
},
{
label: 'Independent School Funding Report - Non Graduated Adult',
csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/non-graduated-adult-indy-funding-report/'
},
]
}
);
Expand Down

0 comments on commit 250dcc9

Please sign in to comment.