s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All packages
Business & operations v0.57.40 New

@happyvertical/smrt-human-resources

HR records: who works for an organization, as what, and with what standing. Employment with dated terms, and qualifications with expiry.

Source ↗

What it gives you

HR records: who works for an organization, as what, and with what standing. Employment with dated terms, and qualifications with expiry.

  1. 01One Employment per tenant and profile with a stable id; a rehire adds a term, and history is append-only
  2. 02Dates are calendar dates with no timezone; the package has no clock and never flips a status when a date passes
  3. 03QualificationService.check is the gate before allowing work: not-held, not-yet-issued, expired, suspended, or revoked

Employment

hire, end, rehire, changePosition, changeWorkerType, placeOnLeave, and returnFromLeave are dated changes recorded by EmploymentService. An end may be recorded ahead of the last day; employed-on-a-date is answered from the terms, never from the stored status. A login belongs to one employment at a time.

Qualifications

A Qualification defines a ticket, certification, authorization, training, or restriction. A HeldQualification carries issue and expiry dates; a renewal is a new row pointing at the old one. suspend, reinstate, and revoke take an effectiveOn, and standing is decided from the dated history everywhere.

Boundaries

Pay belongs to payroll, time records to smrt-timesheets, logins and permissions to smrt-users, and identity to smrt-profiles. Every model is tenant-scoped, sensitive, and closed; writes go through the two services, which are constructed from a trusted actor the application has already authorized.