Zeige im Breadcrumb die Aktenstruktur und lass Kapitel samt Inhalt an ihren Ort ziehen.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
cafa4e8b92
commit
7ef73ad500
12 files changed
+627
-93
No files matched your search
@@ -79,6 +79,15 @@ export function MatterList() {
|
||||
);
|
||||
}
|
||||
|
||||
function matterTrail(record, chapter, href) {
|
||||
if (!chapter) return record.trail;
|
||||
const items = (record.trail || []).map((item, index, all) => (
|
||||
index === all.length - 1 ? { ...item, href } : item
|
||||
));
|
||||
items.push({ label: `Kapitel ${chapter.title}`, href: null });
|
||||
return items;
|
||||
}
|
||||
|
||||
function MatterOutline({ record, inherited, chapterId, onChapter }) {
|
||||
const matterQuery = inherited ? `?context_kind=${inherited.kind}&context_id=${inherited.id}` : "";
|
||||
const hasParent = Boolean(record.parent_matter_id && record.parent_title);
|
||||
@@ -214,21 +223,20 @@ export function MatterDetail() {
|
||||
<main className="page">
|
||||
<header className="page-head">
|
||||
<div>
|
||||
<Trail items={record.trail} />
|
||||
<Trail items={matterTrail(record, activeChapter, `/matters/${id}${query}`)} />
|
||||
<Placements items={record.placements} />
|
||||
<p className="eyebrow">{record.kind_label || "Vorgang"} · {record.home_scope_name}</p>
|
||||
<h1>{record.title}</h1>
|
||||
<p className="muted">{record.status === "open" ? "Offen" : "Geschlossen"}</p>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="page-actions">
|
||||
{canEdit ? <button type="button" onClick={() => setModal("add")}>Inhalt hinzufügen</button> : null}
|
||||
<ObjectMenu view={view} onView={setView}>
|
||||
{canEdit ? <button type="button" className="quiet" onClick={() => setModal("submatter")}>Teilvorgang anlegen</button> : null}
|
||||
{canEdit ? <button type="button" className="quiet" onClick={() => setModal("cross")}>Querverweis</button> : null}
|
||||
{canEdit ? <button type="button" className="quiet" onClick={() => setModal("chapter")}>Kapitel hinzufügen</button> : null}
|
||||
{!canEdit ? <p className="muted">In {targetLabel} fehlt das Bearbeitungsrecht.</p> : null}
|
||||
{record.rights.share || record.is_owner ? <button type="button" className="quiet" onClick={() => setModal("share")}>Teilen</button> : null}
|
||||
</ObjectMenu>
|
||||
{!canEdit ? <p className="muted">In {targetLabel} fehlt das Bearbeitungsrecht.</p> : null}
|
||||
</div>
|
||||
</header>
|
||||
<ErrorNote error={error} />
|
||||
@@ -291,7 +299,8 @@ export function MatterDetail() {
|
||||
</Modal>
|
||||
<Modal open={modal === "add"} title={`Hinzufügen in ${targetLabel}`} onClose={() => setModal("")}>
|
||||
<TargetLine label={targetLabel} chapters={record.chapters} chapterId={activeChapter?.id || ""} />
|
||||
<div className="choice">
|
||||
<div className="add-choices">
|
||||
<button type="button" onClick={() => setModal("chapter")}>Kapitel</button>
|
||||
<button type="button" onClick={() => setModal("note")}>Notiz</button>
|
||||
<button type="button" onClick={() => setModal("file")}>Datei</button>
|
||||
<button type="button" onClick={() => setModal("paperless")}>Paperless</button>
|
||||
|
||||
Reference in new issue
Block a user