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:
@@ -336,17 +336,16 @@ export default function Import() {
|
||||
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" ? (
|
||||
<button className="btn sm danger" onClick={() => undo(b)}>
|
||||
<Icon name="refresh-ccw" size={14} /> {t("import.undo")}
|
||||
</button>
|
||||
) : (
|
||||
<span className="nowrap">
|
||||
<span className="muted small">{t("import.undone")}</span>
|
||||
<button className="btn sm ghost" title={t("import.removeEntry")}
|
||||
style={{ marginLeft: 6 }} onClick={() => entfernen(b)}>
|
||||
<Icon name="trash" size={14} />
|
||||
onClick={() => entfernen(b)}>
|
||||
<Icon name="trash" size={14} /> {t("import.removeEntry")}
|
||||
</button>
|
||||
</span>
|
||||
)),
|
||||
|
||||
@@ -186,12 +186,16 @@ export default function Transactions() {
|
||||
const to = accountById[tx.to_account_id]?.name || "?";
|
||||
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 zweck = tx.payee || tx.description;
|
||||
return {
|
||||
icon: cat?.icon || "more-horizontal",
|
||||
color: cat?.color || "#6b7480",
|
||||
title: cat?.name || t("transactions.uncategorized"),
|
||||
sub: tx.payee || tx.description || "",
|
||||
title: zweck || cat?.name || t("transactions.uncategorized"),
|
||||
sub: zweck ? (cat?.name || t("transactions.uncategorized")) : "",
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user