> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Training Library

> Browse and manage the training course catalog — with search, category and status filters, and a tabbed detail view for enrollments.

The Training Library is the main catalog for training courses. It supports search, category/status filtering, pagination, and a creation wizard. It is located at route `/gr/training`.

## Overview

The page is rendered by `TrainingLibrary` and calls `useTrainingCourseList` with deferred search and filter parameters. Pagination is supported (page size: 50). View can be toggled between grid and list. A **Create Course** button opens `TrainingCourseWizardDialog`. No permission gate is declared on this route in `gr.tsx`.

Available categories: `clinical`, `safety`, `compliance`, `professional_development`, `regulatory`, `operations`, `other`.

Available statuses: `active`, `draft`, `archived`.

## Who it's for

Access follows your organization's role and module configuration.

* No special permission is required to view the training catalog.
* Creating courses may require additional permissions; SME should confirm RBAC expectations.

Note: The `/gr/training/new` route does not exist in the shipped application. Course creation is launched from the **Create Course** button on this page.

## Finding a course

1. Go to **Governance & Compliance → Training** at `/gr/training`.
2. Use the search bar to find courses by keyword.
3. Apply Category and Status filters to narrow the list.
4. Toggle between grid and list view as preferred.
5. Select a course card to open the Training Details page.
6. Select **Create Course** to launch the course creation wizard.

| Concept       | Description                                                                       |
| ------------- | --------------------------------------------------------------------------------- |
| Category      | Domain classification of the course content                                       |
| Status        | `active` (visible and enrollable), `draft` (in development), `archived` (retired) |
| Page size     | Fixed at 50 per page; pagination controls navigate between pages                  |
| Wizard dialog | `TrainingCourseWizardDialog` — multi-step course creation flow                    |

## Viewing a course

The Training Details page (`/gr/training/:id`) shows a single training course record with its enrollment history and management actions.

The page is rendered by `TrainingDetail` and loads the course via `useTrainingCourseDetail` and enrollments via `useTrainingEnrollmentList`. Tabs include **Overview** (course metadata) and **Enrollments** (enrollment table). The dynamic breadcrumb is set to the course title. Users with edit access see an **Edit** button (opens `TrainingCourseFormDialog`). An **Enroll** button opens `TrainingEnrollmentDialog`. No permission gate is declared on this route in `gr.tsx`.

Displayed course fields include: title, category badge, status badge, duration (converted from minutes to hours), and description.

Before you start: navigate from the Training Library at `/gr/training`. A training course record must exist for the given ID.

1. Go to **Governance & Compliance → Training** and select a course.
2. Review the **Overview** tab for course details, category, status, and duration.
3. Open the **Enrollments** tab to view enrollment records and completion status.
4. Select **Enroll** to add an enrollment (SME: confirm required permissions).
5. Select **Edit** to update course details (SME: confirm required permissions).

| Concept    | Description                                                                |
| ---------- | -------------------------------------------------------------------------- |
| Duration   | Stored in `duration_minutes`; displayed as rounded hours                   |
| Category   | Classification of the training domain (clinical, safety, compliance, etc.) |
| Enrollment | A link between an employee and a course, tracking completion               |
| Status     | `active`, `draft`, `archived` — determines visibility in catalogs          |

## Related

<Columns cols={2}>
  <Card title="Governance & Compliance" icon="scale-balanced" href="/gr/overview">
    Governance & Compliance core overview.
  </Card>

  <Card title="Governance & parity" icon="clipboard-check" href="/governance/index" />
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/gr.tsx
  * src/cores/gr/pages/TrainingLibrary.tsx
  * src/cores/gr/pages/TrainingDetail.tsx
  * src/cores/gr/hooks/useTrainingCourseList.ts
  * src/cores/gr/hooks/useTrainingEnrollmentList.ts
  * src/cores/gr/wizards/training-course/TrainingCourseWizardDialog.tsx
</Accordion>
