Fix budget input and calculation

The budget input was not being saved correctly, and the daily/weekly calculations were not working as expected. This commit fixes these issues.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-22 07:53:37 +00:00
parent f39733bfcd
commit 55c2ece3ce
3 changed files with 15 additions and 4 deletions

View File

@@ -22,6 +22,12 @@ export const useExtendedBudgetUpdate = (
// 카테고리 예산이 제공된 경우 업데이트
if (newCategoryBudgets) {
try {
// 교통비 값이 있으면 교통으로 통합
if (newCategoryBudgets['교통비'] && !newCategoryBudgets['교통']) {
newCategoryBudgets['교통'] = newCategoryBudgets['교통비'];
delete newCategoryBudgets['교통비'];
}
// 카테고리 예산 저장
updateCategoryBudgets(newCategoryBudgets);