diff --git a/backend/src/components/sdc.js b/backend/src/components/sdc.js index af86c8140..bbcbc7f38 100644 --- a/backend/src/components/sdc.js +++ b/backend/src/components/sdc.js @@ -412,7 +412,9 @@ function toTableRow(student) { } function fundingEligibleRefugee(student) { - const hasIssue = student?.sdcSchoolCollectionStudentValidationIssues?.some(issue => issue.validationIssueCode === 'REFUGEEINPREVCOL'); + const hasIssue = student?.sdcSchoolCollectionStudentValidationIssues?.some(issue => + issue.validationIssueCode === 'REFUGEEINPREVCOL' || issue.validationIssueCode === 'REFUGEEISADULT' + ); return hasIssue ? 'No' : 'Yes'; } diff --git a/backend/src/components/studentFilters.js b/backend/src/components/studentFilters.js index 029bb63a1..e68a5c88d 100644 --- a/backend/src/components/studentFilters.js +++ b/backend/src/components/studentFilters.js @@ -438,9 +438,35 @@ function createRefugeeFundingFilter(pValue) { let refugeeFundingList = []; if (pValue.toString() === 'true') { - refugeeFundingList.push({ key: 'sdcStudentValidationIssueEntities.validationIssueCode', value: 'REFUGEEINPREVCOL', operation: FILTER_OPERATION.NONE_IN, valueType: VALUE_TYPE.STRING, condition: CONDITION.OR }); + refugeeFundingList.push({ + key: 'sdcStudentValidationIssueEntities.validationIssueCode', + value: 'REFUGEEINPREVCOL', + operation: FILTER_OPERATION.NONE_IN, + valueType: VALUE_TYPE.STRING, + condition: CONDITION.AND + }); + refugeeFundingList.push({ + key: 'sdcStudentValidationIssueEntities.validationIssueCode', + value: 'REFUGEEISADULT', + operation: FILTER_OPERATION.NONE_IN, + valueType: VALUE_TYPE.STRING, + condition: CONDITION.AND + }); } else if (pValue.toString() === 'false') { - refugeeFundingList.push({ key: 'sdcStudentValidationIssueEntities.validationIssueCode', value: 'REFUGEEINPREVCOL', operation: FILTER_OPERATION.IN, valueType: VALUE_TYPE.STRING, condition: CONDITION.OR }); + refugeeFundingList.push({ + key: 'sdcStudentValidationIssueEntities.validationIssueCode', + value: 'REFUGEEINPREVCOL', + operation: FILTER_OPERATION.IN, + valueType: VALUE_TYPE.STRING, + condition: CONDITION.OR + }); + refugeeFundingList.push({ + key: 'sdcStudentValidationIssueEntities.validationIssueCode', + value: 'REFUGEEISADULT', + operation: FILTER_OPERATION.IN, + valueType: VALUE_TYPE.STRING, + condition: CONDITION.OR + }); } return refugeeFundingList;