Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX/UI for Ignore Restriction - Bypass Add/Remove #3691

Closed
24 tasks done
andrewsignori-aot opened this issue Sep 12, 2024 · 2 comments
Closed
24 tasks done

UX/UI for Ignore Restriction - Bypass Add/Remove #3691

andrewsignori-aot opened this issue Sep 12, 2024 · 2 comments
Assignees
Labels
Ministry Ministry Features User Story

Comments

@andrewsignori-aot
Copy link
Collaborator

andrewsignori-aot commented Sep 12, 2024

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 business-administrators.
  • 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.
  • 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_restrictions table. The same restriction code may have multiple active entries in the student restrictions. Format sample B3D 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 funding or Stop full time disbursement.
        • For part-time applications: only restriction where its action type contains Stop part time disbursement or "Stop part-time BC funding"
      • 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.
  • Suggested API endpoints
    • GET aest/application-restriction-bypass/:id
    • GET aest/application-restriction-bypass/application/:applicationId/options-list
    • POST aest/application-restriction-bypass
    • PATCH aest/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.

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
image

Ministry 'View Details' Modal - Bypass was Removed
image

Ministry 'Remove Bypass' Modal
image

@andrewsignori-aot andrewsignori-aot added Dev & Architecture Development and Architecture Ministry Ministry Features User Story labels Sep 12, 2024
@andrewsignori-aot andrewsignori-aot changed the title Copy of UX/UI for Ignore Restriction UX/UI for Ignore Restriction - Bypass Add/Remove Sep 12, 2024
@andrewsignori-aot andrewsignori-aot removed the Dev & Architecture Development and Architecture label Sep 13, 2024
@andrewsignori-aot andrewsignori-aot removed their assignment Oct 9, 2024
@andrepestana-aot andrepestana-aot self-assigned this Oct 31, 2024
@andrepestana-aot
Copy link
Collaborator

andrepestana-aot commented Nov 7, 2024

@Joshua-Lakusta @CarlyCotton Should the new permission to bypass restriction be added to all AEST groups or only Business Administrators?

@CarlyCotton
Copy link
Collaborator

CarlyCotton commented Nov 7, 2024

@andrepestana-aot Can you link that to only business-administrator group for now?

Edit: Updated AC to reflect just the one group.

github-merge-queue bot pushed a commit that referenced this issue Nov 13, 2024
…3905)

- Created the api endpoints:
  - GET aest/application-restriction-bypass/:id
- GET
aest/application-restriction-bypass/application/:applicationId/options-list
  - POST aest/application-restriction-bypass
  - PATCH aest/application-restriction-bypass/:id
- Added new role "aest-bypass-student-restriction" only for business
administrators;
- Added e2e tests:
  - ApplicationRestrictionBypassAESTController(e2e)-bypassRestriction
√ 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.
√ 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.
√ Should throw an HTTP error while creating a bypass when the student
application is in cancelled.
-
ApplicationRestrictionBypassAESTController(e2e)-getApplicationRestrictionBypass.
√ Should get an application restriction bypass for a submitted part-time
application when there is an application restriction bypass with the
required id.
√ Should get an inactive application restriction bypass for a submitted
part-time application when there is an application restriction bypass
with the required id.
-
ApplicationRestrictionBypassAESTController(e2e)-getAvailableRestrictionsToBypass.
√ Should list all student active restrictions and not already bypassed
for a part-time application when there is one restriction bypassed and
some others not.
√ Should list all student active restrictions for a full-time
application when there is one restriction bypassed and others not.
-
ApplicationRestrictionBypassAESTController(e2e)-removeBypassRestriction
√ 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.
√ Should throw an HTTP error while removing a bypass when the bypass is
not found.
github-merge-queue bot pushed a commit that referenced this issue Nov 14, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 20, 2024
Fix for when the student doesn't have any student restrictions in the
API.
github-merge-queue bot pushed a commit that referenced this issue Nov 21, 2024
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ministry Ministry Features User Story
Projects
None yet
Development

No branches or pull requests

5 participants