From b5fd11efaf08ccf75e8f00e809d28c465ebc6bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Falc=C3=B3n?= Date: Sun, 8 Feb 2026 19:08:17 +0100 Subject: [PATCH] Fix existing transactions collapsible in import preview (#102) ## Summary - Fixed undefined `formatDate` reference that crashed the component when existing transactions loaded, preventing the collapsible from ever appearing - Imported `Transaction` type from the correct module (`@/types/transaction` instead of `@/services/transaction-sync`) - Removed unnecessary `parseInt` on the already-numeric `amount` field --- .../transactions/import-step-preview.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/resources/js/components/transactions/import-step-preview.tsx b/resources/js/components/transactions/import-step-preview.tsx index 68fdbf9b..ed8243f0 100644 --- a/resources/js/components/transactions/import-step-preview.tsx +++ b/resources/js/components/transactions/import-step-preview.tsx @@ -18,10 +18,8 @@ import { } from '@/components/ui/table'; import { useEncryptionKey } from '@/contexts/encryption-key-context'; import { useLocale } from '@/hooks/use-locale'; -import { - transactionSyncService, - type Transaction, -} from '@/services/transaction-sync'; +import { transactionSyncService } from '@/services/transaction-sync'; +import { type Transaction } from '@/types/transaction'; import { type ParsedTransaction } from '@/types/import'; import { formatDateMedium } from '@/utils/date'; import { __ } from '@/utils/i18n'; @@ -269,8 +267,9 @@ export function ImportStepPreview({ {existingTransactions.map((tx) => ( - {formatDate( + {formatDateMedium( tx.transaction_date, + locale, )} @@ -287,10 +286,7 @@ export function ImportStepPreview({