POST /tms/staff-time/manager-events¶
What it does¶
/tms/staff-time/manager-events accepts POST and is declared in app/systems/TMS/staff-time/api_routes.php:626 as a path.
The route handler delegates to tmsStaffTimeManagerCreateEvent(). That function is the owner of
this behaviour; the route entry is only dispatch.
Call chain:
- →
tmsStaffTimeManagerCreateEvent()—app/systems/TMS/staff-time/api_routes.php:394 - ↳
staff_time_assert_can_manage()—app/systems/TMS/staff-time/staff_time_helper.php:220 - ↳
staff_time_can_manage()—app/systems/TMS/staff-time/staff_time_helper.php:212
Who calls it¶
Called from:
frontend/pages/system/TMS/transload/loader-analysis.phpfrontend/pages/system/TMS/transload/loader-timeline.php
A caller is the strongest available evidence of the intended use.
Input¶
| Where | Key |
|---|---|
body |
BREAK_OPEN |
body |
CURRENTLY_WORKING |
body |
EVENT_TYPE |
body |
STAFF_USER_ID |
Request bodies must not use TYPE, ACTION or USERNAME as contract fields.
Output¶
| Key |
|---|
CREATED_BY |
EVENT_TIME |
EVENT_TYPE |
NOTE |
SKIP_TRANSITION_VALIDATION |
SOURCE |
STAFF_USER_ID |
WORK_CONTEXT |
Success is { "data": …, "requestId": "…" }.
Failure is { "error": { "code", "message" }, "requestId": "…" }.
Data¶
No table reference is visible in the owner function body.
Access¶
- module-gated on
tms.transload, so tenant module access applies
Validation and failure messages¶
- Only clock and break start events can be adjusted.
- Manager permission is required.
These strings come from the owner function and are the messages a client can receive. They are also the cheapest way to tell a rejected request from a broken one.