Merge pull request #2539 from srwareham/hide-step-ingredients

Added option: Hide step ingredients
This commit is contained in:
vabene1111
2023-08-24 10:33:57 +02:00
committed by GitHub
32 changed files with 87 additions and 38 deletions

View File

@ -376,7 +376,7 @@ class UserPreferenceSerializer(WritableNestedModelSerializer):
'food_inherit_default', 'default_delay',
'mealplan_autoinclude_related', 'mealplan_autoexclude_onhand', 'shopping_share', 'shopping_recent_days',
'csv_delim', 'csv_prefix',
'filter_to_supermarket', 'shopping_add_onhand', 'left_handed', 'food_children_exist'
'filter_to_supermarket', 'shopping_add_onhand', 'left_handed', 'show_step_ingredients', 'food_children_exist'
)
@ -771,7 +771,8 @@ class StepSerializer(WritableNestedModelSerializer, ExtendedRecipeMixin):
model = Step
fields = (
'id', 'name', 'instruction', 'ingredients', 'ingredients_markdown',
'ingredients_vue', 'time', 'order', 'show_as_header', 'file', 'step_recipe', 'step_recipe_data', 'numrecipe'
'ingredients_vue', 'time', 'order', 'show_as_header', 'file', 'step_recipe',
'step_recipe_data', 'numrecipe', 'show_ingredients_table'
)
@ -1362,7 +1363,7 @@ class StepExportSerializer(WritableNestedModelSerializer):
class Meta:
model = Step
fields = ('name', 'instruction', 'ingredients', 'time', 'order', 'show_as_header')
fields = ('name', 'instruction', 'ingredients', 'time', 'order', 'show_as_header', 'show_ingredients_table')
class RecipeExportSerializer(WritableNestedModelSerializer):