playing with meal plan edit dialog

This commit is contained in:
vabene1111
2024-03-28 16:44:20 +01:00
parent 497a4bbeb9
commit c1d6e98349
4 changed files with 76 additions and 34 deletions

View File

@@ -1,30 +1,6 @@
<template>
<v-container>
<v-row>
<v-col>
<v-card>
<v-card-text>
multiple food
<model-select model="Food" allow-create clearable></model-select>
single food
<model-select model="Food" :multiple="false" allow-create clearable></model-select>
multiple keyowrd
<model-select model="Keyword" allow-create clearable></model-select>
<v-autocomplete></v-autocomplete>
</v-card-text>
</v-card>
</v-col>
</v-row>
<v-row>
<v-col >
<recipe-card :recipe="recipe" ></recipe-card>
</v-col>
<v-col>
<recipe-card :recipe="recipe_not_loaded" :loading="true"></recipe-card>
</v-col>
</v-row>
</v-container>
@@ -42,17 +18,11 @@ export default defineComponent({
components: {ModelSelect, RecipeCard},
data() {
return {
recipe: {} as RecipeOverview,
recipe_not_loaded: {} as RecipeOverview,
}
},
mounted() {
const api = new ApiApi()
api.apiRecipeList({pageSize: 1}).then(r => {
if(r.results){
this.recipe = r.results[0]
}
})
},
})

View File

@@ -25,11 +25,12 @@ import HorizontalRecipeScroller from "@/components/display/HorizontalRecipeWindo
import {DateTime} from "luxon";
import {useMealPlanStore} from "@/stores/MealPlanStore";
import HorizontalMealPlanWindow from "@/components/display/HorizontalMealPlanWindow.vue";
import MealPlanDialog from "@/components/dialogs/MealPlanDialog.vue";
export default defineComponent({
name: "RecipeSearchPage",
components: {HorizontalMealPlanWindow, HorizontalRecipeScroller, RecipeCard, GlobalSearchDialog, RecipeCardComponent, KeywordsComponent},
components: {MealPlanDialog, HorizontalMealPlanWindow, HorizontalRecipeScroller, RecipeCard, GlobalSearchDialog, RecipeCardComponent, KeywordsComponent},
computed: {
meal_plan_grid: function () {