tags and new analytics new in budget
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user