'use client' import Link from 'next/link' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { Button } from '@/components/ui/button' import { CheckCircle, XCircle, ArrowRight, RotateCcw, ExternalLink, } from 'lucide-react' import type { IngestResult } from '@/lib/transactions/ingest' interface BankFileResultStepProps { result: IngestResult onNewImport: () => void } export default function BankFileResultStep({ result, onNewImport, }: BankFileResultStepProps) { const isSuccess = result.imported > 0 || result.duplicates > 0 return (
{/* Status header */} {isSuccess ? ( <> Import genomförd ) : ( <> Import misslyckades )} {isSuccess ? `${result.imported} transaktioner importerades framgångsrikt.` : `${result.errors} fel uppstod under importen.`} {/* Next steps */} {isSuccess && ( Nästa steg
1

Granska obokförda transaktioner

{result.imported - result.auto_categorized > 0 ? `${result.imported - result.auto_categorized} transaktioner behöver bokföras manuellt.` : 'Alla transaktioner bokfördes automatiskt.'}

2

Bekräfta fakturamatchningar

{result.auto_matched_invoices > 0 ? `${result.auto_matched_invoices} transaktioner matchades mot fakturor. Bekräfta dessa på transaktionssidan.` : 'Inga automatiska fakturamatchningar hittades.'}

3

Importera fler kontoutdrag

Importera löpande kontoutdrag för att hålla bokföringen uppdaterad.

)} {/* Actions */}
{isSuccess && ( )}
) }