chet novoe

This commit is contained in:
Vladimir Voronin
2024-10-29 16:19:06 +03:00
parent a71f34a6ba
commit 6210260150
2 changed files with 23 additions and 23 deletions

View File

@@ -7,19 +7,19 @@ export const getBudgetInfos = async () => {
let response = await apiClient.get('/budgets/');
let budgetInfos = response.data;
budgetInfos.forEach((budgetInfo: Budget) => {
budgetInfo.budget.dateFrom = new Date(budgetInfo.budget.dateFrom);
budgetInfo.budget.dateTo = new Date(budgetInfo.budget.dateTo);
budgetInfo.plannedExpenses.forEach(e => {
e.date = new Date(e.date)
})
budgetInfo.plannedIncomes.forEach(e => {
e.date = new Date(e.date)
})
budgetInfo.transactions.forEach(e => {
e.date = new Date(e.date)
})
budgetInfo.dateFrom = new Date(budgetInfo.dateFrom);
budgetInfo.dateTo = new Date(budgetInfo.dateTo);
// budgetInfo.plannedExpenses.forEach(e => {
// e.date = new Date(e.date)
// })
//
// budgetInfo.plannedIncomes.forEach(e => {
// e.date = new Date(e.date)
// })
//
// budgetInfo.transactions.forEach(e => {
// e.date = new Date(e.date)
// })
})
return budgetInfos
}