Panly API docsstaging

Screens / Items (menu catalogue)

Items (menu catalogue)

Paged list of menu items (name order, search, category filter). Each row's stock tag comes from the item's own fields (PAN-58: stock_status, servings_available, recipe_ingredient_count): "Can make @count", "Low", "Can make 0" or "Not tracked", plus "Recipe · @count ingredients" (the desktop pane shows "Recipe (@count ingredients)"). The first page also loads the lookups: categories for the chips and storage for the editor; recipes and ingredients are no longer loaded here. Back on the tab (PAN-59) page 1 and the tags refresh quietly. The desktop pane shows "Cost per item" from the server's recipe_cost (PAN-73); nothing shows when the item has no cost or the key is absent (cashier).

App routes
/items
Access
items.manage
Screen code
lib/screens/items/items_page.dart
lib/screens/items/items_controller.dart
lib/screens/items/widgets/item_stock_tag.dart
lib/screens/items/widgets/item_tracking_label.dart
lib/screens/items/widgets/item_cost_row.dart
Source
elmermj/panly-app @ pre-staging-test (72aaffd)

API calls (3)

CallWhy the screen makes itWhere in the app code
GET /v1/menu-items
List menu items
One page of items (limit, q, menu_id, cursor); each row carries stock_status, servings_available and recipe_ingredient_count for its stock tag lib/screens/items/items_controller.dart:75
lib/data/catalog/catalog_remote.dart:58
GET /v1/menus
List menus
Lookups: every menu (category), all pages, limit 100 lib/screens/items/items_controller.dart:76
lib/data/catalog/catalog_remote.dart:90
GET /v1/me
Get the signed-in account, its role here and the current merchant
Lookups: storage usage for the image cap lib/screens/items/items_controller.dart:76
lib/data/catalog/catalog_remote.dart:90
lib/data/catalog/catalog_remote.dart:102

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.