Skip to content

Commit

Permalink
Merge pull request #1051 from bcgov/feature/EDX-1806
Browse files Browse the repository at this point in the history
EDX-1256: Verify Special Education Categories for Reported Students
  • Loading branch information
mightycox authored Sep 21, 2023
2 parents dffb400 + d7781fb commit fb4378d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion backend/src/components/sdc.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ function createSearchCriteria(searchParams = []) {
if (['FRENCH_PR', 'CAREER_PR', 'INDSUPPORT_PR'].includes(searchParams[key].label)) {
searchCriteriaList.push({ key: tableKey, operation: FILTER_OPERATION.IN, value: searchParams[key].enrolledProgramCodeValues, valueType: VALUE_TYPE.STRING, condition: CONDITION.AND });
}
if(searchParams[key].label === 'SPECIALED_PR') {
searchCriteriaList.push({ key: 'specialEducationCategoryCode', operation: FILTER_OPERATION.IN, value: searchParams[key].spedCodeValues, valueType: VALUE_TYPE.STRING, condition: CONDITION.AND });
}
}
if (key === 'studentPen') {
searchCriteriaList.push({ key: key, operation: FILTER_OPERATION.CONTAINS_IGNORE_CASE, value: pValue, valueType: VALUE_TYPE.STRING, condition: CONDITION.AND});
Expand All @@ -297,7 +300,6 @@ function createSearchCriteria(searchParams = []) {
searchCriteriaList.push({key: key, operation: FILTER_OPERATION.IN, value: pValue, valueType: VALUE_TYPE.STRING, condition: CONDITION.AND});
}
});

return searchCriteriaList;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export default {
};
},
computed: {
...mapState(useSdcCollectionStore, ['schoolFundingCodesMap', 'enrolledProgramCodesMap', 'careerProgramCodesMap', 'bandCodesMap']),
...mapState(useSdcCollectionStore, ['schoolFundingCodesMap', 'enrolledProgramCodesMap', 'careerProgramCodesMap', 'bandCodesMap', 'specialEducationCodesMap']),
},
created() {
useSdcCollectionStore().getCodes().then(() => {
Expand Down Expand Up @@ -222,6 +222,7 @@ export default {
return mappedEnrolledPrograms;
},
mapStudentData(student) {
student.mappedSpedCode = this.specialEducationCodesMap.get(student.specialEducationCategoryCode) !== undefined ? this.specialEducationCodesMap.get(student.specialEducationCategoryCode)?.specialEducationCategoryCode + '-' + capitalize(this.specialEducationCodesMap.get(student.specialEducationCategoryCode)?.description) : null;
student.mappedAncestryIndicator = student.nativeAncestryInd === null ? null : this.nativeAncestryInd(student);
student.mappedFrenchEnrolledProgram = this.enrolledProgramMapping(student, enrolledProgram.FRENCH_ENROLLED_PROGRAM_CODES);
student.careerProgram = this.enrolledProgramMapping(student, enrolledProgram.CAREER_ENROLLED_PROGRAM_CODES);
Expand All @@ -232,6 +233,7 @@ export default {
student.indProgramEligible = student.indigenousSupportProgramNonEligReasonCode !== null ? 'No' : 'Yes';
student.frenchProgramEligible = student.frenchProgramNonEligReasonCode !== null ? 'No' : 'Yes';
student.careerProgramEligible = student.careerProgramNonEligReasonCode !== null ? 'No' : 'Yes';
student.spedProgramEligible = student.specialEducationNonEligReasonCode !== null ? 'No' : 'Yes';
let noOfCourses = student.numberOfCourses;
if(noOfCourses && noOfCourses.length === 4) {
student.mappedNoOfCourses = (Number.parseInt(noOfCourses) / 100).toFixed(2);
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/utils/sdc/TableConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ export const INDSUPPORT_PR = Object.freeze(

export const SPECIALED_PR = Object.freeze(
{
defaultFilter: {label: 'SPECIALED_PR', description: 'Has Special Education Category'},
defaultFilter: {label: 'SPECIALED_PR', description: 'Has Special Education Category', spedCodeValues: 'A,B,C,D,E,F,G,H,K,P,Q,R'},
tableHeaders: [
{ title: 'select', key: 'select' },
{ title: 'FTE', key: 'fte', align:'start', subHeader: {title: 'Program Eligible', key: 'programEligible'} },
{ title: 'FTE', key: 'fte', align:'start', subHeader: {title: 'Program Eligible', key: 'spedProgramEligible'} },
{ title: 'PEN', key: 'studentPen', subHeader: {title: 'Local ID', key: 'localID'}},
{ title: 'Legal Surname, Given (Middle)', key: 'legalName', subHeader: {title: 'Usual Surname, Given (Middle)', key: 'usualName'}},
{ title: 'Adult', key: 'isAdult', subHeader: {title: 'Grad', key: 'isGraduated'}},
{ title: 'Grade', key: 'enrolledGradeCode', subHeader: {title: 'Funding Code', key: 'mappedSchoolFunding'}},
{ title: 'Special Education Category', key: 'specialEducationCategoryCode'},
{ title: 'Special Education Category', key: 'mappedSpedCode'},
],
}
);
Expand Down

0 comments on commit fb4378d

Please sign in to comment.