refactor: Reanmed templates

- fix: Added browse subcommand for products
This commit is contained in:
Aerex
2019-07-07 13:58:01 -05:00
parent d479b4f621
commit 6af9bef334
21 changed files with 397 additions and 88 deletions

6
templates/recipe/add.yml Normal file
View File

@@ -0,0 +1,6 @@
name:
description: |
base_servings:
desired_servings:
not_check_shoppinglist:

18
templates/recipe/edit.yml Normal file
View File

@@ -0,0 +1,18 @@
name: {{ grocy.fields.name }}
description: |
{{ grocy.fields.description }}
base_servings: {{ grocy.fields.base_servings | default("1") }}
desired_servings: {{ grocy.fields.desired_servings | default("1") }}
not_check_shoppinglist: {{ grocy.fields.not_check_shoppinglist | default("1") }}
products: {% for ingredient in grocy.fields.ingredientsp%}
- id: {{ ingredient.id }}
name: {{ ingredient.name }}
description: {{ ingredient.description | default(null) }}
note: {{ ingredient.note }}
amount: {{ ingredient.amount }}
qu_id: {{ ingredient.qu_id }}
only_check_single_unit_in_stock: {{ ingredient.only_check_single_unit_in_stock }}
ingredient_group: {{ ingredient.ingredient_group | default(null) }}
not_check_stock_fulfillment: {{ ingredient.not_check_stock_fulfillment }}{% endfor %}

20
templates/recipe/view.yml Normal file
View File

@@ -0,0 +1,20 @@
name: {{ grocy.fields.name }}
servings: {{ grocy.fields.base_servings }}
costs: {{ grocy.fields.fulfillment.costs }}
ingredients: {% for ingredient in grocy.fields.ingredients %}
- product_id: {{ ingredient.id }}
name: {{ ingredient.name}}
description: {{ ingredient.description | default(null) }}
note: {{ ingredient.note }}
amount: {{ ingredient.amount }}
qu_id: {{ ingredient.qu_id }}
only_check_single_unit_in_stock: {{ ingredient.only_check_single_unit_in_stock }}
ingredient_group: {{ ingredient.ingredient_group | default(null) }}
not_check_stock_fulfillment: {{ ingredient.not_check_stock_fulfillment }}{% endfor %}
description: |-
{{ grocy.fields.description }}