Staff Hub

Staff Roster · Scheduling · Clock · Leave · Reports

Main features

Access routes

EntryURL
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.

API endpoints

Staff Hub loads and saves application data through Timetracker APIs (HR employee/department tables, without requiring an HR subscription for roster-scoped endpoints).

ResourceMethodsPath
EmployeesGET/POST/PUT/DELETE/api/timetracker/roaster-employees/
DepartmentsGET/POST/api/timetracker/roaster-departments/
DashboardGET/api/timetracker/roaster-dashboard/
SchedulesGET/POST/PUT/DELETE/api/timetracker/schedules/
Rota periodsGET/POST/PATCH + publish/api/timetracker/rota-periods/
Clock eventsGET + punch/live/api/timetracker/clock-events/
Leave requestsGET/POST/PATCH/DELETE + approve/api/timetracker/leave-requests/
HolidaysGET/POST/api/timetracker/holidays/
Unavailable datesGET/POST/DELETE/api/timetracker/unavailable-dates/
Workforce profilesGET/POST (upsert)/api/timetracker/wf-profiles/
Workforce settings (geofence zone)GET/POST/PATCH/api/timetracker/wf-settings/
Attendance reportGET/api/timetracker/reports/attendance/

Client

js/staffhub-api.jswindow.RoasterAPI. UI logic lives in js/staffhub-app.js.

Data flow

Auth token
Employees / Depts
Schedules / Rota
Clock punches
Timesheet / Reports
Leave / Holidays
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.

Important rules