#6418 - Resolve restriction notes - #6496
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the AEST institution restrictions “view/resolve” flow by refactoring Restrictions.vue to use the shared ViewRestriction modal implementation and enhancing the shared UserNoteConfirmModal to support additional customization (permission-gated actions, optional notes, configurable buttons).
Changes:
- Refactored
Restrictions.vueto open the sharedViewRestrictionmodal and resolve restrictions based on the modal result. - Rebuilt
ViewRestriction.vueto useUserNoteConfirmModalas the base modal, consolidating display + resolve-note capture. - Enhanced
UserNoteConfirmModal.vueto support optional notes display and role-based permission checks for the primary action.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| sources/packages/web/src/views/aest/institution/Restrictions.vue | Switches to the shared restriction-view modal API and fixes the view handler name. |
| sources/packages/web/src/components/common/restriction/ViewRestriction.vue | Migrates the restriction modal to the shared note/confirm modal base and updates display/resolution sections. |
| sources/packages/web/src/components/common/modals/UserNoteConfirmModal.vue | Adds optional notes rendering and role-based permission gating for the modal’s primary action. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const payload = { ...formModel }; | ||
| resolvePromise(payload); | ||
| viewRestrictionForm.value.reset(); |
There was a problem hiding this comment.
The issue was the missing form reset. However, since the reset clears the formModel, it is first spread to a new const. This is a common pattern. The alternative approach is to keep note as a ref and not part of the formModel (another pattern) but since there are multiple form fields anyways I left it as is.
| formModel.restrictionId = props.restrictionData.restrictionId; | ||
| const payload = { ...formModel }; | ||
| resolvePromise(payload); | ||
| viewRestrictionForm.value.reset(); |
There was a problem hiding this comment.
As discussed can reset based on the resolvePromise response.
|
dheepak-aot
left a comment
There was a problem hiding this comment.
Thanks for making the changes. Looks good 👍
uhelm
left a comment
There was a problem hiding this comment.
Looks good. Thanks for the screenshots!



Summary
ViewRestrictionscomponent so that note can be reset without impacting form submission.ViewRestrictionsto script setup.Restrictions.Screenshots
Ministry - Institution Restrictions
View
API failure
First Resolution
Second Resolution
Ministry - Student Restrictions
View
First Resolution
Second Resolution