mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 22:43:34 -07:00
convert to script setup
This commit is contained in:
parent
afef06743d
commit
390d91aa83
1 changed files with 51 additions and 65 deletions
|
@ -38,25 +38,17 @@
|
||||||
</v-container>
|
</v-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts" setup>
|
||||||
import type { MealsByDate } from "./types";
|
import type { MealsByDate } from "./types";
|
||||||
import type { ReadPlanEntry } from "~/lib/api/types/meal-plan";
|
import type { ReadPlanEntry } from "~/lib/api/types/meal-plan";
|
||||||
import GroupMealPlanDayContextMenu from "~/components/Domain/Household/GroupMealPlanDayContextMenu.vue";
|
import GroupMealPlanDayContextMenu from "~/components/Domain/Household/GroupMealPlanDayContextMenu.vue";
|
||||||
import RecipeCardMobile from "~/components/Domain/Recipe/RecipeCardMobile.vue";
|
import RecipeCardMobile from "~/components/Domain/Recipe/RecipeCardMobile.vue";
|
||||||
import type { RecipeSummary } from "~/lib/api/types/recipe";
|
import type { RecipeSummary } from "~/lib/api/types/recipe";
|
||||||
|
|
||||||
export default defineNuxtComponent({
|
const props = defineProps<{
|
||||||
components: {
|
mealplans: MealsByDate[];
|
||||||
GroupMealPlanDayContextMenu,
|
}>();
|
||||||
RecipeCardMobile,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
mealplans: {
|
|
||||||
type: Array as () => MealsByDate[],
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
setup(props) {
|
|
||||||
type DaySection = {
|
type DaySection = {
|
||||||
title: string;
|
title: string;
|
||||||
meals: ReadPlanEntry[];
|
meals: ReadPlanEntry[];
|
||||||
|
@ -110,10 +102,4 @@ export default defineNuxtComponent({
|
||||||
return acc;
|
return acc;
|
||||||
}, [] as Days[]);
|
}, [] as Days[]);
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
|
||||||
plan,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue