From 635f4de402b488164888d52f5e92e42e62f80978 Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Wed, 23 Feb 2022 23:03:31 +0000 Subject: [PATCH] Fix initialize of Budgets after login --- web/src/stores/session.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/stores/session.ts b/web/src/stores/session.ts index 49a2807..cf61e2f 100644 --- a/web/src/stores/session.ts +++ b/web/src/stores/session.ts @@ -36,8 +36,10 @@ export const useSessionStore = defineStore('session', { this.Session = { User: x.User, Token: x.Token, - }, - this.Budgets = x.Budgets; + } + for (const budget of x.Budgets) { + this.Budgets.set(budget.ID, budget); + } }, async login(login: any) { const response = await POST("/user/login", JSON.stringify(login));