1
0
mirror of https://github.com/TandoorRecipes/recipes.git synced 2026-01-11 09:07:12 -05:00

meal plan in its own component

This commit is contained in:
vabene1111
2024-03-18 16:26:40 +01:00
parent 83e9a2bbfb
commit 4cd1e0a4a5
4 changed files with 145 additions and 49 deletions

View File

@@ -55,13 +55,14 @@ export const useMealPlanStore = defineStore(_STORE_ID, () => {
currently_updating.value = [from_date, to_date] // certainly no perfect check but better than nothing
const api = new ApiApi()
api.apiMealPlanList({fromDate: DateTime.fromJSDate(from_date).toISODate() as string, toDate: DateTime.fromJSDate(to_date).toISODate() as string}).then(r => {
return api.apiMealPlanList({fromDate: DateTime.fromJSDate(from_date).toISODate() as string, toDate: DateTime.fromJSDate(to_date).toISODate() as string}).then(r => {
r.forEach((p) => {
plans.value.set(p.id, p)
})
currently_updating.value = [new Date(0), new Date(0)]
})
}
return new Promise(() => {})
}
function createObject(object: MealPlan) {