From 1bf1a4589f417096a63dc0296f2cc17897dba86a Mon Sep 17 00:00:00 2001 From: Marco Villeneuve Date: Fri, 23 Aug 2024 17:45:00 -0700 Subject: [PATCH] Finished inclusive ed headcounts. --- backend/src/components/ministrySDCReports.js | 3 +- frontend/src/utils/constants.js | 45 +++++++++----------- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/backend/src/components/ministrySDCReports.js b/backend/src/components/ministrySDCReports.js index 98704ff8..bbb83e08 100644 --- a/backend/src/components/ministrySDCReports.js +++ b/backend/src/components/ministrySDCReports.js @@ -2,7 +2,7 @@ const { logApiError, errorResponse, getData } = require('./utils'); const config = require('../config/index'); const HttpStatus = require('http-status-codes'); -let reportTypes = ['school-enrollment-headcounts', 'indy-school-enrollment-headcounts', 'school-address-report', 'fsa-registration-report', 'offshore-enrollment-headcounts']; +let reportTypes = ['indy-inclusive-ed-enrollment-headcounts', 'school-enrollment-headcounts', 'indy-school-enrollment-headcounts', 'school-address-report', 'fsa-registration-report', 'offshore-enrollment-headcounts']; async function getMinistrySDCReport(req, res) { try { @@ -43,6 +43,7 @@ function getFileDetails(reportType) { const mappings = { 'school-enrollment-headcounts': { filename: 'AllSchoolsHeadcounts.csv', contentType: 'text/csv' }, 'indy-school-enrollment-headcounts': { filename: 'IndependentSchoolsHeadcounts.csv', contentType: 'text/csv' }, + 'indy-inclusive-ed-enrollment-headcounts': { filename: 'IndependentSchoolsInclusiveEdHeadcounts.csv', contentType: 'text/csv' }, 'school-address-report': { filename: 'SchoolPhysicalAddressReport.csv', contentType: 'text/csv' }, 'fsa-registration-report': { filename: 'FsaRegistrationReport.csv', contentType: 'text/csv' }, 'offshore-enrollment-headcounts': { filename: 'OffshoreSchoolsHeadcounts.csv', contentType: 'text/csv' }, diff --git a/frontend/src/utils/constants.js b/frontend/src/utils/constants.js index 71ef54da..b639d361 100644 --- a/frontend/src/utils/constants.js +++ b/frontend/src/utils/constants.js @@ -388,42 +388,37 @@ export const PEN_REQUEST_STUDENT_VALIDATION_FIELD_CODES_TO_STUDENT_DETAILS_FIELD export const SDC_REPORTS = Object.freeze( { publicReports: [ - { - label: 'School Physical Address Report', - url: object.SDC_MINISTRY_REPORTS + '/headcount/school-address-report/', - csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/school-address-report/' + { + label: 'All Students by District', + reportID: 'FUNDING_POLICY_REPORT_DISTRICT', }, - { + { label: 'FSA Registration Report', url: object.SDC_MINISTRY_REPORTS + '/headcount/fsa-registration-report/', csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/fsa-registration-report/' }, - { - label: 'All Students by District (CSV)', - reportID: 'FUNDING_POLICY_REPORT_DISTRICT', + { + label: 'School Physical Address Report', + url: object.SDC_MINISTRY_REPORTS + '/headcount/school-address-report/', + csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/school-address-report/' } ], independentReports: [ { - label: 'All Students', - reportID: 'ALL_STUDENTS_REPORT', - url: 'ABC' - }, - { - label: 'Five Students', - reportID: 'FIVE_STUDENTS_REPORT', - url: 'ABC' - }, - { - label: 'All Students by Independent School (CSV)', + label: 'All Students by Independent School', reportID: 'FUNDING_POLICY_REPORT_INDY', } ], headcountReports: [ { - label: 'School Enrolment Headcounts', - url: object.SDC_MINISTRY_REPORTS + '/headcount/school-enrollment-headcounts/', - csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/school-enrollment-headcounts/' + label: 'Independent School Enrolment Headcounts', + url: object.SDC_MINISTRY_REPORTS + '/headcount/indy-school-enrollment-headcounts/', + csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/indy-school-enrollment-headcounts/' + }, + { + label: 'Independent School Inclusive Education Headcounts', + url: object.SDC_MINISTRY_REPORTS + '/headcount/indy-inclusive-ed-enrollment-headcounts/', + csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/indy-inclusive-ed-enrollment-headcounts/' }, { label: 'Offshore School Enrolment Headcounts', @@ -431,9 +426,9 @@ export const SDC_REPORTS = Object.freeze( csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/offshore-enrollment-headcounts/' }, { - label: 'Independent School Enrolment Headcounts', - url: object.SDC_MINISTRY_REPORTS + '/headcount/indy-school-enrollment-headcounts/', - csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/indy-school-enrollment-headcounts/' + label: 'School Enrolment Headcounts', + url: object.SDC_MINISTRY_REPORTS + '/headcount/school-enrollment-headcounts/', + csvDownloadURL: object.SDC_MINISTRY_REPORTS + '/download/headcount/school-enrollment-headcounts/' } ] }