Fix TypeScript errors
- Fix TS2353: Object literal may only specify known properties, and 'paymentMethod' does not exist in type 'Transaction'.
- Fix TS1205: Re-exporting a type when 'isolatedModules' is enabled requires using 'export type'.
- Fix TS2741: Property 'getPaymentMethodStats' is missing in type '{ transactions: Transaction[]; budgetData: BudgetData; categoryBudgets: Record<string, number>; selectedTab: BudgetPeriod; setSelectedTab: React.Dispatch<...>; ... 5 more ...; resetBudgetData: () => void; }' but required in type 'BudgetContextType'.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { PlusIcon } from 'lucide-react';
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle } from './ui/dialog';
|
||||
@@ -7,7 +6,7 @@ import { useBudget } from '@/contexts/BudgetContext';
|
||||
import { supabase } from '@/lib/supabase';
|
||||
import { isSyncEnabled, setLastSyncTime, trySyncAllData } from '@/utils/syncUtils';
|
||||
import ExpenseForm, { ExpenseFormValues } from './expenses/ExpenseForm';
|
||||
import { Transaction } from '@/components/TransactionCard';
|
||||
import { Transaction } from '@/contexts/budget/types';
|
||||
import { normalizeDate } from '@/utils/sync/transaction/dateUtils';
|
||||
import useNotifications from '@/hooks/useNotifications';
|
||||
|
||||
@@ -55,7 +54,7 @@ const AddTransactionButton = () => {
|
||||
date: formattedDate,
|
||||
category: data.category,
|
||||
type: 'expense',
|
||||
paymentMethod: data.paymentMethod // 추가된 필드
|
||||
paymentMethod: data.paymentMethod // 지출 방법 필드 추가
|
||||
};
|
||||
|
||||
console.log('새 지출 추가:', newExpense);
|
||||
|
||||
Reference in New Issue
Block a user