Skip to content

#6418 - Resolve restriction notes - #6496

Merged
weskubo-cgi merged 4 commits into
mainfrom
feature/#6418-resolve-restriction-notes
Aug 21, 2026
Merged

#6418 - Resolve restriction notes#6496
weskubo-cgi merged 4 commits into
mainfrom
feature/#6418-resolve-restriction-notes

Conversation

@weskubo-cgi

@weskubo-cgi weskubo-cgi commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Updated ViewRestrictions component so that note can be reset without impacting form submission.
  • Updated to use callback to modal stays open after backend failure.
  • Converted ViewRestrictions to script setup.
  • Minor cleanup in Restrictions.

Screenshots

Ministry - Institution Restrictions

View

image

API failure

image

First Resolution

image image

Second Resolution

image

Ministry - Student Restrictions

View

image

First Resolution

image image

Second Resolution

image

@weskubo-cgi weskubo-cgi self-assigned this Aug 19, 2026
Copilot AI lite review requested due to automatic review settings August 19, 2026 22:06
@weskubo-cgi
weskubo-cgi marked this pull request as draft August 19, 2026 22:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.vue to open the shared ViewRestriction modal and resolve restrictions based on the modal result.
  • Rebuilt ViewRestriction.vue to use UserNoteConfirmModal as the base modal, consolidating display + resolve-note capture.
  • Enhanced UserNoteConfirmModal.vue to 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.

@weskubo-cgi weskubo-cgi changed the title #6418 resolve restriction notes #6418 - Resolve restriction notes Aug 19, 2026
Comment on lines +148 to +150
const payload = { ...formModel };
resolvePromise(payload);
viewRestrictionForm.value.reset();

@weskubo-cgi weskubo-cgi Aug 20, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@weskubo-cgi
weskubo-cgi marked this pull request as ready for review August 20, 2026 20:40
@weskubo-cgi
weskubo-cgi requested a lite review from Copilot August 20, 2026 20:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@dheepak-aot
dheepak-aot self-requested a review August 21, 2026 16:27
Comment thread sources/packages/web/src/views/aest/institution/Restrictions.vue
formModel.restrictionId = props.restrictionData.restrictionId;
const payload = { ...formModel };
resolvePromise(payload);
viewRestrictionForm.value.reset();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed can reset based on the resolvePromise response.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 19.92% ( 4853 / 24363 )
Methods: 9.71% ( 288 / 2967 )
Lines: 24.28% ( 4145 / 17074 )
Branches: 9.72% ( 420 / 4322 )

@github-actions

Copy link
Copy Markdown

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 48.72% ( 2938 / 6030 )
Methods: 38.36% ( 308 / 803 )
Lines: 55.45% ( 2212 / 3989 )
Branches: 33.76% ( 418 / 1238 )

@github-actions

Copy link
Copy Markdown

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 81.02% ( 9882 / 12197 )
Methods: 80.77% ( 1294 / 1602 )
Lines: 84.38% ( 7370 / 8734 )
Branches: 65.45% ( 1218 / 1861 )

@dheepak-aot dheepak-aot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes. Looks good 👍

@uhelm uhelm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for the screenshots!

@github-actions

Copy link
Copy Markdown

E2E SIMS API Coverage Report

Totals Coverage
Statements: 70.34% ( 14944 / 21246 )
Methods: 67.92% ( 1783 / 2625 )
Lines: 73.45% ( 10656 / 14508 )
Branches: 60.9% ( 2505 / 4113 )

@weskubo-cgi
weskubo-cgi added this pull request to the merge queue Aug 21, 2026
Merged via the queue into main with commit 82b05c9 Aug 21, 2026
26 of 27 checks passed
@weskubo-cgi
weskubo-cgi deleted the feature/#6418-resolve-restriction-notes branch August 21, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants