diff --git a/docs/docs/overrides/api.html b/docs/docs/overrides/api.html index 7fab21795..5c6749702 100644 --- a/docs/docs/overrides/api.html +++ b/docs/docs/overrides/api.html @@ -14,7 +14,7 @@
diff --git a/frontend/components/Domain/Household/GroupMealPlanRuleForm.vue b/frontend/components/Domain/Household/GroupMealPlanRuleForm.vue index bd8257fa7..3d8fb76d6 100644 --- a/frontend/components/Domain/Household/GroupMealPlanRuleForm.vue +++ b/frontend/components/Domain/Household/GroupMealPlanRuleForm.vue @@ -58,6 +58,9 @@ const MEAL_TYPE_OPTIONS = [ { title: i18n.t("meal-plan.lunch"), value: "lunch" }, { title: i18n.t("meal-plan.dinner"), value: "dinner" }, { title: i18n.t("meal-plan.side"), value: "side" }, + { title: i18n.t("meal-plan.snack"), value: "snack" }, + { title: i18n.t("meal-plan.drink"), value: "drink" }, + { title: i18n.t("meal-plan.dessert"), value: "dessert" }, { title: i18n.t("meal-plan.type-any"), value: "unset" }, ]; diff --git a/frontend/composables/use-group-mealplan.ts b/frontend/composables/use-group-mealplan.ts index f8dcb402f..95f9d6be0 100644 --- a/frontend/composables/use-group-mealplan.ts +++ b/frontend/composables/use-group-mealplan.ts @@ -15,6 +15,9 @@ export function usePlanTypeOptions() { { text: i18n.t("meal-plan.lunch"), value: "lunch" }, { text: i18n.t("meal-plan.dinner"), value: "dinner" }, { text: i18n.t("meal-plan.side"), value: "side" }, + { text: i18n.t("meal-plan.snack"), value: "snack" }, + { text: i18n.t("meal-plan.drink"), value: "drink" }, + { text: i18n.t("meal-plan.dessert"), value: "dessert" }, ] as PlanOption[]; } diff --git a/frontend/lang/messages/en-US.json b/frontend/lang/messages/en-US.json index 3d507365f..2f5a3453f 100644 --- a/frontend/lang/messages/en-US.json +++ b/frontend/lang/messages/en-US.json @@ -342,6 +342,9 @@ "breakfast": "Breakfast", "lunch": "Lunch", "dinner": "Dinner", + "snack": "Snack", + "drink": "Drink", + "dessert": "Dessert", "type-any": "Any", "day-any": "Any", "editor": "Editor", diff --git a/frontend/lib/api/types/meal-plan.ts b/frontend/lib/api/types/meal-plan.ts index 7cee5eb50..aa4f27115 100644 --- a/frontend/lib/api/types/meal-plan.ts +++ b/frontend/lib/api/types/meal-plan.ts @@ -5,9 +5,9 @@ /* Do not modify it by hand - just update the pydantic models and then re-run the script */ -export type PlanEntryType = "breakfast" | "lunch" | "dinner" | "side"; +export type PlanEntryType = "breakfast" | "lunch" | "dinner" | "side" | "snack" | "drink" | "dessert"; export type PlanRulesDay = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" | "unset"; -export type PlanRulesType = "breakfast" | "lunch" | "dinner" | "side" | "unset"; +export type PlanRulesType = "breakfast" | "lunch" | "dinner" | "side" | "snack" | "drink" | "dessert" | "unset"; export type LogicalOperator = "AND" | "OR"; export type RelationalKeyword = "IS" | "IS NOT" | "IN" | "NOT IN" | "CONTAINS ALL" | "LIKE" | "NOT LIKE"; export type RelationalOperator = "=" | "<>" | ">" | "<" | ">=" | "<="; @@ -53,7 +53,6 @@ export interface QueryFilterJSONPart { attributeName?: string | null; relationalOperator?: RelationalKeyword | RelationalOperator | null; value?: string | string[] | null; - [k: string]: unknown; } export interface PlanRulesSave { day?: PlanRulesDay; @@ -106,14 +105,12 @@ export interface RecipeCategory { groupId?: string | null; name: string; slug: string; - [k: string]: unknown; } export interface RecipeTag { id?: string | null; groupId?: string | null; name: string; slug: string; - [k: string]: unknown; } export interface RecipeTool { id: string; @@ -121,7 +118,6 @@ export interface RecipeTool { name: string; slug: string; householdsWithTool?: string[]; - [k: string]: unknown; } export interface SavePlanEntry { date: string; diff --git a/frontend/pages/household/mealplan/planner/edit.vue b/frontend/pages/household/mealplan/planner/edit.vue index 2a1b6a5e9..c5fd2e71e 100644 --- a/frontend/pages/household/mealplan/planner/edit.vue +++ b/frontend/pages/household/mealplan/planner/edit.vue @@ -178,6 +178,26 @@ text: $t('meal-plan.lunch'), event: 'randomLunch', }, + { + icon: $globals.icons.diceMultiple, + text: $t('meal-plan.side'), + event: 'randomSide', + }, + { + icon: $globals.icons.diceMultiple, + text: $t('meal-plan.snack'), + event: 'randomSnack', + }, + { + icon: $globals.icons.diceMultiple, + text: $t('meal-plan.drink'), + event: 'randomDrink', + }, + { + icon: $globals.icons.diceMultiple, + text: $t('meal-plan.dessert'), + event: 'randomDessert', + }, ], }, { @@ -201,6 +221,9 @@ @random-lunch="randomMeal(plan.date, 'lunch')" @random-dinner="randomMeal(plan.date, 'dinner')" @random-side="randomMeal(plan.date, 'side')" + @random-snack="randomMeal(plan.date, 'snack')" + @random-drink="randomMeal(plan.date, 'drink')" + @random-dessert="randomMeal(plan.date, 'dessert')" /> diff --git a/frontend/pages/household/mealplan/planner/view.vue b/frontend/pages/household/mealplan/planner/view.vue index 13203b7b8..9e4049a55 100644 --- a/frontend/pages/household/mealplan/planner/view.vue +++ b/frontend/pages/household/mealplan/planner/view.vue @@ -83,6 +83,9 @@ const plan = computed