This commit is contained in:
vabene1111
2024-02-24 12:44:33 +01:00
parent f58d9e49d8
commit e689cef201
4 changed files with 66 additions and 22 deletions

View File

@@ -56,12 +56,15 @@
</v-card-text>
</v-card>
<v-card class="mt-1" >
<v-card-title>Steps Overview</v-card-title>
<v-card class="mt-1">
<StepsOverview :steps="recipe.steps"></StepsOverview>
</v-card>
<v-card class="mt-1" v-for="s in recipe.steps" :key="s.id">
<Step :step="s"></Step>
</v-card>
</template>
<script lang="ts">
@@ -72,21 +75,13 @@ import KeywordsBar from "@/components/display/KeywordsBar.vue"
import NumberScalerDialog from "@/components/inputs/NumberScalerDialog.vue"
import IngredientsTable from "@/components/display/IngredientsTable.vue";
import StepsOverview from "@/components/display/StepsOverview.vue";
import Step from "@/components/display/Step.vue";
export default defineComponent({
name: "RecipeView",
components: {StepsOverview, IngredientsTable, NumberScalerDialog, KeywordsBar},
components: {Step, StepsOverview, IngredientsTable, NumberScalerDialog, KeywordsBar},
computed: {
allIngredients: function () {
let ingredients = [] as Ingredient[]
if(this.recipe.steps !== undefined){
this.recipe.steps.forEach((s) => {
ingredients = ingredients.concat(s.ingredients)
})
}
return ingredients
}
},
props: {
recipe: {