+
{t("import.title")}
+
+ {/* Schritt 1: Konto + Datei */}
+
+
{t("import.step1")}
+
+
+
+
+ {templates.length > 0 && (
+
+ )}
+
+
+ {/* Schritt 2: Format */}
+
+
{t("import.step2")}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/* Schritt 3: Spaltenzuordnung */}
+ {raw && (
+
+
{t("import.step3")}
+
+
+
+ {colOptions.map((c) => | {c.label} | )}
+
+
+ {raw.rows.map((r, ri) => (
+ {colOptions.map((c) => | {r[c.i] ?? ""} | )}
+ ))}
+
+
+
+
+
+ {[
+ ["date", t("import.colDate"), true],
+ ...(config.amount_mode === "debit_credit"
+ ? [["debit", t("import.colDebit"), true], ["credit", t("import.colCredit"), true]]
+ : [["amount", t("import.colAmount"), true]]),
+ ["payee", t("import.colPayee"), false],
+ ["purpose", t("import.colPurpose"), false],
+ ["counterparty_iban", t("import.colIban"), false],
+ ].map(([field, label]) => (
+
+ ))}
+
+
+
+
+
+ setSaveName(e.target.value)} />
+
+
+
+
+ )}
+
+ {/* Schritt 4: Prüfansicht */}
+ {rows && (
+
+
+
{t("import.step4")}
+
+
+
+
+ )}
+
+ {/* Verlauf */}
+ {batches.length > 0 && (
+
+
{t("import.history")}
+
+
+ {batches.map((b) => (
+
+ | {b.filename || "—"} {accountById[b.account_id]?.name} |
+ {formatDate(b.created_at)} |
+ {t("import.importedCount", { n: b.imported_count })} |
+
+ {b.status === "committed" ? (
+
+ ) : {t("import.undone")}}
+ |
+
+ ))}
+
+
+
+ )}
+
+ );
+}