Add trainee flag to inspector profiles — surface on work order and mobile app, auto-exclude from payroll splits

Objective

  • Establish "trainee" as a first-class flag on the inspector profile so the system can recognize and act on trainee status across multiple surfaces.
  • Surface the trainee indicator on the work order and in the inspector mobile app so all staff can immediately see when a job includes a trainee inspector.
  • Automatically exclude inspectors flagged as trainees from payroll pay splits, eliminating the manual process of removing them from each job's payout line after the fact.
  • Lay the groundwork for future features that can leverage the trainee flag (e.g. worklist conditions, action flow triggers, reporting) without retrofitting.

Background

  • When a trainee accompanies a lead inspector on a job, they are currently assigned to the job in Attik just like any other inspector. This causes two problems: their status as a trainee is invisible to anyone viewing the work order or the mobile app, and the payroll system automatically includes them in the pay split for that job.
  • The current workaround is a two-step manual process: (1) toggle payroll off on the trainee's inspector profile so they don't generate their own payroll dropdown entry, then (2) manually X out their payout line for each job in the payroll overview. Neil Chini (Axium/Colorado) described this process during Office Hours on June 23 — with two active trainees, this requires manually removing payout lines across every job they appear on each pay period.
  • Turning payroll off on the inspector profile is a blunt workaround: it prevents the trainee from ever appearing in payroll, but does not mark them as a trainee, does not communicate their status to other staff on the work order, and cannot be used to drive any future logic.
  • Jim Duggan (Sherwood/Connecticut) noted his teams have handled trainee tracking entirely outside Attik via Google Forms, since there's no native way to track it.
  • Ryan confirmed on the call that a dedicated trainee toggle is the right solution and that a flag on the profile — not a repurposed payroll toggle — is the correct implementation path.

Product Decisions

Locked

  1. Trainee is a flag on the inspector profileisTrainee (or equivalent) is added to inspectorSchema.ts as a boolean. It is set in the inspector's profile settings, not per-job.
  2. Trainee badge on the work order — When a flagged trainee is assigned to a job, their inspector row on the work order displays a visible "Trainee" indicator so office staff and dispatchers can see the status at a glance.
  3. Trainee badge in the mobile app — The trainee indicator also appears on the inspection detail screen in the inspector app, so lead inspectors and other field staff are aware of who is shadowing.
  4. Auto-exclude from payroll splits — When payroll is calculated, inspectors with isTrainee: true are automatically excluded from the pay split for any job they are assigned to. No manual removal step required.
  5. Trainee flag is independent of the payroll-off toggle — The existing payroll-enabled toggle on the inspector profile remains separate. The trainee flag drives automatic payroll split exclusion through its own logic path, not by reusing the existing toggle.
  6. Trainee inspectors remain visible on the job — Being flagged as a trainee does not hide the inspector from the work order, the schedule, or any other surface. Visibility is preserved; only the payroll split behavior changes.
  7. Profile settings placement — The isTrainee toggle lives in the inspector profile settings directly above the existing payroll-enabled toggle, consistent with the grouping of inspector-level behavioral flags.
  8. Flag is designed for extensibilityisTrainee should be queryable in worklist conditions and action flow triggers in a future pass. No additional behaviors are in scope for this issue, but the flag should be built with that in mind.

Scope

Backend

  • attik-backend/src/models/inspectorSchema.ts — Add isTrainee: Boolean to the inspector schema. This is the source of truth for the flag.
  • attik-backend/src/util/functions/payroll/dataFunc.ts and payrollContext.ts — The payroll computation pipeline needs to check isTrainee on each inspector and exclude them from pay split calculations when the flag is set.
  • attik-backend/src/util/types/serverTypeCollection/people.ts — Frontend type definition for the inspector/person object; will need isTrainee added to reflect the schema change.

Frontend

  • attik-frontend/src/components/task-check/SingleJobsBar.tsx — The work order inspector display where the trainee badge needs to appear next to the inspector's name when isTrainee is true.
  • Inspector profile settings UI — the isTrainee toggle is placed directly above the payroll-enabled toggle in the inspector edit screen.
  • attik-frontend/src/app/tools/hr/payroll/PayrollOverview.tsx — Display-only; should render correctly once the backend excludes trainees from computed pay splits. No logic change expected here, but worth verifying the exclusion flows through cleanly.

Mobile (attik-mobile)

  • attik-mobile/app/(app)/inspection/[id].tsx — The inspection detail screen where assigned inspectors are listed. Trainee badge should appear alongside a trainee inspector's name, consistent with the work order treatment.

References

  • Office Hours transcript — June 23, 2026 (Neil Chini, Jim Duggan, Ryan Wagner)
  • Related: ATT-1983 (per-inspector commission rate bug — same payroll computation layer)

Please authenticate to join the conversation.

Upvoters
Status

Planned

Board
🏠

Main App

Date

About 5 hours ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.