Skip to content

#5816 - Appeals/Forms history view, data connection, and institution view - History#5873

Merged
andrewsignori-aot merged 9 commits intomainfrom
feature/#5190-new-unified-data-path-for-appeals-and-forms-history
Mar 12, 2026
Merged

#5816 - Appeals/Forms history view, data connection, and institution view - History#5873
andrewsignori-aot merged 9 commits intomainfrom
feature/#5190-new-unified-data-path-for-appeals-and-forms-history

Conversation

@andrewsignori-aot
Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot commented Mar 10, 2026

PR Goal

  • Enable the form submission history for the Ministry, Student, and Institutions.
  • Avoid displaying decision statuses for form submission not yet been completed.
  • Institutions should have access to view all student-related forms and appeals not related to an application, and, when application-related, only the ones the user has access to the location.

API Changes

  • Enabled a new endpoint for Ministry, Student, and Institutions to get the form submissions history.
    • GET students/form-submission
    • GET aest/form-submission/student/:studentId
    • GET institutions/form-submission/student/:studentId
  • All clients share a centralized controller service method to execute the API data conversion to be returned and have the rules applied.
  • The new endpoints are now sharing the same service method getFormSubmissions that allows retrieving data for:
    • Submission form history;
    • Single submission and its item details;
    • Single submission item details, for Ministry approval, removing the previous dedicated method in the FormSubmissionApprovalService.
  • Previous institution method getFormSubmission that was accepting an application ID had such application ID removed to allow the data retrieval for an application or for multiple applications, executing the authorization based on the locations' IDs.

Ministry

image

Navigation from the history

image

Navigation from pending list

image

Institution

image

Navigation from history

image

Student

image

Navigation from history

image

Navigation from application

image

Non-PR related changes

  • Added :fluid="true" to v-container to fix the extra margin in some pages.
image

@andrewsignori-aot andrewsignori-aot self-assigned this Mar 10, 2026
@andrewsignori-aot andrewsignori-aot added Student Student Features Institution Institution Features Ministry Ministry Features SIMS-Api SIMS-Api Web portal labels Mar 10, 2026

This comment was marked as outdated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This component is not completely new and received just minor changes after it started to be retrieved from the API.

@andrewsignori-aot andrewsignori-aot marked this pull request as ready for review March 11, 2026 16:09
formSubmissionId,
studentId,
{ applicationId: options?.applicationId },
): Promise<FormSubmissionAPIOutDTO[]> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

should you be using FormSubmissionsAPIOutDTO?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This controller service is used by API endpoints that return one or multiple records.
The API endpoints are returning the specific DTOs. What would be the benefit at this moment of having this one returning the FormSubmissionsAPIOutDTO?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thats fine, i just spotted the different returns, i guess my confusion was why have a separate FormSubmissionsAPIOutDTO and not use the array FormSubmissionAPIOutDTO[] directly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We try to avoid using the direct array return as a pattern because what is an array today may be a property in the DTO that would need to be expanded in the future.

await this.formSubmissionControllerService.getFormSubmissions(studentId, {
includeBasicDecisionDetails: true,
keepPendingDecisionsWhilePendingFormSubmission: true,
locationIds: userToken.authorizations.getLocationsIds(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

): Promise<FormSubmissionsAPIOutDTO> {
const submissions =
await this.formSubmissionControllerService.getFormSubmissions(studentId, {
includeBasicDecisionDetails: true,
Copy link
Collaborator

@dheepak-aot dheepak-aot Mar 12, 2026

Choose a reason for hiding this comment

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

I see for ministry that includeBasicDecisionDetails: false but true for institution. Couldn't follow that part. I believe for history, it must be false.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This method is consumed by different API endpoints for the three clients. When the Ministry calls, this method is for rendering the history, which does not require additional notes to be returned.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added comments and minor refactor to getFormSubmissions hope that it helps.


@AllowAuthorizedParty(AuthorizedParties.institution)
@IsBCPublicInstitution()
@HasStudentDataAccess("studentId")
Copy link
Collaborator

Choose a reason for hiding this comment

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

While using the location ids, isn't this check redundant?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The HasStudentDataAccess will ensure the student has an application under the institution, while the locations' IDs will ensure the user's access only for application-related forms associated with the locations.
The combination of both will ensure the forms with and without an application scope will be authorized.
As a general rule, I believe the @HasStudentDataAccess("studentId") should be enforced every time the student data is accessed to ensure the same minimal check every time.

Comment on lines +113 to +114
includeBasicDecisionDetails: false,
keepPendingDecisionsWhilePendingFormSubmission: false,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it not as good as not passing the options?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added comments and minor refactor to getFormSubmissions hope that it helps.

@andrewsignori-aot andrewsignori-aot changed the title #5190 - Appeals and forms analysis work - History #5816 - Appeals/Forms history view, data connection, and institution view - History Mar 12, 2026
async getFormSubmission(
formSubmissionId: number,
options?: { studentId?: number; applicationId?: number; itemId?: number },
options?: { studentId?: number; itemId?: number },
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@sonarqubecloud
Copy link

@github-actions
Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 20.17% ( 4564 / 22624 )
Methods: 9.52% ( 262 / 2751 )
Lines: 24.51% ( 3916 / 15977 )
Branches: 9.91% ( 386 / 3896 )

@github-actions
Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 48.61% ( 2712 / 5579 )
Methods: 38.57% ( 285 / 739 )
Lines: 55.39% ( 2049 / 3699 )
Branches: 33.13% ( 378 / 1141 )

@github-actions
Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 79.6% ( 9155 / 11501 )
Methods: 78.79% ( 1181 / 1499 )
Lines: 82.83% ( 6881 / 8307 )
Branches: 64.48% ( 1093 / 1695 )

@github-actions
Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 64.4% ( 12680 / 19689 )
Methods: 60.57% ( 1473 / 2432 )
Lines: 68.2% ( 9250 / 13564 )
Branches: 52.99% ( 1957 / 3693 )

Copy link
Collaborator

@dheepak-aot dheepak-aot left a comment

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 👍

@andrewsignori-aot andrewsignori-aot added this pull request to the merge queue Mar 12, 2026
Merged via the queue into main with commit 54692fa Mar 12, 2026
22 checks passed
@andrewsignori-aot andrewsignori-aot deleted the feature/#5190-new-unified-data-path-for-appeals-and-forms-history branch March 12, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Institution Institution Features Ministry Ministry Features SIMS-Api SIMS-Api Student Student Features Web portal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants