Skip to content

#4043 - Update Institution Programs List View#5790

Merged
tiago-graf merged 26 commits intomainfrom
feature/#4043-update-program-view
Feb 28, 2026
Merged

#4043 - Update Institution Programs List View#5790
tiago-graf merged 26 commits intomainfrom
feature/#4043-update-program-view

Conversation

@tiago-graf
Copy link
Copy Markdown
Collaborator

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

Summary

Updated Institution programs list view to include new status filter, SABC and CIP search.
Moved create program button location.
Added new SABC column.
Allow multiple columns sort

image

@tiago-graf tiago-graf self-assigned this Feb 21, 2026
@tiago-graf tiago-graf requested a review from Copilot February 21, 2026 20:47
@tiago-graf tiago-graf added Web portal Backend Used by the dependabot pull requests to identify PRs related to the backend. labels Feb 21, 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 updates the Institution programs list view to enhance filtering, searching, and sorting capabilities. The changes include a new status filter with toggle buttons (All, Approved, Pending, Declined, Inactive), expanded search to cover program name/SABC code/CIP, a new SABC program code column in the table, and support for multi-column sorting. The create program button has also been relocated from the header to a more prominent position.

Changes:

  • Enhanced the programs list view with status filter toggles and multi-field search (program name, SABC code, CIP)
  • Added SABC program code as a new sortable column in the programs table
  • Changed default sorting from status-based priority to alphabetical by program name, with all columns now sortable
  • Refactored search and filter implementation in both frontend (Vue) and backend (NestJS) to support the new filtering options

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sources/packages/web/src/views/institution/locations/programs/LocationPrograms.vue Updated UI with new status filter buttons, moved search box, added search button, implemented filter watcher logic, and added default sort configuration
sources/packages/web/src/types/contracts/DataTableContract.ts Added SabcCode to ProgramSummaryFields enum, reordered and updated headers with new SABC column, made all columns sortable
sources/packages/web/src/services/http/dto/EducationProgram.dto.ts Added optional sabcCode field to EducationProgramsSummaryAPIOutDTO
sources/packages/backend/apps/api/src/services/education-program/education-program.service.ts Enhanced search to query name/CIP/SABC with OR logic, added status and inactive filtering, changed default sort from status priority to name ascending, added sabcCode to query selection
sources/packages/backend/apps/api/src/services/education-program/education-program.service.models.ts Added optional sabcCode field to EducationProgramsSummary interface
sources/packages/backend/apps/api/src/route-controllers/models/pagination.dto.ts Added cipCode, sabcCode, and totalOfferings to allowed sort fields
sources/packages/backend/apps/api/src/route-controllers/education-program/models/education-program.dto.ts Added optional sabcCode field to EducationProgramsSummaryAPIOutDTO
sources/packages/backend/apps/api/src/route-controllers/education-program/education-program.controller.service.ts Added sabcCode mapping in getProgramsSummary result transformation
sources/packages/backend/apps/api/src/utilities/datatable-database-mapping-utils.ts Added column mappings for cipCode, sabcCode, and totalOfferings to support sorting
sources/packages/backend/apps/api/src/utilities/datatable-config.ts Changed ProgramPaginationOptions to extend PaginationOptions instead of BasePaginationOptions

@tiago-graf tiago-graf marked this pull request as ready for review February 21, 2026 21:25
@dheepak-aot dheepak-aot self-requested a review February 23, 2026 22:37
@dheepak-aot dheepak-aot added the SIMS-Api SIMS-Api label Feb 24, 2026
@dheepak-aot
Copy link
Copy Markdown
Collaborator

Please add some screenshots to PR description as it is a considerable UI update.

Comment on lines +120 to 123
"cipCode",
"sabcCode",
"totalOfferings",
])
Copy link
Copy Markdown
Collaborator

@dheepak-aot dheepak-aot Feb 24, 2026

Choose a reason for hiding this comment

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

From the moment that DTOs are start to deviate, We can have DTO specific to the API and also stop using the same controller service method.

We split the existing methods in education-program.controller.service.ts this way just by centralizing the transformation and allowing to use the new InDTO(LocationProgramsPaginationOptionsAPIInDTO is just a suggested name).

  async getProgramsSummary(
    institutionId: number,
    paginationOptions: ProgramsPaginationOptionsAPIInDTO,
  ): Promise<PaginatedResultsAPIOutDTO<EducationProgramsSummaryAPIOutDTO>> {
    const programs = await this.programService.getProgramsSummary(
      institutionId,
      [OfferingTypes.Public, OfferingTypes.Private],
      paginationOptions,
    );
    return this.mapEductionProgramPaginatedResults(programs);
  }

  async getProgramsSummaryForLocation(
    institutionId: number,
    paginationOptions: LocationProgramsPaginationOptionsAPIInDTO,
    locationId: number,
  ): Promise<PaginatedResultsAPIOutDTO<EducationProgramsSummaryAPIOutDTO>> {
    const programs = await this.programService.getProgramsSummaryForLocation(
      institutionId,
      [OfferingTypes.Public, OfferingTypes.Private],
      paginationOptions,
      locationId,
    );
    return this.mapEductionProgramPaginatedResults(programs);
  }

  private mapEductionProgramPaginatedResults(
    programs: PaginatedResults<EducationProgramsSummary>,
  ): PaginatedResultsAPIOutDTO<EducationProgramsSummaryAPIOutDTO> {
    return {
      results: programs.results.map((program) => ({
        programId: program.programId,
        programName: program.programName,
        cipCode: program.cipCode,
        sabcCode: program.sabcCode,
        credentialType: program.credentialType,
        totalOfferings: program.totalOfferings,
        submittedDate: program.submittedDate,
        locationId: program.locationId,
        locationName: program.locationName,
        programStatus: program.programStatus,
        isActive: program.isActive,
        isExpired: program.isExpired,
        credentialTypeToDisplay: credentialTypeToDisplay(
          program.credentialType,
        ),
      })),
      count: programs.count,
    };
  }

Comment on lines +414 to +419
.orWhere("programs.cipCode Ilike :cipSearch", {
cipSearch: `%${paginationOptions.searchCriteria}%`,
})
.orWhere("programs.sabcCode Ilike :sabcSearch", {
sabcSearch: `%${paginationOptions.searchCriteria}%`,
}),
Copy link
Copy Markdown
Collaborator

@dheepak-aot dheepak-aot Feb 24, 2026

Choose a reason for hiding this comment

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

CIP is all numbers and just like should be good enough.

For the SABC code we had a discussion during the grooming that DB is expected to have the SABC code only upper case. Hence like can be used after paginationOptions.searchCriteria.toUpperCase()

@andrewsignori-aot that was the grooming discussion right?

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.

@dheepak-aot, yes, the uppercase was discussed, and we can have it as uppercase to avoid creating a DB index for case-insensitive search.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 20.33% ( 4502 / 22149 )
Methods: 9.74% ( 262 / 2689 )
Lines: 24.56% ( 3854 / 15692 )
Branches: 10.24% ( 386 / 3768 )

@github-actions
Copy link
Copy Markdown

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 75.53% ( 1062 / 1406 )
Methods: 79.45% ( 116 / 146 )
Lines: 78.88% ( 773 / 980 )
Branches: 61.79% ( 173 / 280 )

@github-actions
Copy link
Copy Markdown

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

E2E SIMS API Coverage Report

Totals Coverage
Statements: 77.26% ( 9344 / 12094 )
Methods: 75.72% ( 1079 / 1425 )
Lines: 81.57% ( 6766 / 8295 )
Branches: 63.14% ( 1499 / 2374 )

Copy link
Copy Markdown
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 👍

@tiago-graf tiago-graf added this pull request to the merge queue Feb 28, 2026
Merged via the queue into main with commit d90380c Feb 28, 2026
22 checks passed
@tiago-graf tiago-graf deleted the feature/#4043-update-program-view branch February 28, 2026 00:10
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 SIMS-Api SIMS-Api Web portal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants