-
Notifications
You must be signed in to change notification settings - Fork 13
#4968 - Institution Program Restrictions: Suspension - UI - Part 1 #5430
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
#4968 - Institution Program Restrictions: Suspension - UI - Part 1 #5430
Conversation
| :max-width="showFullScreen ? undefined : maxWidth" | ||
| :min-width="showFullScreen ? undefined : minWidth" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to verify, is smAndDown(showFullScreen) reactive and not required to use through computed property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should be since the UI is adapting as expected and the previously existing smAndDown was assigned to the v-dialog fullscreen property.
sources/packages/web/src/components/institutions/modals/AddRestrictionModal.vue
Outdated
Show resolved
Hide resolved
| item-value="id" | ||
| item-title="name" | ||
| class="mb-4" | ||
| label="Location" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From business perspective shouldn't it be called as Locations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will raise the question to biz. If they answer in time for this ticket, I will change; otherwise, this is following the ACs, and we should move forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question raised: #4968 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjusted to Location(s). There is one "AC" updated in the ticket now.
sources/packages/web/src/views/aest/institution/Restrictions.vue
Outdated
Show resolved
Hide resolved
| * Every time that a user login to the system check is some of the readonly | ||
| * information (that must be changed on BCeID) changed. | ||
| * @param userId user id. | ||
| * @param bceidUserName user name on BCeID. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will adjust this and the UI component in the upcoming PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
|
dheepak-aot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work. Thanks for making the changes. Looks good 👍
…splay restriction) (#5450) ## Restrictions Summary - Added `Location` and `Programs` columns to the table and enabled sorting for them. - Sorting on column `Status` was kept in order to allow it to display all `Active` items at the top, following the same behavior that was in place and the same as the students' restrictions. <img width="1278" height="660" alt="image" src="https://github.com/user-attachments/assets/268543e8-6edc-4e2b-ae06-292c193f502c" /> _Note:_ resolving restrictions is not part of this ticket. The value added in the above table is a result of the DB manipulation with the sole purpose of taking the screenshot. <img width="733" height="523" alt="image" src="https://github.com/user-attachments/assets/4933670e-c555-48ff-972f-5a76d85127fe" /> _Note:_ the only AC related to viewing a restriction is the one that mentions "Add View Button". No work was actually done on this modal, and it is here for the sake of demonstration that it is able to display the data. ## Other Changes - Included an extra E2E for institution restriction created as [suggested during previous PR](#5430 (comment)). - Removed the hardcoded `Designation` institution type present on the API and student "add restriction". - Minor refactor in the student restrictions creation modal to remove errors and adjust the `processing` status (`processing` was added to the Vue template but not present at the `setup`). ## E2E Tests RestrictionAESTController(e2e)-getReasonsOptionsList. - √ Should throw a bad request exception when requesting federal restrictions reasons. - √ Should throw a bad request exception when category is not provided. - Should get reasons options list for a restriction type when the request is valid. - √ Should get Provincial restrictions reasons list filtered by specific category when Provincial restrictions are requested for a category. - √ Should get Institution restrictions reasons list filtered by specific category when Institution restrictions are requested for a category. RestrictionAESTController(e2e)-addInstitutionRestriction. - √ Should throw an unprocessable entity exception when trying to add a provincial restriction. ## Outside scope but open for discussion - The method `getAllRestrictionCategories` was not refactored beyond the minimal required to apply the accurate filter. The result is misleading because the distinct will return the first item of a distinct group to allow an ID to be returned, but the returned ID has no purpose, and returning it seems to be a mistake. - Proposed refactors: - Stop returning the ID; - Replace the `distinct on` with a regular `distinct`. - Pass the restriction type as a parameter. - Adjust the API/Web DTOs.




PR Scoppe
Add new restrictions modal
Data load
Locations
allInstitutionLocationsto get all locations available for an institution. The method does retrieve more data than required, but this was not considered an issue since it should return very few records ( 1 to 3 most of the time, maybe 15 for an exceptional case).Program list:
getProgramsListForInstitutionsfor institutions. The method was kept the same to be "client shared" by the Vue application. If there is a strong reason to create a different method from the institution's one, please share the motivation, and we can have it adjusted.Restrictions descriptions (a.k.a. reasons)
getRestrictionReasonsreceived a minor refactor to allow the retrieval of institution restrictions.Post New Restriction
institution.model.tsgot new shortcut properties to allow a single query to retrieve the data to be validated.E2E Tests
RestrictionAESTController(e2e)-addInstitutionRestriction.
Should throw a bad request exception when no locations were provided. (99 ms)
√ Should add multiple institution restrictions when a valid payload with multiple locations IDs is submitted.
√ Should create the institution restriction when there is already an institution restriction, but it is inactive.
√ Should throw an unprocessable entity exception when an active institution restriction already exists for at least one location.
√ Should throw a not found exception when the provided institution is not found.
√ Should throw an unprocessable entity exception when the location does not exist associated with the institution.
√ Should throw an unprocessable entity exception when the program does not exist associated with the institution.
√ Should throw an unprocessable entity exception when the restriction ID does not exist.
√ Should throw a forbidden exception when the user does not have permission.
√ Should throw a bad request exception when no locations were provided.
√ Should throw a bad request exception when too many locations are provided.
Outside PR scope