Module — HR¶
The system of record for every employee: personal / identity / family data, employment contracts that place a person in the org hierarchy and on a salary scale, e-signatures, and a document archive — plus the two operational sub-systems that feed Payroll: attendance (check-in/out, delay tracking, monthly summaries) and leave (entitlement calculation, balances, and a Manager → HR → GM approval workflow).
Source: NKO.Main/NKO.Main/Controllers/{HumanResource,Attendances,Document}Controller.cs,
NKO.Main/NKO.Main/BAL/{BHumanResource,BLeave}.cs,
NKO.Lib/NKO.Shared/BAL/AttenadancesHandler.cs, NKO.Lib/NKO.Shared/BAL/BArchiveFile.cs.
Purpose & scope¶
- In scope: employee master data, ID documents, family / conflict-of-interest register, contracts and the compensation records HR maintains for Payroll, e-signatures, the per-employee document archive, the attendance calendar and monthly roll-up, and leave entitlement / balances / requests.
- Out of scope: the pay run itself (Payroll), performance appraisal
(Recruitment — the
Evaluation*area), and group / permission administration (Administration). - Database:
NKO_DB(core), contextNKO_DBEntities1.
Key features¶
- Employee master data — bilingual (EN/AR) names, contact, address, nationality, emergency
contacts, bank / IBAN (
AppUser+AppUserExtend); branch / sub-branch; draft vs. approved status; non-blocking conflict warnings for a duplicate ID number, e-mail or phone. - Identity documents — passport, Turkish ID, Syrian ID, residency permit, temp-protection ID,
work permit (
AppUserAttachment, typed byAppUserAttachmentType); cross-employee duplicate detection. - Family & conflict-of-interest register — dependants (
AppUserFamily) and relatives already employed by NKO (AppUserRelative). - Contracts — position, department, level/step salary scale, project, direct vs. core, trial period, auto vs. manual leave accrual, contract dates; renew / refresh; PDF export.
- Compensation records (maintained by HR, consumed by Payroll) — salary, allowances, deductions, charges, rewards, insurance, ex-gratia allowances.
- E-signatures — the employee uploads, HR approves / rejects; an approved signature is a
precondition for signing leave and procurement documents (
BSign.HasSign). - Document archive — arbitrary typed file attachments per employee / contract / charge / leave.
- Attendance — yearly grid, self check-in / out with an IP allow-list, a monthly delay table with PDF, a "missing attendance" list, and a reset check.
- Leave — 16 leave types with per-type entitlement rules, seniority-based accrual, hourly & half-day handling, holiday/weekend-aware day counting, opening-balance adjustments, interference checks, a FullCalendar feed, and an e-signed multi-step approval (HR-only cancellation).
- Employee reporting — a wide multi-facet filter/report over all HR data, Excel exports, the employee card.
- Bulk import — employee / leave / loan data import.
Screens¶
Route = /{Controller}/{Action}; primary screens only (each has add / edit / delete partials under
the same key). Full list in the HR API reference.
HumanResourceController — /HumanResource/*¶
| Feature | Route | View | Permission key |
|---|---|---|---|
| Employee list | / |
Human |
Human |
| Draft employees | / |
Draft |
Human |
| Create employee (+ disabled login) | / |
_Create. |
Human |
| Create from a hired applicant | / |
(redirect) | Human |
| Edit personal / employment data | /, / |
Edit., Edit |
Human |
| Employee hub / details / card | /, / |
Details., Employee |
Human, Human |
| ID documents | / |
Id |
Human |
| Family & conflict register | /, / |
Family, Conflict. |
Human, Human |
| Contract (position/dept/manager/scale) | /, /, / |
Contract. |
Human |
| Contract PDF | / |
(Rotativa PDF) | Human |
| Salary / allowances / deductions / rewards / insurance / charges | /, /, / + Manage* |
_Manage*. |
Human, Human, Human |
| E-signatures | /, /, /, / |
Signatures. |
Human, Human |
| Attachments & notes | /, /, / |
Attachments., Notes. |
Human, Human, Human |
| Per-employee leaves | / |
Leaves. |
Human |
| Per-employee overtime view | / |
Overtime. |
Human |
| HR report | / |
Report. |
Human |
| Export users | / |
(Excel) | Human |
| Sub-data / bulk import | /, / |
Update, Import |
Payroll (payroll key on an HR screen) |
AttendancesController — /Attendances/*¶
| Feature | Route | Permission key |
|---|---|---|
| Yearly attendance grid | / |
Attendances |
| Monthly delay / lateness (+ PDF) | / |
Attendances |
| Missing-attendance list | / |
Attendances |
| Reset check | / |
Reset |
| Export attendance | /, / |
Human |
DocumentController (/Document/ExportationRotativeHeader, .../Footer, [AllowAnonymous]) is a
shared Rotativa PDF header/footer provider with no HR logic.
Business logic¶
| Class | File | Responsibility & notable logic |
|---|---|---|
BHuman |
NKO. (~120 ln) |
Non-blocking conflict detection. Check scans all other employees for a matching Id on the same attachment type; Check does the same for Private / Mobile. Warnings only. |
BLeave |
NKO. (~2700 ln) |
The leave engine. Get — seniority accrual at 1. days/month with brackets at 5 and 15 years of service and an age-50 bump; direct (fixed-term) contracts get 0 during trial / the first 6 contract-months then contract days; core contracts get 0 in the first 2 employment-months then Apply; sick accrual is by level (0. / L1 1. / L2 1.); overtime-allowance leave = accepted HR-signed overtime hours (within 30 days) ÷ 8; manual Leave rows are added; Auto ⇒ use contract. verbatim. Get — a per-type rule engine covering all 16 Leave (Annual, UrgentSick, Marriage core 7/direct 3, Paternity 5/direct 1 male-only, Maternity Syria 30/Turkey 112/twin 126 female + 6-month gate, Nursing 1. core female, Idda 7, Bereavement 3/1, ReligiousDuties 15 once + 12-month gate, Study 1./month only if no annual/sick balance + attachment, Sick unlimited + medical report, UnpaidExceptional only if no annual/sick balance, …); sets Allowed, Unlimited, Attachment, Message[]. Get — day count as hours/, skipping public holidays & weekends, half-holidays / half-weekends counted as 4h. Workflow methods (Set, Set, Set, Set, Set*Refused, Set) — see Leave Management. |
Attenadances |
NKO. (~1650 ln; contract IAttendances) |
All attendance computation. Get / Get — per-day reconciliation of Attendance rows against the branch Calendar + Calender + Special and approved leaves (WorkDay / Weekend / PublicHoliday / PartialHoliday / Leave / PartialLeave / Absent / BeforeHiring). Delay — per-day lateness vs. the profile start / lunch. Get — the payroll-facing roll-up: Paid Days = 30 − unpaid − before, Attendance Days = full, annual / administrative leave, weekend, public holiday. Update, Get (validates the IP allow-list and an approved e-signature), Get. |
BArchive |
NKO. |
Generic (Area file store used for employee / contract / charge attachments (S3), also by leave and every other module. Create, Edit(has, Get, Get. |
Data¶
- Employee:
AppUser,AppUserExtend,AppUserAttachment,AppUserIdentity,AppUserFamily,AppUserRelative,AppUserPosition,AppUserSign,AppUserInsurance,Bank(reference). - Contract & compensation (maintained here):
AppUserContract; consumed by Payroll —AppUserSalary,AppUserAllowance,AppUserDeduction,AppUserCharge,AppUserReward. - Attendance:
Attendance,CalendarProfile,CalenderConfiguration,CalendayDays,SpecialHoliday. - Leave:
Leave,LeaveBalance,LeaveType. - Misc:
Comment,Note,Reference,ArchiveFile,ArchiveFileType.
Full column detail: HR database.
Permissions¶
Distinct keys: HumanResourceIndex, HumanResourceDraftEmployees, HumanResourceReport,
HumanResourceLeaves, HumanResourceExportUsers, HumanResourceDashboard, HumanResourceCreate,
HumanResourceViewUser, HumanResourceEdit, HumanResourceEmployeeCard, HumanResourceDetails,
HumanResourceContract, HumanResourceContractDetails, HumanResourceAddNote,
HumanResourceNotes, HumanResourceFamilyManagement, HumanResourceConflict,
HumanResourceConflictManagement, HumanResourceSalary, HumanResourceOvertime,
HumanResourceAttachments, HumanResourceDeleteAttachment, HumanResourceManageAttachment,
HumanResourceUploadFiles, HumanResourcePosition, HumanResourceManagePosition,
HumanResourceManageData, HumanResourceManageSign, HumanResourceSignatures;
AttendancesIndex, AttendancesDelay, AttendancesMissings, ResetCheck; and PayrollTransferData
on the two import screens. Data scoping: SharedPermissions.{Users = 1, Leave = 2, Attendance = 14}
via BUser.GetPermission (All / Location / Custom / Default).
Screenshots¶
Employee record & disabled login — /HumanResource/Create:

Draft-employee queue — /HumanResource/DraftEmployees:

Contract — /HumanResource/Contract/{guid} (salary masked):

Leave — list, request form, and the Manager → HR approval chain (/Timesheet/*):

Approved-employee master grid — /HumanResource (names / e-mail / ID masked):

Per-employee record — /HumanResource/EmployeeCard/{guid} (personal data masked):

Related¶
- HR Onboarding · Leave Management — the workflows.
- Payroll module — consumes the contracts, compensation records and the attendance monthly summary.
- Administration module — positions, departments, calendars and levels are configured there.
- HR API · HR database.