Skip to content

Commit

Permalink
Funding Reports UI
Browse files Browse the repository at this point in the history
  • Loading branch information
SodhiA1 committed Sep 13, 2024
1 parent 02b2576 commit 052fa7c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 5 additions & 1 deletion backend/src/components/ministrySDCReports.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ 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', 'indy-funding-report', 'online-indy-funding-report', 'non-graduated-adult-indy-funding-report'];
'offshore-enrollment-headcounts', 'offshore-languages-headcounts', 'indy-inclusive-ed-funding-headcounts', 'indy-funding-report', 'online-indy-funding-report', 'non-graduated-adult-indy-funding-report',
'inclusive-education-variance-headcounts','enrolled-fte-headcounts', 'enrolment-fte-headcounts-for-ce-ol-schools', 'refugee-enrolment-fte-headcounts'];

async function getMinistrySDCReport(req, res) {
try {
Expand Down Expand Up @@ -53,6 +54,9 @@ function getFileDetails(reportType) {
'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' },
'enrolled-fte-headcounts': { filename: 'EnroledHeadcountsAndFteReport.csv', contentType: 'text/csv' },
'enrolment-fte-headcounts-for-ce-ol-schools': { filename: 'EnroledHeadcountsAndFteReportForCEOLSchools.csv', contentType: 'text/csv' },
'refugee-enrolment-fte-headcounts': { filename: 'RefugeeEnroledHeadcountsAndFteReport.csv', contentType: 'text/csv' },
'DEFAULT': { filename: 'download.pdf', contentType: 'application/pdf' }
};
return mappings[reportType] || mappings['DEFAULT'];
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/components/data-collection/ReportSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/>
</v-col>
<v-col
v-if="(reportData !== null || displayAllStudents) && selectedReport?.csvDownloadURL"
v-if="selectedReport?.csvDownloadURL"
class="mt-4 ml-4"
>
<router-link
Expand Down Expand Up @@ -161,6 +161,9 @@ export default {
} else if (this.selectedReport.reportID === 'FUNDING_POLICY_REPORT_INDY' || this.selectedReport.reportID === 'FUNDING_POLICY_REPORT_DISTRICT' || this.selectedReport.reportID === 'INCLUSIVE_EDUCATION_VARIANCE') {
this.displayAllStudents = false;
this.reportData = null;
} else if (this.selectedReport.reportID === 'ENROLED_FUNDING_REPORT') {
this.displayAllStudents = false;
this.reportData = null;
} else {
this.getReportData();
}
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ export const SDC_REPORTS = Object.freeze(
{
label: 'FSA Registration Report',
url: object.SDC_MINISTRY_REPORTS + '/headcount/fsa-registration-report/',
csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/fsa-registration-report/'
csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/fsa-registration-report/',
onlyForCollection: ['FEBRUARY', 'SEPTEMBER'],
},
{
label: 'School Physical Address Report',
Expand Down Expand Up @@ -447,14 +448,19 @@ export const SDC_REPORTS = Object.freeze(
},
{
label: 'Enroled Headcounts and FTEs By School',
reportID: 'ENROLED_FUNDING_REPORT',
csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/enrolled-fte-headcounts/'
},
{
label: 'Enroled Headcounts and FTEs For CE and OL Schools',
reportID: 'ENROLED_FUNDING_REPORT',
onlyForCollection: ['FEBRUARY', 'MAY'],
csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/enrolment-fte-headcounts-for-ce-ol-schools/'
},
{
label: 'Refugee Enroled Headcounts and FTEs',
reportID: 'ENROLED_FUNDING_REPORT',
onlyForCollection: ['FEBRUARY'],
csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/refugee-enrolment-fte-headcounts/'
},
{
Expand Down

0 comments on commit 052fa7c

Please sign in to comment.