Dentolize · HR Module Walkthrough
On this pageBusiness viewTechnical view

Talent Hub (ATS, Onboarding, Performance)

Business view

The Talent Hub (HR → Talent) covers the people lifecycle beyond payroll, in five tabs:

  • Recruitment — a lightweight applicant tracking system. Post vacancies

(title, openings, department/position), log applications, and move each candidate through stages: Applied → Screening → Interview → Offer → Hired / Rejected, with a 1–5 rating and notes.

  • Onboarding / Offboarding — build reusable checklist templates, start one

for a specific employee, and tick items off. A checklist auto-completes when every item is done.

  • Training & warnings — record training (with an expiry date and

certificate link) and issue disciplinary warnings (verbal / written / final). The employee acknowledges their own warning.

  • Performance — create reviews (per-criterion ratings, overall rating,

strengths, improvements) and goals (with progress). The employee acknowledges a submitted review — and you cannot review yourself.

  • Benefits & gradesbenefit plans (health/life/transport) with

enrollments (including dependents), and job grades with min/mid/max pay bands.

The consistent thread: managers author, employees acknowledge, and self-serving actions (reviewing or warning yourself) are blocked.

Technical view

Mutations: resolvers/mutations/actions/hr/strategicHrMutations.js (gated MANAGE_HR except the self-service acknowledgements). Reads: resolvers/queries/actions/hr/strategicHrQueries.js (personal-data reads scoped by scopeUser, :14). Web UI under SalaryHub/ behind HrTalent.js:24.

Recruitment / ATS

  • upsertVacancy (:31) / deleteVacancy (:54) — tenant-scopes every

referenced department/position/branch; applications cascade on delete.

  • upsertJobApplication (:61) — rating validated 1–5; a stage change stamps

reviewedById; create requires a tenant-checked vacancy and a candidate name.

  • Reads: vacancies (strategicHrQueries.js:20, exposes applicationsCount),

jobApplications (:30).

  • Models: Vacancy schema.prisma:4356, JobApplication :4383 (enums

VacancyStatus, ApplicationStage).

  • UI: Recruitment.js:25.

Onboarding / Offboarding

  • upsertChecklistTemplate (:94) — items must be a JSON array of non-empty

strings.

  • startEmployeeChecklist (:117) — snapshots template items into per-employee

{title, done, doneAt, doneById} objects.

  • updateEmployeeChecklist (:129) — ticking done stamps doneAt/doneById;

auto-completescompletedAt set only when every item is done (:140).

  • Models: ChecklistTemplate schema.prisma:4409, EmployeeChecklist :4424

(enum ChecklistKind).

  • UI: OnboardingChecklists.js:31.

Training & discipline

  • upsertTrainingRecord (:155) — title required; provider/cert/notes/dates

optional.

  • issueWarning (:183) — cannot warn self: `if (args.user ===

session.user.id) throw hr.cannotWarnSelf (:186); defaults level VERBAL`.

  • acknowledgeWarning (:201) — self-service, ownership-enforced:

warning.userId !== requester → hr.notYourWarning (:204).

  • Models: TrainingRecord schema.prisma:4440 (with expiryDate),

DisciplinaryWarning :4464 (enum WarningLevel).

  • UI: TrainingWarnings.js:89 (plus read-only panels on the profile page).

Performance

  • upsertPerformanceReview (:216) — overall rating 0–5; status coerced to

DRAFT/SUBMITTED; self-review blocked on both paths (:229, :234); create upserts on the unique key companyId_userId_periodYear_cycle.

  • acknowledgeReview (:246) — self-service; must be the employee's own review

(:250) and in SUBMITTED state (:251) → ACKNOWLEDGED.

  • upsertPerformanceGoal (:255) — progress 0–100.
  • Models: PerformanceReview schema.prisma:4488 (enum ReviewStatus),

PerformanceGoal :4514 (enum GoalStatus).

  • UI: Performance.js:80 (+ MyReviewsPanel for self-acknowledge).

Benefits & job grades

  • enrollBenefit (:310) — upserts on unique planId_userId; re-enrolling

clears endDate. endBenefitEnrollment (:329) sets endDate.

  • upsertJobGrade (:336) — validates the band against effective (merged)

values so a partial update can't break min ≤ mid ≤ max (:342); deleteJobGrade (:370) detaches employee records first.

  • Models: BenefitPlan schema.prisma:4532, BenefitEnrollment :4549,

JobGrade :4567.

  • UI: BenefitsGrades.js:33.

Validation (permissions/inputRules.js)

upsertVacancyInput (:3887), upsertJobApplicationInput (:3906, rating 1–5), upsertChecklistTemplateInput (:3938), upsertTrainingRecordInput (:3951), issueWarningInput (:3977), upsertPerformanceReviewInput (:3994, overall 0–5), upsertPerformanceGoalInput (:4020, progress 0–100), upsertBenefitPlanInput (:4039), upsertJobGradeInput (:4094, bands 0–10,000,000).

Note on breadth: the mobile/data layer defines operations for the whole talent surface, but some of it is exercised primarily through the web Talent Hub — the data layer runs slightly ahead of the mobile UI (see Mobile Parity).