mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
fix blank card error on meal-plan creator
This commit is contained in:
parent
752b392c7e
commit
aa85c7f655
2 changed files with 5 additions and 4 deletions
|
@ -65,7 +65,7 @@
|
|||
</v-row>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-text>
|
||||
<v-card-text v-if="startDate">
|
||||
<MealPlanCard v-model="meals" />
|
||||
</v-card-text>
|
||||
<v-row align="center" justify="end">
|
||||
|
@ -133,6 +133,7 @@ export default {
|
|||
|
||||
let dateDif = (endDate - startDate) / (1000 * 3600 * 24) + 1;
|
||||
|
||||
|
||||
if (dateDif < 1) {
|
||||
return null;
|
||||
}
|
||||
|
@ -182,9 +183,9 @@ export default {
|
|||
};
|
||||
await api.mealPlans.create(mealBody);
|
||||
this.$emit("created");
|
||||
this.meals = [];
|
||||
this.startDate = null;
|
||||
this.endDate = null;
|
||||
this.meals = [];
|
||||
},
|
||||
|
||||
getImage(image) {
|
||||
|
|
|
@ -131,8 +131,8 @@ export default {
|
|||
this.editMealPlan = null;
|
||||
this.requestMeals();
|
||||
},
|
||||
deletePlan(id) {
|
||||
api.mealPlans.delete(id);
|
||||
async deletePlan(id) {
|
||||
await api.mealPlans.delete(id);
|
||||
this.requestMeals();
|
||||
},
|
||||
openShoppingList(id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue