POST /yms/yard-truck-drivers/break¶
What it does¶
/yms/yard-truck-drivers/break accepts POST and is declared in app/systems/YMS/yard-move/api_routes.php:383 as a path.
The route handler delegates to ymsYardTruckDriverBreakAction(). That function is the owner of
this behaviour; the route entry is only dispatch.
Call chain:
- →
ymsYardTruckDriverBreakAction()—app/systems/YMS/yard-move/api_routes.php:242 - ↳
ymsYardMoveContext()—app/systems/YMS/yard-move/api_routes.php:10
Who calls it¶
Called from:
public/assets/js/modules/yms/yard-dispatch.js
A caller is the strongest available evidence of the intended use.
Input¶
| Where | Key |
|---|---|
body |
ACTION |
body |
BREAK_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
yms.yard-move, so tenant module access applies
Validation and failure messages¶
- Yard truck driver is required.
- Break type must be 10MIN BREAK or LUNCH BREAK.
- This driver is not on break.
- Clock in this driver before adding a break.
- This driver is already on break.
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.