Skip to content

GET /tms/transloads/work-assignments

TMS > tms.transload

What it does

/tms/transloads/work-assignments accepts GET and is declared in app/systems/TMS/transload/api_routes.php:489 as a path.

The route handler delegates to tmsTransloadApiWorkAssignmentsList(). That function is the owner of this behaviour; the route entry is only dispatch.

Call chain:

  1. → tmsTransloadApiWorkAssignmentsList() — app/systems/TMS/transload/work_queue_api_helper.php:301
  2. ↳ tmsTransloadApiBreakQueueAssertCanManage() — app/systems/TMS/transload/work_queue_api_helper.php:89
  3. ↳ tmsTransloadApiBreakQueueCanManage() — app/systems/TMS/transload/work_queue_api_helper.php:84

Who calls it

Called from:

  • frontend/pages/system/TMS/transload/inbound-loader.php
  • frontend/pages/system/TMS/transload/inbound-planning.php
  • frontend/pages/system/TMS/transload/loader-assignment-board.php

A caller is the strongest available evidence of the intended use.

Input

No named input key is visible in the handler or its owner function. The endpoint either takes no parameters or reads them through a shared helper in app/shared/api/.

Output

The response is produced by a shared helper, so the key set is not visible at the route. Read the owner function to confirm the shape before writing a client.

SQL executed

SELECT ID, LOADER_NAME, COMMODITY_NAME, JOB_STATUS, JOB_START_TIME, JOB_END_TIME, LAST_SENT_TIME, LOADER_QUEUE_ORDER, FINAL_DRAFT, APPOINTMENT_TIME FROM T_LOADING_PLANNER WHERE CLIENT_ID=? AND SPECIAL_INSTRUCTION='QUEUE_WORK_ASSIGNMENT' AND JOB_STATUS IN ('SCHEDULED','STARTED') AND DELETED_AT IS NULL ORDER BY LOADER_NAME, APPOINTMENT_TIME DESC, ID DESC

Data

Tables reached from the owner function:

  • T_LOADING_PLANNER

Access

  • module-gated on tms.transload, so tenant module access applies

Validation and failure messages

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