Panly API docsstaging

Screens / Order queue (kitchen)

Order queue (kitchen)

Polls the kitchen queue with If-None-Match (304 keeps the last snapshot) and re-polls on FCM nudges. Each line has a Ready tick (kitchen, `orders.prepare`) and, for roles that serve, a Served tick (`orders.serve`); tickets show a progress bar, and owner, manager and cashier get the filter chips All, Ready to serve and Preparing (PAN-87). The queue also sits as a segment of Orders for anyone with `orders.view`. Back on the tab (PAN-59) the data shows at once and refreshes quietly.

App routes
/order-queue
Access
orders.queue
Screen code
lib/screens/order_queue/order_queue_page.dart
lib/screens/order_queue/order_queue_controller.dart
lib/data/queue/polling_kitchen_queue_source.dart
lib/screens/order_queue/widgets/queue_tick_box.dart
lib/screens/order_queue/widgets/queue_filter_chips.dart
lib/screens/order_queue/widgets/ticket_progress.dart
lib/screens/order_queue/ticks_copy.dart
Source
elmermj/panly-app @ pre-staging-test (72aaffd)

API calls (3)

CallWhy the screen makes itWhere in the app code
GET /v1/kitchen/queue
Read-only queue of open order rounds
Poll every page (limit=100); If-None-Match on page 1 lib/screens/order_queue/order_queue_bindings.dart:19
lib/data/queue/polling_kitchen_queue_source.dart:54
lib/data/repositories/queue_repository.dart:58
POST /v1/devices/fcm
Register this device's FCM token for kitchen queue nudges
Register this browser for queue nudges (on open, or the Enable button) lib/screens/order_queue/order_queue_bindings.dart:24
lib/screens/order_queue/order_queue_page.dart:408
lib/data/push/kitchen_live_updates.dart:167
lib/data/push/fcm_device_api.dart:14
PATCH /v1/orders/{orderId}/items/{orderItemId}
Update a placed item, tick it ready / served, or move it to preparing / served / cancelled
Tick a line Ready or Served, or undo it, with {"ready"} or {"served"} (PAN-87). The tick is idempotent
409 item_cancelled, order_not_open, item_already_served, item_not_ready and item_not_confirmed are answered with the app's own words (ticks_copy.dart).
lib/screens/order_queue/order_queue_controller.dart:210
lib/domain/usecases/orders/orders_usecase.dart:60
lib/data/repositories/orders_repository.dart:63
lib/data/datasources/orders_remote.dart:87

Each call links to its operation in the API reference. Code locations are file:line in panly-app at 72aaffd, listed from the screen down to the line that sends the request.