Panly API docsstaging

Screens / All orders

All orders

Open, completed and cancelled orders for one day (PAN-69, handoff §19), opened from the Open orders / All orders segments on Orders. A day row steps back and forward (never past today) and chips filter All, Open, Completed (status=closed) or Cancelled. Pages of 25 load as the list scrolls (cursor); there are no counts. An open order opens in Orders; a completed or cancelled one is shown read-only (the right pane on desktop, its own page at /orders/all/:orderId on a phone). Item names come from the order catalogue Orders already caches. Rows on screen stay when the network drops (offline banner). A cancelled order shows who cancelled it (cancelled_by_name, PAN-82/PAN-84) and the cancel note (PAN-74) in the read-only detail.

App routes
/orders/all /orders/all/:orderId
Access
orders.view
Screen code
lib/screens/orders/order_history_page.dart
lib/screens/orders/order_history_controller.dart
lib/screens/orders/order_history_bindings.dart
lib/screens/orders/widgets/orders_segments.dart
lib/screens/orders/widgets/order_day_row.dart
lib/screens/orders/widgets/order_history_row.dart
lib/screens/orders/widgets/order_status_chip.dart
lib/screens/orders/widgets/final_order_detail.dart
lib/domain/orders/order_close_rules.dart
Source
elmermj/panly-app @ pre-staging-test (72aaffd)

API calls (4)

CallWhy the screen makes itWhere in the app code
GET /v1/orders
List orders
One day's orders: from = to = the day (yyyy-MM-dd), status from the chip (none for All), limit 25, then the cursor for the next page lib/screens/orders/order_history_controller.dart:66
lib/screens/orders/order_history_controller.dart:94
lib/domain/usecases/orders/orders_usecase.dart:24
lib/data/repositories/orders_repository.dart:27
lib/data/datasources/orders_remote.dart:18
GET /v1/orders/{orderId}
Get order with items and balance
Phone detail page opened directly (link or reload) when the order is not among the loaded rows lib/screens/orders/order_history_page.dart:53
lib/screens/orders/order_history_controller.dart:153
lib/domain/usecases/orders/orders_usecase.dart:15
lib/data/repositories/orders_repository.dart:30
lib/data/datasources/orders_remote.dart:34
GET /v1/menus
List menus
Item names for the read-only detail, only when the order catalogue is not cached yet (the same 2-minute cache as Orders; limit=100, all pages) lib/screens/orders/order_history_controller.dart:181
lib/domain/usecases/orders/catalog_usecase.dart:43
lib/domain/usecases/orders/catalog_usecase.dart:67
lib/data/datasources/catalog_remote.dart:16
GET /v1/menu-items
List menu items
Item names for the read-only detail, only when the order catalogue is not cached yet (the same 2-minute cache as Orders; limit=100, all pages) lib/screens/orders/order_history_controller.dart:181
lib/domain/usecases/orders/catalog_usecase.dart:43
lib/domain/usecases/orders/catalog_usecase.dart:67
lib/data/datasources/catalog_remote.dart:25

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.