Schließe die Connector-Kapselung ab, damit Paperless, IMAP und weitere Quellen über dieselbe Anbindung laufen.
Deploy Development / deploy (push) Successful in 28s
Test Suite / pytest-backend (push) Failing after 2m18s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 10s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-19 15:00:50 +02:00
1 parent 75a3949f7c
commit d6b70d8f92
75 files changed
+9477 -414

No files matched your search

+12 -14
View File
@@ -4,7 +4,8 @@ import { api, markDirty, textToDocument } from "../api.js";
import { SessionContext } from "../session.js";
import { chapterPathLabel, siblingChapterIds, trailWithChapter } from "./chapters.js";
import { Modal } from "./Modal.jsx";
import { MailPicker, PaperlessPicker } from "./Sources.jsx";
import "./Sources.jsx";
import { SourcePicker, moduleFor, sourceModules } from "../sources/registry.jsx";
import { ErrorNote, ShareBox } from "./widgets.jsx";
import { ContentBoard, DateField, DirectionChoice, MarkdownEditor, ObjectMenu, OrderChoice, RecordTree, SurfaceView, TargetLine, Trail, WorkLists, WorkSwitch, saveChapterOrder, writeSelection } from "./content.jsx";
import { ReadingPane } from "./ReadingPane.jsx";
@@ -635,8 +636,9 @@ export function CaseDetail() {
{addChapterId ? <button type="button" onClick={() => openChapter("")}>Kapitel auf oberster Ebene</button> : null}
<button type="button" onClick={() => setModal("note")}>Notiz</button>
<button type="button" onClick={() => setModal("file")}>Datei</button>
<button type="button" onClick={() => setModal("paperless")}>Paperless</button>
<button type="button" onClick={() => setModal("mail")}>E-Mail</button>
{sourceModules().map((module) => (
<button key={module.kind} type="button" onClick={() => setModal(`source:${module.kind}`)}>{module.addLabel || module.title}</button>
))}
</div>
</Modal>
<Modal open={modal === "note"} title="Notiz" onClose={() => setModal("")}>
@@ -645,11 +647,8 @@ export function CaseDetail() {
<Modal open={modal === "file"} title="Datei" onClose={() => setModal("")}>
<FileForm context={context} chapters={record.chapters} initialChapter={addChapterId} targetLabel={targetLabel} onChange={(finished = true) => { load(); if (finished) setModal(""); }} />
</Modal>
<Modal open={modal === "paperless"} title="Aus Paperless" onClose={() => setModal("")}>
<PaperlessPicker context={context} chapterId={addChapterId} chapterTitle={addChapterId ? chapterPathLabel(record.chapters, addChapterId) : ""} targetLabel={targetLabel} onInserted={load} onDone={() => { setModal(""); load(); }} />
</Modal>
<Modal open={modal === "mail"} title="E-Mail verbinden" wide split onClose={() => setModal("")}>
<MailPicker context={context} chapterId={addChapterId} chapterTitle={addChapterId ? chapterPathLabel(record.chapters, addChapterId) : ""} targetLabel={targetLabel} onDone={() => { setModal(""); load(); }} />
<Modal open={modal.startsWith("source:")} title={moduleFor(modal.slice(7))?.title || "Quelle"} wide={Boolean(moduleFor(modal.slice(7))?.wide)} split={Boolean(moduleFor(modal.slice(7))?.wide)} onClose={() => setModal("")}>
<SourcePicker sourceKind={modal.slice(7)} context={context} chapterId={addChapterId} chapterTitle={addChapterId ? chapterPathLabel(record.chapters, addChapterId) : ""} targetLabel={targetLabel} onInserted={load} onDone={() => { setModal(""); load(); }} />
</Modal>
<Modal open={modal === "subcase"} title="Unterakte anlegen" onClose={() => setModal("")}>
<NewSubcase parentId={id} onChange={() => { setModal(""); load(); }} />
@@ -717,8 +716,7 @@ function BindingTiles({ items, onOpen, empty }) {
function sourceKind(element) {
if (element.kind === "note") return "Notiz";
if (element.kind === "file") return "Datei";
if (element.external?.source === "paperless") return "Paperless";
if (element.external?.source === "imap") return "E-Mail";
if (element.external?.source) return moduleFor(element.external.source)?.addLabel || moduleFor(element.external.source)?.title || "Referenz";
return "Referenz";
}
@@ -1157,7 +1155,8 @@ export function FileForm({ context, placement, chapters = [], initialChapter = "
function ExternalForm({ context, placement, chapters = [], initialChapter = "", targetLabel = "", onChange }) {
const [title, setTitle] = useState("");
const [externalId, setExternalId] = useState("");
const [source, setSource] = useState("paperless");
const sourceChoices = [{ kind: "url", title: "Andere Quelle" }, ...sourceModules().filter((item) => item.manual)];
const [source, setSource] = useState(() => sourceChoices.find((item) => item.kind !== "url")?.kind || "url");
const [chapterId, setChapterId] = useState(initialChapter);
const [documentOn, setDocumentOn] = useState("");
const [sentOn, setSentOn] = useState("");
@@ -1197,11 +1196,10 @@ function ExternalForm({ context, placement, chapters = [], initialChapter = "",
return (
<form onSubmit={submit} className="stack compact">
<TargetLine label={targetLabel} chapters={chapters} chapterId={chapterId} />
<h3>Paperless oder andere Referenz</h3>
<h3>Referenz erfassen</h3>
<input value={title} onChange={(event) => setTitle(event.target.value)} placeholder="Anzeigetitel" required />
<select value={source} onChange={(event) => setSource(event.target.value)}>
<option value="paperless">Paperless</option>
<option value="url">Andere Quelle</option>
{sourceChoices.map((item) => <option key={item.kind} value={item.kind}>{item.title || item.addLabel}</option>)}
</select>
<input value={externalId} onChange={(event) => setExternalId(event.target.value)} placeholder="Externe ID" required />
<label>Dokumentdatum <DateField value={documentOn} onChange={setDocumentOn} /></label>