Audience: New engineers picking up Disciplinary work.


Mental model

policy → violation → trigger → action, with two of the actions reaching into other modules.

The 20-minute tour

  1. DisciplinaryModel.cs — the enums are the domain: ViolationActionParams (the 6 actions), EmployeeViolationSourceParams (Employee/System), the item/trigger statuses.
  2. ViolationPolicy.cs — note HasThreshold + ViolationCount + ViolationActionId.
  3. EmployeeViolation.cs — note Source, Status, and TargetPersonId (victim ≠ offender).
  4. EmployeeViolationTrigger.cs — ViolationActionId + Amount + status.
  5. EmployeeSuspension.cs — the cross-module entity: EmployeeRequestId (→ Requests), RecoveredInPayrollId (→ Payroll).
  6. DisciplinaryService.cs (2,049) — the core; find the threshold→trigger logic and suspension handling.
  7. Frontend: pages/dashboard/tasks/disciplinary/ (admin), pages/approval/{violations,suspensions} (approval), employee-dashboard/disciplinary/ (incl. ChatComponent).

Where things live

You want to change… Go to
Policies / thresholds ViolationPolicy.cs, DisciplinaryService.cs
Violation recording EmployeeViolation.cs, admin/employee controllers
Trigger automation EmployeeViolationTrigger.cs • the threshold logic in DisciplinaryService
Suspensions EmployeeSuspension.cs (mind Requests + Payroll)
Exemptions ViolationPolicyExemption, PayrollExemption, MilestoneEmailExemption
Admin UI web-app/.../dashboard/tasks/disciplinary/*

Things that will trip you up

  1. System-sourced violations are automated — not every violation had a human author. Check Source. (RFD-001)