Halte Kapitel am gewaehlten Vorgang fest und raeume die Arbeitsflaeche, damit Ziel, Auswahl und Rechte nicht an der Akte haengen bleiben.
Deploy Development / deploy (push) Successful in 23s
Test Suite / pytest-backend (push) Successful in 1m1s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 5s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-17 11:33:54 +02:00
1 parent 67d48378c9
commit cafa4e8b92
8 files changed
+523 -132

No files matched your search

+7 -3
View File
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
import { Link } from "react-router-dom";
import { api } from "../api.js";
import { formatDate } from "./content.jsx";
import { TargetLine, formatDate } from "./content.jsx";
import { ErrorNote } from "./widgets.jsx";
export function Sources() {
@@ -134,7 +134,7 @@ function MailForm({ onSaved, onError }) {
);
}
export function PaperlessPicker({ context, placement, onDone }) {
export function PaperlessPicker({ context, placement, chapterId = "", chapterTitle = "", targetLabel = "", onDone }) {
const [query, setQuery] = useState("");
const [items, setItems] = useState([]);
const [error, setError] = useState("");
@@ -161,6 +161,7 @@ export function PaperlessPicker({ context, placement, onDone }) {
external_id: item.id,
context,
...(placement ? { placement } : {}),
...(chapterId ? { chapter_id: chapterId } : {}),
...(item.document_on || item.correspondent || item.open_url
? {
dates: { document_on: item.document_on || null, sent_on: null, received_on: null },
@@ -180,6 +181,7 @@ export function PaperlessPicker({ context, placement, onDone }) {
return (
<div className="stack">
<TargetLine label={targetLabel} chapterId={chapterId} chapterTitle={chapterTitle} />
<form onSubmit={search} className="inline">
<input value={query} onChange={(event) => setQuery(event.target.value)} placeholder="Titel oder Stichwort" />
<button type="submit">Suchen</button>
@@ -195,7 +197,7 @@ export function PaperlessPicker({ context, placement, onDone }) {
);
}
export function MailPicker({ context, placement, onDone }) {
export function MailPicker({ context, placement, chapterId = "", chapterTitle = "", targetLabel = "", onDone }) {
const [accounts, setAccounts] = useState([]);
const [accountId, setAccountId] = useState("");
const [folders, setFolders] = useState([]);
@@ -319,6 +321,7 @@ export function MailPicker({ context, placement, onDone }) {
external_id: item.id,
context,
...(placement ? { placement } : {}),
...(chapterId ? { chapter_id: chapterId } : {}),
...(item.document_on ? { dates: { document_on: item.document_on, sent_on: null, received_on: null } } : {}),
...(item.message_from ? { detail: { message_from: item.message_from } } : {}),
},
@@ -331,6 +334,7 @@ export function MailPicker({ context, placement, onDone }) {
return (
<div className="stack">
<TargetLine label={targetLabel} chapterId={chapterId} chapterTitle={chapterTitle} />
<label>
Konto
<select value={accountId} onChange={(event) => setAccountId(event.target.value)}>