Add front- end backend for new category-group

This commit is contained in:
jacob1123 committed 2022-09-23 19:12:10 +00:00
1 parent 99979a35b0
commit 403544e99f
5 files changed
+98 -2

No files matched your search

+13
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,