Conversation
There was a problem hiding this comment.
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. |
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 }); |
There was a problem hiding this comment.
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}`; |
There was a problem hiding this comment.
Thanks for the fix 😉
| */ | ||
| export function createFakeFormSubmissionItemDecision( | ||
| relations: { decisionBy: User }, | ||
| initialValues?: Partial<FormSubmissionItemDecision>, |
There was a problem hiding this comment.
initialValues are part of the options.
andrewsignori-aot
left a comment
There was a problem hiding this comment.
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.
weskubo-cgi
left a comment
There was a problem hiding this comment.
Looks great. Just left a few suggestions to have a look at.
|
weskubo-cgi
left a comment
There was a problem hiding this comment.
Thanks for making those updates. Looks great!



Summary
Introduces two new Ministry queues for reviewing student-submitted forms:
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