mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
feat: add plan entry type of snack
This commit is contained in:
parent
969a3c9005
commit
27cd066a03
6 changed files with 9 additions and 1 deletions
|
@ -73,6 +73,7 @@ export default defineNuxtComponent({
|
|||
{ 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.type-any"), value: "unset" },
|
||||
];
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ 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" },
|
||||
] as PlanOption[];
|
||||
}
|
||||
|
||||
|
|
|
@ -334,6 +334,7 @@
|
|||
"quick-week": "Quick Week",
|
||||
"side": "Side",
|
||||
"sides": "Sides",
|
||||
"snack": "Snack",
|
||||
"start-date": "Start Date",
|
||||
"rule-day": "Rule Day",
|
||||
"meal-type": "Meal Type",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import type { HouseholdSummary } from "./household";
|
||||
|
||||
export type PlanEntryType = "breakfast" | "lunch" | "dinner" | "side";
|
||||
export type PlanEntryType = "breakfast" | "lunch" | "dinner" | "side" | "snack";
|
||||
export type PlanRulesDay = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" | "unset";
|
||||
export type PlanRulesType = "breakfast" | "lunch" | "dinner" | "side" | "unset";
|
||||
export type LogicalOperator = "AND" | "OR";
|
||||
|
|
|
@ -79,6 +79,7 @@ export default defineNuxtComponent({
|
|||
{ title: i18n.t("meal-plan.lunch"), meals: [] },
|
||||
{ title: i18n.t("meal-plan.dinner"), meals: [] },
|
||||
{ title: i18n.t("meal-plan.side"), meals: [] },
|
||||
{ title: i18n.t("meal-plan.snack"), meals: [] },
|
||||
],
|
||||
recipes: [],
|
||||
};
|
||||
|
@ -96,6 +97,9 @@ export default defineNuxtComponent({
|
|||
else if (meal.entryType === "side") {
|
||||
out.sections[3].meals.push(meal);
|
||||
}
|
||||
else if (meal.entryType === "snack") {
|
||||
out.sections[4].meals.push(meal);
|
||||
}
|
||||
|
||||
if (meal.recipe) {
|
||||
out.recipes.push(meal.recipe);
|
||||
|
|
|
@ -21,6 +21,7 @@ class PlanEntryType(str, Enum):
|
|||
lunch = "lunch"
|
||||
dinner = "dinner"
|
||||
side = "side"
|
||||
snack = "snack"
|
||||
|
||||
|
||||
class CreateRandomEntry(MealieModel):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue