new meal plan widget

This commit is contained in:
vabene1111
2023-02-16 23:38:14 +01:00
parent 0dc6bed7ad
commit 961578385d
3 changed files with 106 additions and 50 deletions

View File

@ -106,6 +106,7 @@ import ShoppingModal from "@/components/Modals/ShoppingModal"
import moment from "moment"
import Vue from "vue"
import {ApiApiFactory} from "@/utils/openapi/api"
import {useMealPlanStore} from "@/stores/MealPlanStore";
Vue.prototype.moment = moment
@ -191,6 +192,7 @@ export default {
apiClient
.createMealPlan(entry)
.then((result) => {
useMealPlanStore().plans.push(result.data)
this.$bvModal.hide(`modal-meal-plan_${this.modal_id}`)
if (reviewshopping) {
this.mealplan = result.data.id