Skip to content

Commit

Permalink
Merge pull request #1933 from bcgov/feature/EDX-2948
Browse files Browse the repository at this point in the history
update to report constants and add band per school report
  • Loading branch information
SodhiA1 authored Sep 17, 2024
2 parents 34b0fad + fcf52fc commit 81cf86d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
33 changes: 17 additions & 16 deletions backend/src/components/sdc.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,29 +637,30 @@ function getFileDetails(reportType, mincode) {
'ALL_STUDENT_ERRORS_WARNS_DIS_CSV': { filename: `AllDistrictStudentsWithErrorsWarns_${mincode}.csv`, contentType: 'text/csv' },
'ALL_STUDENT_DIS_CSV': { filename: `AllDistrictStudents_${mincode}.csv`, contentType: 'text/csv' },
'ALL_STUDENT_SCHOOL_CSV': { filename: `AllSchoolStudents_${mincode}.csv`, contentType: 'text/csv' },
'ELL_HEADCOUNT': { filename: `ELLHeadcount_${mincode}.pdf`, contentType: 'application/pdf' },
'ELL_HEADCOUNT': { filename: `ELLHeadcount_School_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_ELL_HEADCOUNT': { filename: `ELLHeadcount_District_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_ELL_HEADCOUNT_PER_SCHOOL': { filename: `ELLHeadcount_District_${mincode}_PerSchool.pdf`, contentType: 'application/pdf' },
'DIS_REFUGEE_HEADCOUNT_PER_SCHOOL': { filename: `RefugeeHeadcount_${mincode}_Dis.pdf`, contentType: 'application/pdf' },
'SPECIAL_EDUCATION_HEADCOUNT': { filename: `InclusiveEdHeadcount_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_REFUGEE_HEADCOUNT_PER_SCHOOL': { filename: `RefugeeHeadcount_District_${mincode}.pdf`, contentType: 'application/pdf' },
'SPECIAL_EDUCATION_HEADCOUNT': { filename: `InclusiveEdHeadcount_School_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_SPECIAL_EDUCATION_HEADCOUNT': { filename: `InclusiveEdHeadcount_District_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_SPECIAL_EDUCATION_HEADCOUNT_PER_SCHOOL': { filename: `InclusiveEdHeadcount_District_${mincode}_PerSchool.pdf`, contentType: 'application/pdf' },
'DIS_SPECIAL_EDUCATION_HEADCOUNT_CATEGORY_PER_SCHOOL': { filename: `InclusiveEdCategoryHeadcount_District_${mincode}_PerSchool.pdf`, contentType: 'application/pdf' },
'INDIGENOUS_HEADCOUNT': { filename: `IndigenousHeadcount_${mincode}.pdf`, contentType: 'application/pdf' },
'INDIGENOUS_HEADCOUNT': { filename: `IndigenousHeadcount_School_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_INDIGENOUS_HEADCOUNT': { filename: `IndigenousHeadcount_District_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_INDIGENOUS_HEADCOUNT_PER_SCHOOL': { filename: `IndigenousHeadcount_District_${mincode}_PerSchool.pdf`, contentType: 'application/pdf' },
'BAND_RESIDENCE_HEADCOUNT': { filename: `BandOfResidenceHeadcount_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_BAND_RESIDENCE_HEADCOUNT': { filename: `BandOfResidenceHeadcount_${mincode}_Dis.pdf`, contentType: 'application/pdf' },
'CAREER_HEADCOUNT': { filename: `CareerProgramsHeadcount_${mincode}.pdf`, contentType: 'application/pdf' },
'FRENCH_HEADCOUNT': { filename: `FrenchProgramsHeadcount_${mincode}_School.pdf`, contentType: 'application/pdf' },
'DIS_FRENCH_HEADCOUNT': { filename: `FrenchProgramsHeadcount_${mincode}_Dis.pdf`, contentType: 'application/pdf' },
'DIS_FRENCH_HEADCOUNT_PER_SCHOOL': { filename: `FrenchProgramsHeadcount_${mincode}_DisPerSchool.pdf`, contentType: 'application/pdf' },
'GRADE_ENROLLMENT_HEADCOUNT': { filename: `GradeEnrollmentHeadcount_${mincode}_School.pdf`, contentType: 'application/pdf' },
'DIS_GRADE_ENROLLMENT_HEADCOUNT': { filename: `GradeEnrollmentHeadcount_${mincode}_Dis.pdf`, contentType: 'application/pdf' },
'DIS_GRADE_ENROLLMENT_HEADCOUNT_PER_SCHOOL': { filename: `GradeEnrollmentHeadcount_${mincode}_DisPerSchool.pdf`, contentType: 'application/pdf' },
'DIS_CAREER_HEADCOUNT': { filename: `CareerProgramsHeadcount_${mincode}_Dis.pdf`, contentType: 'application/pdf' },
'DIS_CAREER_HEADCOUNT_PER_SCHOOL': { filename: `CareerProgramsHeadcount_${mincode}_DisPerSchool.pdf`, contentType: 'application/pdf' },
'DIS_ZERO_FTE_SUMMARY': { filename: `Non-FundedStudentsHeadcount_${mincode}_DisPerSchool.pdf`, contentType: 'application/pdf' },
'BAND_RESIDENCE_HEADCOUNT': { filename: `BandOfResidenceHeadcount_School_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_BAND_RESIDENCE_HEADCOUNT': { filename: `BandOfResidenceHeadcount_District_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_BAND_RESIDENCE_HEADCOUNT_PER_SCHOOL': { filename: `BandOfResidenceHeadcount_District_${mincode}_PerSchool.pdf`, contentType: 'application/pdf' },
'CAREER_HEADCOUNT': { filename: `CareerProgramsHeadcount_School_${mincode}.pdf`, contentType: 'application/pdf' },
'FRENCH_HEADCOUNT': { filename: `FrenchProgramsHeadcount_School_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_FRENCH_HEADCOUNT': { filename: `FrenchProgramsHeadcount_District_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_FRENCH_HEADCOUNT_PER_SCHOOL': { filename: `FrenchProgramsHeadcount_District_${mincode}_PerSchool.pdf`, contentType: 'application/pdf' },
'GRADE_ENROLLMENT_HEADCOUNT': { filename: `GradeEnrollmentHeadcount_School_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_GRADE_ENROLLMENT_HEADCOUNT': { filename: `GradeEnrollmentHeadcount_District_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_GRADE_ENROLLMENT_HEADCOUNT_PER_SCHOOL': { filename: `GradeEnrollmentHeadcount_District_${mincode}_PerSchool.pdf`, contentType: 'application/pdf' },
'DIS_CAREER_HEADCOUNT': { filename: `CareerProgramsHeadcount_District_${mincode}.pdf`, contentType: 'application/pdf' },
'DIS_CAREER_HEADCOUNT_PER_SCHOOL': { filename: `CareerProgramsHeadcount_District_${mincode}_PerSchool.pdf`, contentType: 'application/pdf' },
'DIS_ZERO_FTE_SUMMARY': { filename: `Non-FundedStudentsHeadcount_District_${mincode}_PerSchool.pdf`, contentType: 'application/pdf' },
'DEFAULT': { filename: 'download.pdf', contentType: 'application/pdf' }
};
return mappings[reportType] || mappings['DEFAULT'];
Expand Down
1 change: 1 addition & 0 deletions backend/src/util/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ const reportTypeValues = [
['indigenous-per-school_dis', 'DIS_INDIGENOUS_HEADCOUNT_PER_SCHOOL'],
['band-codes', 'BAND_RESIDENCE_HEADCOUNT'],
['band-codes_dis', 'DIS_BAND_RESIDENCE_HEADCOUNT'],
['band-codes-per-school_dis', 'DIS_BAND_RESIDENCE_HEADCOUNT_PER_SCHOOL'],
['career', 'CAREER_HEADCOUNT'],
['french', 'FRENCH_HEADCOUNT'],
['french_dis', 'DIS_FRENCH_HEADCOUNT'],
Expand Down

0 comments on commit 81cf86d

Please sign in to comment.