Oeffne den Leser aus der Anlagenliste und zeige einen Beleg mit seinem Datum, damit der Drop an der Markierung ankommt und kein Nachweis als undatierter Versand erscheint.
Deploy Development / deploy (push) Successful in 26s
Test Suite / pytest-backend (push) Successful in 1m36s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 9s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-18 12:24:14 +02:00
1 parent 7846830765
commit 7e8a3e865e
4 files changed
+74 -29

No files matched your search

+10 -4
View File
@@ -65,10 +65,16 @@ export function receiptRoleLabel(role, fallback = "") {
}
function receiptCaption(proof) {
if (proof.role === "email" && proof.kind === "file") return "Beleg";
if (proof.role === "email" && proof.source !== "imap") return "Beleg";
return receiptRoleLabel(proof.role, proof.role_label);
}
function receiptWhen(item) {
if (item.sent_on) return formatDate(item.sent_on);
const dated = (item.evidence || []).find((proof) => proof.document_on);
return dated ? formatDate(dated.document_on) : "";
}
function isShipment(item) {
const proofs = item.evidence || [];
if (item.channel === "other") return false;
@@ -78,9 +84,9 @@ function isShipment(item) {
function receiptHeading(item) {
const who = item.counterpart ? ` · ${item.counterpart}` : "";
if (!isShipment(item)) return `${item.sent_on ? formatDate(item.sent_on) : "Beleg"}${who}`;
const when = item.undated ? "undatiert" : formatDate(item.sent_on);
return `Versand ${when} · ${item.channel_label}${who}`;
const when = receiptWhen(item);
if (!isShipment(item)) return `${when || "Beleg"}${who}`;
return `Versand ${when || "undatiert"} · ${item.channel_label}${who}`;
}
export function writeAssign(event, payload) {