Skip to content

Commit

Permalink
#3691 - UX/UI for Ignore Restriction - Bypass Add/Remove - Added "Sto…
Browse files Browse the repository at this point in the history
…p part time BC funding" action type (#3977)

- Added StopPartTimeBCFunding restriction action type to the query that
gets the available student restrictions to be bypassed.
  • Loading branch information
andrepestana-aot authored Nov 21, 2024
1 parent 7f2a108 commit 9de4f64
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ describe("ApplicationRestrictionBypassAESTController(e2e)-getAvailableRestrictio
},
);

const b6aRestriction = await db.restriction.findOne({
where: { restrictionCode: RestrictionCode.B6A },
});
// Add a student restriction that should be available to be bypassed because the restriction has an action type "Stop part time BC funding".
const stopPartTimeBCFundingStudentRestriction =
await saveFakeStudentRestriction(db.dataSource, {
student: application.student,
restriction: b6aRestriction,
});

const b6bRestriction = await db.restriction.findOne({
where: { restrictionCode: RestrictionCode.B6B },
});
Expand Down Expand Up @@ -131,6 +141,12 @@ describe("ApplicationRestrictionBypassAESTController(e2e)-getAvailableRestrictio
studentRestrictionCreatedAt:
removedApplicationRestrictionsBypass.studentRestriction.createdAt.toISOString(),
},
{
studentRestrictionId: stopPartTimeBCFundingStudentRestriction.id,
restrictionCode: b6aRestriction.restrictionCode,
studentRestrictionCreatedAt:
stopPartTimeBCFundingStudentRestriction.createdAt.toISOString(),
},
{
studentRestrictionId: stopPartTimeDisbursementStudentRestriction.id,
restrictionCode: ecrsRestriction.restrictionCode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export class ApplicationRestrictionBypassService {
actionType: ArrayOverlap([
RestrictionActionType.StopFullTimeBCFunding,
RestrictionActionType.StopFullTimeDisbursement,
RestrictionActionType.StopPartTimeBCFunding,
RestrictionActionType.StopPartTimeDisbursement,
]),
},
Expand All @@ -199,7 +200,10 @@ export class ApplicationRestrictionBypassService {
RestrictionActionType.StopFullTimeBCFunding,
RestrictionActionType.StopFullTimeDisbursement,
]
: [RestrictionActionType.StopPartTimeDisbursement];
: [
RestrictionActionType.StopPartTimeBCFunding,
RestrictionActionType.StopPartTimeDisbursement,
];

const bypassedStudentRestrictionIds =
application.student.studentRestrictions
Expand Down

0 comments on commit 9de4f64

Please sign in to comment.