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>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
<script lang="ts" setup>
|
||||
import type { MealsByDate } from "./types";
|
||||
import type { ReadPlanEntry } from "~/lib/api/types/meal-plan";
|
||||
import GroupMealPlanDayContextMenu from "~/components/Domain/Household/GroupMealPlanDayContextMenu.vue";
|
||||
import RecipeCardMobile from "~/components/Domain/Recipe/RecipeCardMobile.vue";
|
||||
import type { RecipeSummary } from "~/lib/api/types/recipe";
|
||||
|
||||
export default defineNuxtComponent({
|
||||
components: {
|
||||
GroupMealPlanDayContextMenu,
|
||||
RecipeCardMobile,
|
||||
},
|
||||
props: {
|
||||
mealplans: {
|
||||
type: Array as () => MealsByDate[],
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
const props = defineProps<{
|
||||
mealplans: MealsByDate[];
|
||||
}>();
|
||||
|
||||
type DaySection = {
|
||||
title: string;
|
||||
meals: ReadPlanEntry[];
|
||||
|
@ -110,10 +102,4 @@ export default defineNuxtComponent({
|
|||
return acc;
|
||||
}, [] as Days[]);
|
||||
});
|
||||
|
||||
return {
|
||||
plan,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue