Screens / Recipe editor
Recipe editor
Create, edit or delete a recipe and its ingredient lines. /recipes/new needs `items.manage`; /recipes/:id opens with `items.view` and is read-only without `items.manage`. Each line uses the unit and stock_quantity the recipe returns (PAN-56), so there is no request per ingredient; stock below zero shows in red (PAN-62). Lines have a unit selector (PAN-95) limited to the ingredient's family; the line shows the amount as entered (250 g) and the converted amount under it, and `unit` is sent only when it differs from the stock unit. The ingredient picker reads GET /v1/ingredients, which needs `stock.view` (PAN-88). The "shared by N items" note comes from used_by_items.
- App routes
/recipes/new/recipes/:id- Access
- items.manage (new), items.view (open)
- Screen code
lib/screens/recipes/recipe_editor_page.dartlib/screens/recipes/recipe_editor_controller.dartlib/screens/recipes/recipe_editor_lines.dartlib/screens/recipes/widgets/add_ingredient_sheet.dartlib/screens/recipes/widgets/ingredient_picker_controller.dartlib/screens/recipes/widgets/recipe_line_quantity.dartlib/widget/common/line_unit.dartlib/widget/common/unit_picker.dart- Source
- elmermj/panly-app @ pre-staging-test (72aaffd)
API calls (6)
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.