Fix budget update issue

Addresses an issue where budget updates were not being applied correctly.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-22 11:20:58 +00:00
parent b81187a4d8
commit 0702145431
4 changed files with 11 additions and 7 deletions

View File

@@ -17,10 +17,11 @@ export const useExtendedBudgetUpdate = (
) => {
console.log('확장 예산 업데이트 시작:', type, amount, newCategoryBudgets);
// 카테고리 예산 입력 폼에서 호출된 경우, type이 없으면 monthly로 설정
const budgetType = type || 'monthly';
// 무조건 monthly로 설정 - 이게 핵심 수정 부분
const budgetType = 'monthly';
// 기본 예산 목표 업데이트 - 항상 월간 예산 우선
// 이제 항상 월간 예산으로 업데이트
console.log(`예산 업데이트: 타입을 '${budgetType}'로 강제 변환, 금액=${amount}`);
handleBudgetUpdate(budgetType, amount);
// 카테고리 예산 업데이트 (제공된 경우)