Speichere die Postfachkennung als Text, damit eine uebernommene E-Mail in der Akte ankommt.
Deploy Development / deploy (push) Successful in 26s
Test Suite / pytest-backend (push) Successful in 1m18s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 8s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-17 18:43:51 +02:00
1 parent ad6240a5da
commit 17a3b3a736
4 files changed
+13 -3

No files matched your search

+7 -1
View File
@@ -305,6 +305,7 @@ export function MailPicker({ context, placement, chapterId = "", chapterTitle =
const [selectedKey, setSelectedKey] = useState("");
const [preview, setPreview] = useState(null);
const [previewError, setPreviewError] = useState("");
const [adopting, setAdopting] = useState(false);
const [loading, setLoading] = useState("");
const [error, setError] = useState("");
@@ -433,7 +434,9 @@ export function MailPicker({ context, placement, chapterId = "", chapterTitle =
}
async function link(item) {
if (adopting) return;
setError("");
setAdopting(true);
const letter = preview && preview.uid === item.uid ? preview : null;
const known = letter?.direction || item.direction;
const direction = known === "out" || known === "in" ? known : null;
@@ -479,6 +482,8 @@ export function MailPicker({ context, placement, chapterId = "", chapterTitle =
onDone();
} catch (err) {
setError(err.message);
} finally {
setAdopting(false);
}
}
@@ -547,7 +552,8 @@ export function MailPicker({ context, placement, chapterId = "", chapterTitle =
{preview?.text ? <pre className="mail-letter__body">{preview.text}</pre> : null}
{preview?.text_truncated ? <p className="muted">Der Text ist gekürzt, weil die Nachricht sehr groß ist.</p> : null}
{preview && !preview.text ? <p className="muted">Diese Nachricht hat keinen lesbaren Text.</p> : null}
<button type="button" onClick={() => link(selected)} disabled={!selected.uid}>Übernehmen</button>
<ErrorNote error={error} />
<button type="button" onClick={() => link(selected)} disabled={!selected.uid || adopting}>{adopting ? "Wird übernommen …" : "Übernehmen"}</button>
</>
)}
</aside>