Skip to content

Commit

Permalink
dont hide ingredients in edit when hiding them in view
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 committed Dec 16, 2023
1 parent 05ba11a commit 0a814fa
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions vue/src/apps/RecipeEditView/RecipeEditView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -937,10 +937,7 @@ export default {
// set default visibility style for each component of the step
this.recipe.steps.forEach((s) => {
this.$set(s, "time_visible", s.time !== 0)
// ingredients_visible determines whether or not the ingredients UI is shown in the edit view
// show_ingredients_table determine whether the ingredients table is shown in the read view
// these are seperate as one might want to add ingredients but not want the step-level view
this.$set(s, "ingredients_visible", s.show_ingredients_table && (s.ingredients.length > 0 || this.recipe.steps.length === 1))
this.$set(s, "ingredients_visible", (s.ingredients.length > 0 || this.recipe.steps.length === 1))
this.$set(s, "instruction_visible", s.instruction !== "" || this.recipe.steps.length === 1)
this.$set(s, "step_recipe_visible", s.step_recipe !== null)
this.$set(s, "file_visible", s.file !== null)
Expand Down

0 comments on commit 0a814fa

Please sign in to comment.