forked from jappel/leistungsbilanz-ts
New usable editor
This commit is contained in:
parent
d1ce485572
commit
ad498f2bb5
6 changed files with 1001 additions and 1 deletions
|
|
@ -0,0 +1,33 @@
|
|||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { useParams } from "next/navigation";
|
||||
import { CircuitTreeEditor } from "../../../../../../frontend/components/circuit-tree-editor";
|
||||
|
||||
export default function CircuitTreeEditPage() {
|
||||
const params = useParams<{ projectId: string; circuitListId: string }>();
|
||||
|
||||
return (
|
||||
<main className="container py-4">
|
||||
<div className="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h1 className="h4 mb-1">Circuit Tree Editor</h1>
|
||||
<p className="text-secondary mb-0">Basic editing for the circuit-first model.</p>
|
||||
</div>
|
||||
<div className="d-flex gap-2">
|
||||
<Link
|
||||
href={`/projects/${params.projectId}/circuit-lists/${params.circuitListId}/tree`}
|
||||
className="btn btn-outline-secondary btn-sm"
|
||||
>
|
||||
Read-only tree
|
||||
</Link>
|
||||
<Link href={`/projects/${params.projectId}/circuit-lists`} className="btn btn-outline-secondary btn-sm">
|
||||
Legacy editor
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
<CircuitTreeEditor projectId={params.projectId} circuitListId={params.circuitListId} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -18,6 +18,12 @@ export default function CircuitTreePreviewPage() {
|
|||
Read-only preview of section blocks, circuits and device rows.
|
||||
</p>
|
||||
</div>
|
||||
<Link
|
||||
href={`/projects/${projectId}/circuit-lists/${circuitListId}/tree-edit`}
|
||||
className="btn btn-outline-primary btn-sm"
|
||||
>
|
||||
Open editor
|
||||
</Link>
|
||||
<Link
|
||||
href={`/projects/${projectId}/circuit-lists`}
|
||||
className="btn btn-outline-secondary btn-sm"
|
||||
|
|
@ -30,4 +36,3 @@ export default function CircuitTreePreviewPage() {
|
|||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue