From fcf52fc86fbb2b28fd9588c604c7df1fa775f009 Mon Sep 17 00:00:00 2001 From: alexmcdermid Date: Tue, 17 Sep 2024 12:04:22 -0700 Subject: [PATCH] update to report constants and add band per school report --- backend/src/components/sdc.js | 33 +++++++++++++++++---------------- backend/src/util/constants.js | 1 + 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/backend/src/components/sdc.js b/backend/src/components/sdc.js index 4ea9cb00..b12fa805 100644 --- a/backend/src/components/sdc.js +++ b/backend/src/components/sdc.js @@ -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']; diff --git a/backend/src/util/constants.js b/backend/src/util/constants.js index 212f2267..415b836e 100644 --- a/backend/src/util/constants.js +++ b/backend/src/util/constants.js @@ -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'],