Module — Training¶
Lets staff raise a Training Request (course, provider, dates, cost, project charge) and routes it through a fixed five-step approval chain, and provides a project-level dashboard of training activity. It is the smallest module — a single controller, a single BAL class and a single entity.
Source: NKO.Main/NKO.Main/Controllers/TrainingController .cs (note the trailing space in the file
name), NKO.Main/NKO.Main/BAL/BTraining.cs,
NKO.Lib/NKO.Shared/ViewModels/Training/TrainingStatus.cs.
Purpose & scope¶
- In scope: the
TrainingRequestrecord, its five-step approval, and the training dashboard. - Out of scope: the training-certificate documents attached to an employee (HR archive) and the budget the request charges against (Grant).
- Database:
NKO_DB(core), contextNKO_DBEntities1.
Key features¶
- Training request capture — title, training date, trainer organisation, description,
transportation + training cost, currency, project, location, planned / unplanned, training-need
category (
TrainingNeedTypes), an "attended a similar course in the last 6 months" flag, and an other-costs detail field. - Fixed linear approval (
TrainingStatus) —Draft (0)→WaitingForManager (1)→WaitingForHR (2)→WaitingForFinance (3)→WaitingForCountryDirector (4)→Accepted (5); plusRefused (6)andCancelled (7). The next approver is resolved byNextUserHelper.GetTrainingNextUser. - Visibility — the global
CommonSharedPermission(SharedPermissions.TrainingRequests = 5)grants all rows; otherwise a user sees their staff's non-draft requests plus any request where they fill a role slot (NextUserId/RefuseId/CreatedBy/ManagerId/HRId/FinanceId/CountryId). - Index filters — year, month, status, project, planned, training-need, user.
- Dashboard — the count of training requests grouped by project (
GetDashboardInfo), aDatagrid, and a JSON endpoint. - Notifications — e-mail + in-app notification on every hop
(
NotificationTypesConstants.TRAININGREQUEST_*). - PDF — request details export via
?pdf=1.
Screens¶
TrainingController — /Training/*, views in NKO.Main/NKO.Main/Views/Training/.
| Feature | Route | HTTP | View | Permission key |
|---|---|---|---|---|
| Training requests list | / |
GET | Index. |
Training |
| Request detail (+ sign strip) | / |
GET | Details. |
Training |
| Edit request | / |
POST | — | Training |
| Workflow transition | / |
POST | — | Training |
| Create request | / |
GET / POST | Create. |
Training |
| Delete request | / |
GET / POST | _Delete |
Training |
| Dashboard (count by project) | / |
GET | Dashboard. |
Training |
| Dashboard data | / |
GET | JSON | Training |
| Data grid | / |
GET | Data. |
Training |
ContextActions dispatches on TrainingUserTypes × TrainingOpTypes →
SetSent / SetManagerAccepted / SetManagerRefused / SetHRAccepted / SetHRRefused /
SetFinanceAccepted / SetFinanceRefused / SetcountryDirectorAccepted /
SetCountryDirectoreRefused.
Business logic¶
| Class | File | Responsibility & notable logic |
|---|---|---|
BTraining |
NKO. (~690 ln) |
Create(Training — new GUID, Status, Req / Manager, Next. Get / Get — the visibility logic above. Edit — only the editable fields (description, location, planned, training-need, 6-months flag, other costs, project, name, costs, trainer org, date, transport cost). Workflow methods — each guards Next + exact Status + prior sign flags, then sets …Sign / …Sign / …Note / …Id, advances Status, resolves Next, notifies + e-mails; refusals set Is, Status and notify the creator plus all prior approvers; Setcountry → Accepted, Next. Get — groups Get by Project, joins Project., returns List<. |
Data¶
TrainingRequest (NKO.Lib/NKO.DataAccess/DbModel/TrainingRequest.cs, extends BaseEntity):
Name, TrainingDate, TrainerOrgName, Description, TransCost, TrainingCost, ProjectId,
Location, Planned, TrainingNeed, IsAttendIn6Months, DetailsOfOtherCosts, Currency; the
Req / Manager / HR / Finance / Country sign blocks (…Id, …Sign, …SignDate, …Note);
RefuseId / IsRefused / RefuseDate / RefuseNote; NextUserId, StatusId. Related enums in
TrainingStatus.cs: TrainingStatus, PlannedTypes (Planned = 0, NotPlanned = 1),
TrainingNeedTypes (PerformanceEvaluation, JobRequirement, TNA, PersonalRequest,
ManagersRequest).
Full column detail: Training database.
Permissions¶
Distinct keys: TrainingIndex, TrainingDetails, TrainingEdit, TrainingCreate,
TrainingDashboard, TrainingData. Workflow area Areas.Training = 7; data scoping
SharedPermissions.TrainingRequests = 5. TrainingUserTypes = Requester / Manager / HR / Finance /
CountryDirector; TrainingOpTypes = Send + each role's Accept / Refuse.
Screenshots¶
Training Requests — /Training (year / month / status / project filters):

Training Dashboard — /Training/Dashboard (request count by project):

Training Request detail — /Training/Details/{guid} (the five-step sign strip; requester name
masked):

Related¶
- Permissions — how the five approvers are resolved.
- Grant module — the project a request is charged against.
- Training API · Training database.