Skip to content

#5783 - Appeals and Forms queues#5829

Merged
tiago-graf merged 37 commits intomainfrom
feature/#5783-appeals-forms-queue
Mar 9, 2026
Merged

#5783 - Appeals and Forms queues#5829
tiago-graf merged 37 commits intomainfrom
feature/#5783-appeals-forms-queue

Conversation

@tiago-graf
Copy link
Copy Markdown
Collaborator

@tiago-graf tiago-graf commented Feb 28, 2026

Summary

Introduces two new Ministry queues for reviewing student-submitted forms:

  • The Appeals queue (for StudentAppeal form submissions)
  • The Forms queue (for StudentForm form submissions).

This replaces the existing legacy student appeals queue for program-year 2025-2026 and later, and introduces a dedicated queue for other student-submitted forms.

Legacy pending appeals table is renamed to "Legacy...".
Introduces e2e factories for form submission data.
Uses the FormSubmission feature toggle to turn on/off the new queues.

UI

image image

@tiago-graf tiago-graf self-assigned this Feb 28, 2026
@tiago-graf tiago-graf added Ministry Ministry Features Web portal Backend Used by the dependabot pull requests to identify PRs related to the backend. SIMS-Api SIMS-Api E2E/Unit tests labels Feb 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 adds AEST-facing “pending” queues for Forms and Appeals backed by the Form Submission feature, wiring new API endpoints and web views/components to list and filter items for ministry review.

Changes:

  • Added AEST API endpoints to retrieve paginated pending StudentForm and StudentAppeal form submissions (with filtering and search).
  • Added AEST web routes/views/components for “Pending forms” and updated “Pending appeals” to use the new Form Submission-backed endpoints.
  • Added supporting test-utils factory/repositories and e2e specs for the new AEST endpoints.

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
sources/packages/web/src/views/aest/student/StudentAppeals.vue Updates AEST appeals view to use the new pending appeals table and simplified header subtitle.
sources/packages/web/src/views/aest/student/PendingForms.vue Adds an AEST view wrapper for the new pending forms queue table.
sources/packages/web/src/views/aest/student/LegacyStudentAppeals.vue Adds a legacy appeals view to support the non-form-submission flow.
sources/packages/web/src/views/aest/student/LegacyChangeRequests.vue Switches legacy change requests view to use the legacy pending appeals table component.
sources/packages/web/src/types/contracts/DataTableContract.ts Adds form-submission-related filter enum and new table header definitions for pending appeals/forms.
sources/packages/web/src/types/AppRoutes.ts Adds new routes for legacy appeals and pending forms.
sources/packages/web/src/services/http/dto/FormSubmission.dto.ts Adds web DTOs for pending form/appeal queue summaries.
sources/packages/web/src/services/http/FormSubmissionApi.ts Adds HTTP client methods to call AEST pending-forms and pending-appeals endpoints.
sources/packages/web/src/services/FormSubmissionService.ts Adds service wrappers for the new pending forms/appeals API calls.
sources/packages/web/src/router/AESTRoutes.ts Registers new AEST routes for legacy appeals and pending forms.
sources/packages/web/src/constants/routes/RouteConstants.ts Adds new AEST route name symbols for legacy appeals and pending forms.
sources/packages/web/src/components/layouts/aest/AESTHomeSideBar.vue Adds Forms nav entry and conditionally routes Appeals to legacy/new based on feature toggle.
sources/packages/web/src/components/aest/student/PendingFormsTable.vue Implements the AEST “Pending forms” server-side table with pagination/search.
sources/packages/web/src/components/aest/student/PendingAppealsTable.vue Refactors pending appeals table to use form-submission-backed API plus an application/other filter UI.
sources/packages/web/src/components/aest/student/LegacyPendingAppealsTable.vue Adds legacy table component to preserve old pending appeals/change requests behavior.
sources/packages/backend/libs/test-utils/src/index.ts Exports the new form-submission factory from test-utils.
sources/packages/backend/libs/test-utils/src/factories/form-submission.ts Adds test factory to create/save FormSubmission records for e2e tests.
sources/packages/backend/libs/test-utils/src/data-source/e2e-data-source.ts Exposes FormSubmission repositories in E2EDataSources for tests.
sources/packages/backend/apps/api/src/services/form-submission/form-submission.service.ts Adds service method to query pending form submissions with pagination/search/filtering.
sources/packages/backend/apps/api/src/services/form-submission/form-submission.models.ts Adds pagination/filter models and a pending summary shape for pending form submission queries.
sources/packages/backend/apps/api/src/route-controllers/models/pagination.dto.ts Adds AEST query DTOs for pending form/appeal pagination and filtering.
sources/packages/backend/apps/api/src/route-controllers/index.ts Exposes the AEST form-submission controller via the route-controllers barrel.
sources/packages/backend/apps/api/src/route-controllers/form-submission/models/form-submission.dto.ts Adds API output DTOs for pending forms/appeals queue summaries.
sources/packages/backend/apps/api/src/route-controllers/form-submission/form-submission.aest.controller.ts Adds AEST GET endpoints for pending forms and pending appeals.
sources/packages/backend/apps/api/src/route-controllers/form-submission/tests/e2e/form-submission.aest.controller.getPendingFormSubmissions.e2e-spec.ts Adds e2e test coverage for the pending forms endpoint.
sources/packages/backend/apps/api/src/route-controllers/form-submission/tests/e2e/form-submission.aest.controller.getPendingAppeals.e2e-spec.ts Adds e2e test coverage for the pending appeals endpoint and applicationFilter behavior.
sources/packages/backend/apps/api/src/app.aest.module.ts Registers form-submission validators/loaders/services in the AEST module.

Comment thread sources/packages/web/src/components/aest/student/PendingAppealsTable.vue Outdated
Comment thread sources/packages/backend/apps/api/src/route-controllers/index.ts Outdated
Comment thread sources/packages/web/src/services/http/dto/FormSubmission.dto.ts
Comment thread sources/packages/web/src/router/AESTRoutes.ts
tiago-graf and others added 3 commits March 5, 2026 13:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
user1.lastName = uniqueIdentifier;
const user2 = createFakeUser();
user2.lastName = uniqueIdentifier;
const student1 = await saveFakeStudent(db.dataSource, { user: user1 });
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 much as possible, for E2E also, it would be good to run some queries in parallel, as below.

const [student1, student2] = await Promise.all([
  saveFakeStudent(db.dataSource, { user: user1 }),
  saveFakeStudent(db.dataSource, { user: user2 }),
]);
const [pendingStudentForm, pendingStudentAppeal] = await Promise.all([
  saveFakeFormSubmission(
    db,
    { student: student1 },
    {
      formCategory: FormCategory.StudentForm,
      submissionStatus: FormSubmissionStatus.Pending,
    },
  ),
  saveFakeFormSubmission(
    db,
    { student: student2 },
    {
      formCategory: FormCategory.StudentAppeal,
      submissionStatus: FormSubmissionStatus.Pending,
    },
  ),
  // Submissions that should not appear in the results.
  saveFakeFormSubmission(
    db,
    { student: student1 },
    {
      formCategory: FormCategory.StudentForm,
      submissionStatus: FormSubmissionStatus.Completed,
    },
  ),
  saveFakeFormSubmission(
    db,
    { student: student2 },
    {
      formCategory: FormCategory.StudentAppeal,
      submissionStatus: FormSubmissionStatus.Completed,
    },
  ),
]);

searchCriteriaParameterName = "searchCriteria",
) {
return `(${userTableAlias}.firstName || ' ' || ${userTableAlias}.lastName) ILIKE :${searchCriteriaParameterName}`;
return `(COALESCE(${userTableAlias}.firstName || ' ', '') || ${userTableAlias}.lastName) ILIKE :${searchCriteriaParameterName}`;
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 the fix 😉

*/
export function createFakeFormSubmissionItemDecision(
relations: { decisionBy: User },
initialValues?: Partial<FormSubmissionItemDecision>,
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.

initialValues are part of the options.

Copy link
Copy Markdown
Collaborator

@andrewsignori-aot andrewsignori-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. Overall looks good, please take a look at the remaining comments, but since there isn`t any blocker, I am approving it.

Copy link
Copy Markdown
Collaborator

@weskubo-cgi weskubo-cgi left a comment

Choose a reason for hiding this comment

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

Looks great. Just left a few suggestions to have a look at.

Comment thread sources/packages/web/src/views/aest/student/LegacyStudentAppeals.vue Outdated
Comment thread sources/packages/backend/libs/test-utils/src/factories/form-submission.ts Outdated
Comment thread sources/packages/web/src/services/http/FormSubmissionApi.ts Outdated
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 8, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 8, 2026

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 20.22% ( 4542 / 22463 )
Methods: 9.6% ( 262 / 2728 )
Lines: 24.51% ( 3894 / 15886 )
Branches: 10.03% ( 386 / 3849 )

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 8, 2026

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 75.23% ( 1066 / 1417 )
Methods: 78.38% ( 116 / 148 )
Lines: 78.68% ( 775 / 985 )
Branches: 61.62% ( 175 / 284 )

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 8, 2026

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 85.68% ( 1616 / 1886 )
Methods: 85% ( 187 / 220 )
Lines: 88.64% ( 1287 / 1452 )
Branches: 66.36% ( 142 / 214 )

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 8, 2026

E2E SIMS API Coverage Report

Totals Coverage
Statements: 75.77% ( 9452 / 12474 )
Methods: 74.13% ( 1089 / 1469 )
Lines: 80.32% ( 6850 / 8528 )
Branches: 61.08% ( 1513 / 2477 )

Copy link
Copy Markdown
Collaborator

@weskubo-cgi weskubo-cgi 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 those updates. Looks great!

@tiago-graf tiago-graf added this pull request to the merge queue Mar 9, 2026
Merged via the queue into main with commit 8148ac2 Mar 9, 2026
22 checks passed
@tiago-graf tiago-graf deleted the feature/#5783-appeals-forms-queue branch March 9, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Used by the dependabot pull requests to identify PRs related to the backend. E2E/Unit tests Ministry Ministry Features SIMS-Api SIMS-Api Web portal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants