Fix budget input and display
- Fix issue where budget input for transportation and other categories were not saved correctly. - Fix issue where total budget amount was calculated incorrectly. - Fix issue where daily and weekly budgets were not displayed correctly.
This commit is contained in:
@@ -26,11 +26,7 @@ export const useExtendedBudgetUpdate = (
|
||||
const totalAmount = Object.values(newCategoryBudgets).reduce((sum, val) => sum + val, 0);
|
||||
console.log('카테고리 총액:', totalAmount);
|
||||
|
||||
// 일/주/월 모든 예산 업데이트를 위해 monthly로 처리
|
||||
// (monthly 타입은 모든 예산을 계산해 줌)
|
||||
const updatedBudgetData = calculateUpdatedBudgetData(budgetData, 'monthly', totalAmount);
|
||||
|
||||
// 각 기간별 예산 업데이트
|
||||
// 예산 데이터 업데이트를 위해 월간 금액으로 처리 (type은 'monthly'로 설정)
|
||||
handleBudgetGoalUpdate('monthly', totalAmount);
|
||||
} else {
|
||||
// 카테고리 예산이 없는 경우, 기존 로직 사용
|
||||
|
||||
Reference in New Issue
Block a user