SIMS
SIMS copied to clipboard
UX/UI for Ignore Restriction - Bypass Add/Remove
User Story As a Ministry user, I need the ability to Ignore restrictions through the interface, as well as see some limited historical details of any ignored restrictions
Acceptance Criteria
- [ ] Build modal for when Ministry selects "Bypass restriction" .
- [ ] Build modal for when Ministry selects "View details" and the Bypass is active.
- [ ] Build modal for when Ministry selects "Remove bypass".
- [ ] Create role and add permissions for this feature to existing group(s).
- [ ] Applications are eligible for this ignore restriction bypass once they have been submitted and have an application number.
Technical
- [ ] Similar modals process exists for the Ministry while adding a student restriction to the student, they can used as a reference.
- [ ] "View detail" displays the "Bypass restriction" modal in the "view mode".
- [ ] "Remove bypass rule?" should be enabled for active bypasses only and active student restrictions. If the student restrictions associated with the bypass gets resolved the bypass should no longer be removed.
- [ ] When enabled, display the "Bypass restriction" modal "removal mode".
- [ ] When the bypass is removed update the following DB fields.
is_active: false.bypass_removed_date: current date.bypass_removed_by: Ministry user.removal_note_id: create a related note.- usual audit fields.
- [ ] Ensure API enforces the validation.
- [ ] When the bypass is removed update the following DB fields.
- [ ] When enabled, display the "Bypass restriction" modal "removal mode".
- [ ] Header button "Bypass a restriction" displays the "Bypass restriction" modal in the "create mode".
- [ ] Dropdown should be populated as below.
- [ ] If no restrictions are available to be populated, disable the "Bypass restriction" button, disable the dropdown, and show a waning banner right above the dropdown with the message "No active restrictions available to be bypassed or all active restrictions already have an active bypass.".
- [ ] Display restriction code and creation date from the
sims.student_restrictionstable. The same restriction code may have multiple active entries in the student restrictions. Format sampleB3D added on Aug 28 2024. - [ ] Only populate restriction currently active in the student account.
- [ ] Use a simple dropdown to list the items. No search is needed on the client or server side.
- [ ] Populate part-time/full-time restrictions based on the application following the below.
- For full-time application: only restriction where its action type contains
Stop full time BC fundingorStop full time disbursement. - For part-time applications: only restriction where its action type contains
Stop part time disbursement.
- For full-time application: only restriction where its action type contains
- [ ] Do not add to dropdown active restrictions that already have an active bypass. Filter to be done in the SQL query.
- [ ] Do not allow the creation for draft applications.
- [ ] Do not allow the creation of the bypass if there is already an active bypass for the student restriction ID.
- [ ] When the bypass is created update the following DB fields.
is_active: true.bypass_created_date: current date.bypass_created_by: Ministry user.creation_note_id: create a related note.bypass_behavior: selected behavior from the UI. Ensure DTO validation.student_restriction_id: selected from the UI. Ensure the logic to populate the dropdown options will be checked in the API.- usual audit fields.
- [ ] Dropdown should be populated as below.
- [ ] Suggested API endpoints
GETaest/application-restriction-bypass/:idGETaest/application-restriction-bypass/application/:applicationId/options-listPOSTaest/application-restriction-bypassPATCHaest/application-restriction-bypass/:id
- [ ] E2E tests
- Get bypasses
- Should get a list of restrictions bypasses when there are restrictions ignored for a Student Application.
- Get non-bypassed restrictions.
- Should list all student active restrictions for a part-time application when there is one restriction bypassed and one not.
- Should list all student active restrictions for a full-time application when there is one restriction bypassed and one not.
- Remove bypass
- Should be able to remove an active bypass when there is an active bypass.
- Should throw an HTTP error while removing a bypass when the bypass is not active.
- Create bypass
- Should be able to create a bypass when there is not an active bypass for the same student.
- Should throw an HTTP error while creating a bypass when there is an active bypass for the same active student restriction ID.
- Should throw an HTTP error while creating a bypass when student restriction is not active.
- Should throw an HTTP error while creating a bypass when the student application is in draft.
- Get bypasses
Supporting Mockups
These mockups follow a similar approach from the Ministry adding and removing restrictions. Please use that feature as a reference.
Ministry 'Bypass Restriction' Modal
Ministry 'View Details' Modal - Bypass was Removed
Ministry 'Remove Bypass' Modal