tags and new analytics new in budget

This commit is contained in:
xds
2025-02-23 23:44:00 +03:00
parent 85b6d0a796
commit 512e720d19
5 changed files with 59 additions and 76 deletions

View File

@@ -93,10 +93,8 @@ export const updateBudgetCategoryRequest = async (budget_id, category: BudgetCat
}
export const createBudget = async (budget: Budget, createRecurrent: Boolean) => {
const spaceStore = useSpaceStore()
console.log(budget)
let budgetToCreate = JSON.parse(JSON.stringify(budget));
budgetToCreate.dateFrom = format(budget.dateFrom, 'yyyy-MM-dd')
budgetToCreate.dateTo = format(budget.dateTo, 'yyyy-MM-dd')
@@ -104,7 +102,7 @@ export const createBudget = async (budget: Budget, createRecurrent: Boolean) =>
budget: budgetToCreate,
createRecurrent: createRecurrent
}
return await apiClient.post(`/spaces/${spaceStore.space?.id}/budgets`, budgetToCreate)
return await apiClient.post(`/spaces/${spaceStore.space?.id}/budgets`, data)
.then(res => res.data)
.catch(err => {
throw err