feat: Vorschlaege buchen und Telefon-Dateien nur ablegen

Zwei Luecken geschlossen:

Mail-Vorschlaege standen als "pending" im Eingang, aber es gab keinen Knopf
zum Buchen – der Weg war hinten offen. Jetzt je Eintrag "Buchen" und ein
"Alle buchen". Unklare bleiben liegen: Bei ihnen fehlt etwas oder die
Erkennung war unsicher, die soll man ansehen statt im Stapel durchzuwinken.

Der Auszug vom Telefon bucht nicht mehr sofort, sondern wird nur abgelegt.
Am Telefon prueft man keine 500 Zeilen; die Datei wartet in der
Import-Ansicht und laeuft dort durch die normale Vorschau mit
Saldo-Abgleich, Zeilenfilter und Duplikatpruefung.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Guido
2026-08-22 21:12:58 +02:00
co-authored by Claude Opus 5
parent 34be575eb3
commit c47525ff7e
12 changed files with 418 additions and 118 deletions
+32
View File
@@ -54,6 +54,25 @@ export default function Eingang() {
}
}
async function buchen(item) {
try {
await api.bookInboxItem(item.id);
laden();
} catch (e) {
toast(e.message, "error");
}
}
async function alleBuchen() {
try {
const r = await api.bookAllInbox();
toast(t("inbox.bookedN", { n: r.gebucht }));
laden();
} catch (e) {
toast(e.message, "error");
}
}
async function verwerfen(item) {
if (!(await confirm({
title: t("inbox.discard"),
@@ -76,6 +95,11 @@ export default function Eingang() {
<div className="page-head">
<h1>{t("inbox.title")}</h1>
<p className="muted">{t("inbox.intro")}</p>
{rows.some((r) => r.status === "pending" && r.account_id) && (
<button className="btn primary" onClick={alleBuchen}>
<Icon name="check" size={15} /> {t("inbox.bookAll")}
</button>
)}
</div>
{rows.length === 0 ? (
@@ -94,6 +118,9 @@ export default function Eingang() {
<div className="named-sub">
{formatDate(item.date)} · {konto?.name || "—"}
{item.source === "shortcut" && ` · ${t("inbox.viaShortcut")}`}
{item.source === "mail" && ` · ${t("inbox.viaMail")}`}
{item.status === "unclear" && ` · ${t("inbox.unclear")}`}
{item.status === "booked" && ` · ${t("inbox.booked")}`}
</div>
</div>
<Money cents={Math.abs(item.amount_cents)} currency={item.currency}
@@ -103,6 +130,11 @@ export default function Eingang() {
value={item.category_id}
onChange={(id) => zuordnen(item, id)}
/>
{item.status !== "booked" && item.account_id && (
<button className="btn sm primary" onClick={() => buchen(item)}>
<Icon name="check" size={14} /> {t("inbox.book")}
</button>
)}
<button className="btn sm ghost" title={t("inbox.discard")}
onClick={() => verwerfen(item)}>
<Icon name="trash" size={15} />