Add front- end backend for new category-group

This commit is contained in:
2022-09-23 19:12:10 +00:00
parent 99979a35b0
commit 403544e99f
5 changed files with 98 additions and 2 deletions

View File

@@ -24,6 +24,19 @@ export const useCategoryStore = defineStore("category", {
getters: {
},
actions: {
async CreateCategoryGroup(
group: string,
) {
const result = await POST(
"/category-group/new",
JSON.stringify({
budgetId: useBudgetsStore().CurrentBudgetID,
group: group,
})
);
const response = await result.json();
useCategoryStore().AddCategory(response);
},
async CreateCategory(
group: string,
name: string,