diff --git a/src/stores/BudgetStore.ts b/src/stores/BudgetStore.ts new file mode 100644 index 0000000000000000000000000000000000000000..0e6fce496f67816f6697d5cac49cd1b7750ec0a3 --- /dev/null +++ b/src/stores/BudgetStore.ts @@ -0,0 +1,20 @@ +import { defineStore } from 'pinia' + +export const useBudgetStore = defineStore('BudgetStore', { + state: () => ({ + activeBudgetId: 0, + }), + actions: { + setActiveBudgetId(id: number) { + this.activeBudgetId = id + } + }, + getters: { + getActiveBudgetId(): number { + return this.activeBudgetId + } + }, + persist: { + storage: sessionStorage + } +});