Add payment method selection

Adds a payment method selection (Credit Card, Cash) to the expense form and includes a line separator. Also requests to add a graph showing the proportion of credit card and cash usage in expense analytics, but this part is not implemented in this commit.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-22 07:08:02 +00:00
parent 60ef765380
commit aa8381a823
12 changed files with 489 additions and 23 deletions

View File

@@ -30,6 +30,7 @@ export interface BudgetContextType {
updateTransaction: (updatedTransaction: Transaction) => void;
handleBudgetGoalUpdate: (type: BudgetPeriod, amount: number, newCategoryBudgets?: Record<string, number>) => void;
getCategorySpending: () => CategoryBudget[];
getPaymentMethodStats: () => { method: string; amount: number; percentage: number }[];
}
// Transaction 타입 (기존 TransactionCard에서 가져옴)
@@ -40,6 +41,7 @@ export interface Transaction {
date: string;
category: string;
type: 'income' | 'expense';
paymentMethod?: '신용카드' | '현금'; // 지출 방법 추가
notes?: string;
localTimestamp?: string; // 로컬 수정 타임스탬프 추가
serverTimestamp?: string; // 서버 타임스탬프 추가