Clear persistent budget data
Clear persistent budget data to ensure a clean state.
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
import { BudgetData, BudgetPeriod, CategoryBudget, Transaction } from './types';
|
||||
import { EXPENSE_CATEGORIES } from '@/constants/categoryIcons';
|
||||
|
||||
// 기본 데이터 상수
|
||||
// 기본 데이터 상수 (기본값을 0으로 변경)
|
||||
export const DEFAULT_CATEGORY_BUDGETS: Record<string, number> = {
|
||||
식비: 400000,
|
||||
생활비: 600000,
|
||||
교통비: 200000
|
||||
식비: 0,
|
||||
생활비: 0,
|
||||
교통비: 0
|
||||
};
|
||||
|
||||
export const DEFAULT_MONTHLY_BUDGET = 1200000;
|
||||
export const DEFAULT_MONTHLY_BUDGET = 0;
|
||||
|
||||
// 카테고리별 지출 계산
|
||||
export const calculateCategorySpending = (
|
||||
@@ -126,19 +126,19 @@ export const calculateSpentAmounts = (
|
||||
export const getInitialBudgetData = (): BudgetData => {
|
||||
return {
|
||||
daily: {
|
||||
targetAmount: Math.round(DEFAULT_MONTHLY_BUDGET / 30),
|
||||
targetAmount: 0,
|
||||
spentAmount: 0,
|
||||
remainingAmount: Math.round(DEFAULT_MONTHLY_BUDGET / 30)
|
||||
remainingAmount: 0
|
||||
},
|
||||
weekly: {
|
||||
targetAmount: Math.round(DEFAULT_MONTHLY_BUDGET / 4.3),
|
||||
targetAmount: 0,
|
||||
spentAmount: 0,
|
||||
remainingAmount: Math.round(DEFAULT_MONTHLY_BUDGET / 4.3)
|
||||
remainingAmount: 0
|
||||
},
|
||||
monthly: {
|
||||
targetAmount: DEFAULT_MONTHLY_BUDGET,
|
||||
targetAmount: 0,
|
||||
spentAmount: 0,
|
||||
remainingAmount: DEFAULT_MONTHLY_BUDGET
|
||||
remainingAmount: 0
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user