feat: added edit for recipe

This commit is contained in:
Aerex
2019-04-28 16:12:05 -05:00
parent 3a85ad936d
commit 48896dda23
18 changed files with 243 additions and 125 deletions

View File

@@ -1,21 +1,24 @@
name: {{ recipe.name }}
description: >-
{{ recipe.description_txt }}
recipe_id: {{ recipe.id }}
picture_file_name: {% if recipe.picture_file_name is not none %}
{{recipe.picture_file_name}}
name: {{ name }}
description: |
{{ description }}
picture_file_name: {% if picture_file_name is not none %}
{{picture_file_name}}
{% else %}
{% endif %}
base_servings: {{ recipe.base_servings | default("1") }}
desired_servings: {{ recipe.desired_servings | default("1") }}
not_checking_shopping_list: {{ recipe.not_checking_shopping_list | default("1") }}
products: {% for product in recipe.products %}
base_servings: {{ base_servings | default("1") }}
desired_servings: {{ desired_servings | default("1") }}
not_check_shoppinglist: {{ not_check_shoppinglist | default("1") }}
products: {% for product in products %}
- id: {{ product.id }}
amount: {{ product.amount }}
note: {{ product.note }}
qu_id: ''
only_check_single_unit_in_stock: {{ product.only_check_single_unit_in_stock }}
ingredient_group: {{ product.ingredient_group | default(null) }}
not_checking_shopping_list: {{ product.not_checking_shopping_list }}{% endfor %}
name: {{ product.name }}
description: {{ product.description | default(null) }}
note: {{ recipes_pos[loop.index0].note }}
amount: {{ recipes_pos[loop.index0].amount }}
qu_id: {{ recipes_pos[loop.index0].qu_id }}
only_check_single_unit_in_stock: {{ recipes_pos[loop.index0].only_check_single_unit_in_stock }}
ingredient_group: {{ recipes_pos[loop.index0].ingredient_group | default(null) }}
not_check_stock_fulfillment: {{ recipes_pos[loop.index0].not_check_stock_fulfillment }}{% endfor %}