Fix data initialization issues
Addresses problems with budget display and data reset: - Ensures budget data is correctly displayed after initialization. - Fixes issue where daily and weekly budget data were missing. - Corrects data reset to properly clear transaction data.
This commit is contained in:
@@ -28,6 +28,18 @@ export const useExtendedBudgetUpdate = (
|
||||
delete newCategoryBudgets['교통비'];
|
||||
}
|
||||
|
||||
// 식비 값이 있으면 음식으로 통합
|
||||
if (newCategoryBudgets['식비'] && !newCategoryBudgets['음식']) {
|
||||
newCategoryBudgets['음식'] = newCategoryBudgets['식비'];
|
||||
delete newCategoryBudgets['식비'];
|
||||
}
|
||||
|
||||
// 생활비 값이 있으면 쇼핑으로 통합
|
||||
if (newCategoryBudgets['생활비'] && !newCategoryBudgets['쇼핑']) {
|
||||
newCategoryBudgets['쇼핑'] = newCategoryBudgets['생활비'];
|
||||
delete newCategoryBudgets['생활비'];
|
||||
}
|
||||
|
||||
// 카테고리 예산 저장
|
||||
updateCategoryBudgets(newCategoryBudgets);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user