fix blank card error on meal-plan creator

This commit is contained in:
hay-kot 2021-03-03 20:34:57 -09:00
commit aa85c7f655
2 changed files with 5 additions and 4 deletions

View file

@ -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) {

View file

@ -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) {