Employment, shift templates, rosters, leave and attendance.
employees is the people side of the field solution: who is employed where, when they are rostered, whether they turned up, and when they are away. None of its tables know they are being used in the field.
| Bucket | Tables |
|---|---|
| Employee | employees: once per person, the employer node, type, job title, pay frequency, start and end, payroll number. One live employee record per person; a rehire is a second row. |
| Presence | shift_templates, named windows per store or store group; shifts, person × store × window on a roster, draft until published; attendance, the actual. |
| Leave | leave_types carrying the statutory rules, leave_balances per person and cycle, leave_requests with half-day portions. |
Attendance is produced by check-in against the store's geofence. The device sends its claimed position and accuracy; the server measures the distance, records the claim beside its verdict, and resolves the rostered shift unless the caller declares the visit ad hoc. A rostered check-in that did not match its shift raises a roster deviation as an incident rather than blocking; an ad-hoc check-in is expected to have no shift and raises none. Leave blocks rostering and suppresses no-show deviations.
Anything that judges attendance, decides leave or publishes a roster is a privileged function; the device never writes it. A nightly fleet job accrues leave balances for every tenant with the module.
| Route | Surface |
|---|---|
/employees | Employee records. |
/shifts | The roster: draft and published shifts. |
/attendance | Check-ins and their verdicts. |
/leave-requests | Requests, decisions and balances. |
employees.
employees.read and employees.manage, territory-scoped: a manager sees the people placed beneath them. A field agent's own leave and roster reach them through the mobile app.
The four routes leave the sidebar, the leave accrual job skips the tenant, and check-in has nothing to resolve against. People and organizations stay.