Staff Roster · Scheduling · Clock · Leave · Reports
/api/timetracker/roaster-dashboard//schedules/; publish via rota periods/roaster-employees/; departments via /roaster-departments/| Entry | URL |
|---|---|
| Standalone app | /Roaster.html?standalone=1 |
| ERP shell | /erp_home.html#roaster |
| Deep link section | #roaster?section=clockin (also roster, leave, reports, …) |
| Landing | /roaster-landing.html |
| This documentation | /docs/staffhub.html |
| Academy article | /docs/index.html#/modules/roaster |
Requires a signed-in ERP user (erpAuthToken). All mutating calls use DRF token auth.
Staff Hub loads and saves application data through Timetracker APIs (HR employee/department tables, without requiring an HR subscription for roster-scoped endpoints).
| Resource | Methods | Path |
|---|---|---|
| Employees | GET/POST/PUT/DELETE | /api/timetracker/roaster-employees/ |
| Departments | GET/POST | /api/timetracker/roaster-departments/ |
| Dashboard | GET | /api/timetracker/roaster-dashboard/ |
| Schedules | GET/POST/PUT/DELETE | /api/timetracker/schedules/ |
| Rota periods | GET/POST/PATCH + publish | /api/timetracker/rota-periods/ |
| Clock events | GET + punch/live | /api/timetracker/clock-events/ |
| Leave requests | GET/POST/PATCH/DELETE + approve | /api/timetracker/leave-requests/ |
| Holidays | GET/POST | /api/timetracker/holidays/ |
| Unavailable dates | GET/POST/DELETE | /api/timetracker/unavailable-dates/ |
| Workforce profiles | GET/POST (upsert) | /api/timetracker/wf-profiles/ |
| Workforce settings (geofence zone) | GET/POST/PATCH | /api/timetracker/wf-settings/ |
| Attendance report | GET | /api/timetracker/reports/attendance/ |
js/staffhub-api.js → window.RoasterAPI. UI logic lives in js/staffhub-app.js.
Browser (Roaster.html)
→ RoasterAPI (Token auth)
→ /api/timetracker/* (Django DRF, user-scoped)
→ hr.Employee / hr.Department
→ timetracker.WorkSchedule / ClockEvent / LeaveRequest / Holiday
→ workforce RotaPeriod / WorkforceMemberProfile / WorkforceSettings
Geofence zone: lat/lng/radius/zone name persist on /api/timetracker/wf-settings/ (tenant workforce settings). Legacy localStorage values are migrated once then cleared.
(user, employee, date) to avoid duplicate roster cells.geofence→gps, both→biometric, standard→none.break_start / break_end; live state comes from event replay.RotaPeriod.status on the API (draft/published)./approve/ updates balances and syncs HR/payroll hooks.