mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-05 15:33:10 -05:00
feat: Add snack, drink, and dessert (#6149)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> Co-authored-by: Michael Genson <genson.michael@gmail.com>
This commit is contained in:
committed by
GitHub
parent
c115e6d83f
commit
6695314588
@@ -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')"
|
||||
/>
|
||||
</div>
|
||||
</v-col>
|
||||
|
||||
@@ -83,6 +83,9 @@ const plan = computed<Days[]>(() => {
|
||||
{ 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: [] },
|
||||
{ title: i18n.t("meal-plan.drink"), meals: [] },
|
||||
{ title: i18n.t("meal-plan.dessert"), meals: [] },
|
||||
],
|
||||
recipes: [],
|
||||
};
|
||||
@@ -100,6 +103,15 @@ const plan = computed<Days[]>(() => {
|
||||
else if (meal.entryType === "side") {
|
||||
out.sections[3].meals.push(meal);
|
||||
}
|
||||
else if (meal.entryType === "snack") {
|
||||
out.sections[4].meals.push(meal);
|
||||
}
|
||||
else if (meal.entryType === "drink") {
|
||||
out.sections[5].meals.push(meal);
|
||||
}
|
||||
else if (meal.entryType === "dessert") {
|
||||
out.sections[6].meals.push(meal);
|
||||
}
|
||||
|
||||
if (meal.recipe) {
|
||||
out.recipes.push(meal.recipe);
|
||||
|
||||
Reference in New Issue
Block a user