fix: Verwendungszweck steht in der Buchungsliste vorn

Gross stand die Kategorie, klein der Zweck – gesucht wird aber nach dem
Zweck. Jetzt oben "Coop Pratteln", darunter klein "Lebensmittel"; das
Symbol trug die Kategorie ohnehin schon.

Ausserdem war der Knopf zum Entfernen eines rueckgaengig gemachten
Imports ein unbeschriftetes Papierkorb-Symbol und damit unauffindbar.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Guido
2026-08-21 20:28:39 +02:00
co-authored by Claude Opus 5
parent bc5349f193
commit 6322b65306
2 changed files with 9 additions and 6 deletions
+3 -4
View File
@@ -336,17 +336,16 @@ export default function Import() {
render: (b) => <span className="nowrap">{t("import.importedCount", { n: b.imported_count })}</span>, render: (b) => <span className="nowrap">{t("import.importedCount", { n: b.imported_count })}</span>,
}, },
{ {
key: "action", header: "", width: 120, fixed: true, key: "action", header: "", width: 168, fixed: true,
render: (b) => (b.status === "committed" ? ( render: (b) => (b.status === "committed" ? (
<button className="btn sm danger" onClick={() => undo(b)}> <button className="btn sm danger" onClick={() => undo(b)}>
<Icon name="refresh-ccw" size={14} /> {t("import.undo")} <Icon name="refresh-ccw" size={14} /> {t("import.undo")}
</button> </button>
) : ( ) : (
<span className="nowrap"> <span className="nowrap">
<span className="muted small">{t("import.undone")}</span>
<button className="btn sm ghost" title={t("import.removeEntry")} <button className="btn sm ghost" title={t("import.removeEntry")}
style={{ marginLeft: 6 }} onClick={() => entfernen(b)}> onClick={() => entfernen(b)}>
<Icon name="trash" size={14} /> <Icon name="trash" size={14} /> {t("import.removeEntry")}
</button> </button>
</span> </span>
)), )),
+6 -2
View File
@@ -186,12 +186,16 @@ export default function Transactions() {
const to = accountById[tx.to_account_id]?.name || "?"; const to = accountById[tx.to_account_id]?.name || "?";
return { icon: "arrow-left-right", color: "#6b7480", title: `${from} → ${to}`, sub: tx.description || t("transactions.transfer") }; return { icon: "arrow-left-right", color: "#6b7480", title: `${from} → ${to}`, sub: tx.description || t("transactions.transfer") };
} }
// Oben steht, WOFÜR die Zahlung war – danach sucht man in der Liste.
// Die Kategorie ist die Einordnung und steht klein darunter; das Symbol
// trägt sie ohnehin schon.
const cat = tx.category_id ? categoryById[tx.category_id] : null; const cat = tx.category_id ? categoryById[tx.category_id] : null;
const zweck = tx.payee || tx.description;
return { return {
icon: cat?.icon || "more-horizontal", icon: cat?.icon || "more-horizontal",
color: cat?.color || "#6b7480", color: cat?.color || "#6b7480",
title: cat?.name || t("transactions.uncategorized"), title: zweck || cat?.name || t("transactions.uncategorized"),
sub: tx.payee || tx.description || "", sub: zweck ? (cat?.name || t("transactions.uncategorized")) : "",
}; };
} }