Skip to content

Commit

Permalink
Merge pull request #2050 from bcgov/fix/hide-district-indy
Browse files Browse the repository at this point in the history
hide district on indy school in all students, also adjust table layouts for dis/indy all student reports
  • Loading branch information
arcshiftsolutions authored Sep 12, 2024
2 parents 71fc1b3 + 1f03250 commit bf08bad
Show file tree
Hide file tree
Showing 3 changed files with 199 additions and 4 deletions.
3 changes: 2 additions & 1 deletion frontend/src/components/common/CustomTableSlice.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@
</span>
</div>
<div v-else-if="column.key === 'districtName'">
<span v-if="readOnly">
<span v-if="!props.item.raw.districtID || !props.item.raw.sdcDistrictCollectionID">-</span>
<span v-else-if="readOnly">
{{ props.item.raw['districtName'] }}
</span>
<span v-else>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</v-col>
<v-col v-if="indySchoolsNameNumberFilter != null || districtsNameNumberFilter != null">
<DetailComponent
:config="config"
:config="indySchoolsNameNumberFilter != null ? configSchools : configDistricts"
:collection-object="collectionObject"
:indy-school-district-object="indySchoolDistrictObject"
:show-export-btn="true"
Expand All @@ -59,7 +59,7 @@ import {appStore} from '@/store/modules/app';
import {mapState} from 'pinia';
import {sortBy} from 'lodash';
import DetailComponent from './AllStudents/DetailComponent.vue';
import {FTE} from '@/utils/sdc/collectionTableConfiguration.js';
import {FTE_DISTRICT, FTE_SCHOOL} from '@/utils/sdc/collectionTableConfiguration.js';
export default {
name: 'FundingPolicyReport',
Expand All @@ -81,7 +81,8 @@ export default {
districtsNameNumberFilter: null,
indySchoolNames: [],
districtNames: [],
config: FTE,
configDistricts: FTE_DISTRICT,
configSchools: FTE_SCHOOL,
indySchoolDistrictObject: null,
};
},
Expand Down
193 changes: 193 additions & 0 deletions frontend/src/utils/sdc/collectionTableConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,199 @@ export const FTE = Object.freeze(
}
);

export const FTE_DISTRICT = Object.freeze(
{
tableHeaders: [
{ title: 'District', key: 'districtName' },
{ title: 'School', key: 'schoolName' },
{ title: 'Assigned PEN', key: 'assignedPen', subHeader: { title: 'Local ID', key: 'localID' } },
{ title: 'Legal Surname, Given (Middle)', key: 'legalName', subHeader: { title: 'Usual Surname, Given (Middle)', key: 'usualName' } },
{ title: 'Birthdate', key: 'dob', subHeader: { title: 'Gender', key: 'gender' } },
{ title: 'Adult', key: 'isAdult', subHeader: { title: 'Grad', key: 'isGraduated' } },
{ title: 'Grade', key: 'enrolledGradeCode', subHeader: { title: 'Funding Code', key: 'mappedSchoolFunding' } },
{ title: 'Courses For Grad', key: 'mappedNoOfCourses', subHeader: { title: 'Support Blocks', key: 'supportBlocks' } },
{ title: 'Language Program', key: 'mappedLanguageEnrolledProgram', subHeader: { title: 'Years in ELL', key: 'yearsInEll' } },
{ title: 'Career Program', key: 'mappedCareerProgram', subHeader: { title: 'Career Code', key: 'mappedCareerProgramCode' } },
{ title: 'Indigenous Ancestry', key: 'mappedAncestryIndicator', subHeader: { title: 'Band Code', key: 'mappedBandCode' } },
{ title: 'Indigenous Support Program', key: 'mappedIndigenousEnrolledProgram', subHeader: { title: 'Inclusive Education Category', key: 'mappedSpedCode' } },
],
summaryReport: [
{ title: 'Eligible Enrolment & Eligible FTE', endpoint:'enrollment'},
{ title: 'Grade Enrolment & FTE per School', endpoint:'grade-enrollment'}
],
allowedFilters: {
warnings: WARNING_FILTER,
studentType: STUDENT_TYPE_FILTER,
fte: FTE_FILTER,
grade: GRADE_FILTER,
fundingType: FUNDING_TYPE_FILTER,
courses: COURSE_FILTER,
support: SUPPORT_BLOCKS_FILTER,
fteZero: FTE_ZERO_FILTER,
frenchProgram: {
...FRENCH_PROGRAMS_FILTER,
filterOptions: [
...FRENCH_PROGRAMS_FILTER.filterOptions,
{
title: '05 - Programme Francophone',
id: 'french05',
value: '05'
},
{
title: 'No French Programs',
id: 'noFrenchProgram',
value: 'noFrenchPrograms'
}
]
},
englishProgram: ENGLISH_PROGRAMS_FILTER,
ellYears: ELL_YEARS_FILTER,
careerPrograms: {
...CAREER_PROGRAM_FILTER,
filterOptions: [
...CAREER_PROGRAM_FILTER.filterOptions,
{
title: 'No Career Programs',
id: 'noCareerProgram',
value: 'noCareerPrograms'
}
]
},
careerCode: {
...CAREER_CODE_FILTER,
filterOptions: [
...CAREER_CODE_FILTER.filterOptions,
{
title: 'No Career Code',
id: 'noCareerCode',
value: 'noCareerCodes'
}
]
},
indigenousPrograms: {
...INDIGENOUS_PROGRAM_FILTER,
filterOptions: [
...INDIGENOUS_PROGRAM_FILTER.filterOptions,
{
title: 'No Indigenous Support Programs',
id: 'noIndigenousPrograms',
value: 'noIndigenousPrograms'
}
]
},
bandCode: BAND_FILTER,
ancestry: ANCESTRY_FILTER,
sped: {
...SPED_FILTER,
filterOptions: [
...SPED_FILTER.filterOptions,
{
title: 'No Inclusive Education Category',
id: 'noSpedCategory',
value: 'noSpedCode'
}
]
}
}
}
);

export const FTE_SCHOOL = Object.freeze(
{
tableHeaders: [
{ title: 'School', key: 'schoolName' },
{ title: 'Assigned PEN', key: 'assignedPen', subHeader: { title: 'Local ID', key: 'localID' } },
{ title: 'Legal Surname, Given (Middle)', key: 'legalName', subHeader: { title: 'Usual Surname, Given (Middle)', key: 'usualName' } },
{ title: 'Birthdate', key: 'dob', subHeader: { title: 'Gender', key: 'gender' } },
{ title: 'Adult', key: 'isAdult', subHeader: { title: 'Grad', key: 'isGraduated' } },
{ title: 'Grade', key: 'enrolledGradeCode', subHeader: { title: 'Funding Code', key: 'mappedSchoolFunding' } },
{ title: 'Courses For Grad', key: 'mappedNoOfCourses', subHeader: { title: 'Support Blocks', key: 'supportBlocks' } },
{ title: 'Language Program', key: 'mappedLanguageEnrolledProgram', subHeader: { title: 'Years in ELL', key: 'yearsInEll' } },
{ title: 'Career Program', key: 'mappedCareerProgram', subHeader: { title: 'Career Code', key: 'mappedCareerProgramCode' } },
{ title: 'Indigenous Ancestry', key: 'mappedAncestryIndicator', subHeader: { title: 'Band Code', key: 'mappedBandCode' } },
{ title: 'Indigenous Support Program', key: 'mappedIndigenousEnrolledProgram', subHeader: { title: 'Inclusive Education Category', key: 'mappedSpedCode' } },
],
summaryReport: [
{ title: 'Eligible Enrolment & Eligible FTE', endpoint:'enrollment'},
{ title: 'Grade Enrolment & FTE per School', endpoint:'grade-enrollment'}
],
allowedFilters: {
warnings: WARNING_FILTER,
studentType: STUDENT_TYPE_FILTER,
fte: FTE_FILTER,
grade: GRADE_FILTER,
fundingType: FUNDING_TYPE_FILTER,
courses: COURSE_FILTER,
support: SUPPORT_BLOCKS_FILTER,
fteZero: FTE_ZERO_FILTER,
frenchProgram: {
...FRENCH_PROGRAMS_FILTER,
filterOptions: [
...FRENCH_PROGRAMS_FILTER.filterOptions,
{
title: '05 - Programme Francophone',
id: 'french05',
value: '05'
},
{
title: 'No French Programs',
id: 'noFrenchProgram',
value: 'noFrenchPrograms'
}
]
},
englishProgram: ENGLISH_PROGRAMS_FILTER,
ellYears: ELL_YEARS_FILTER,
careerPrograms: {
...CAREER_PROGRAM_FILTER,
filterOptions: [
...CAREER_PROGRAM_FILTER.filterOptions,
{
title: 'No Career Programs',
id: 'noCareerProgram',
value: 'noCareerPrograms'
}
]
},
careerCode: {
...CAREER_CODE_FILTER,
filterOptions: [
...CAREER_CODE_FILTER.filterOptions,
{
title: 'No Career Code',
id: 'noCareerCode',
value: 'noCareerCodes'
}
]
},
indigenousPrograms: {
...INDIGENOUS_PROGRAM_FILTER,
filterOptions: [
...INDIGENOUS_PROGRAM_FILTER.filterOptions,
{
title: 'No Indigenous Support Programs',
id: 'noIndigenousPrograms',
value: 'noIndigenousPrograms'
}
]
},
bandCode: BAND_FILTER,
ancestry: ANCESTRY_FILTER,
sped: {
...SPED_FILTER,
filterOptions: [
...SPED_FILTER.filterOptions,
{
title: 'No Inclusive Education Category',
id: 'noSpedCategory',
value: 'noSpedCode'
}
]
}
}
}
);

export const MIN_REPORTS = Object.freeze(
{
fsaReportHeadersforFeb: [
Expand Down

0 comments on commit bf08bad

Please sign in to comment.