visualisierung
This commit is contained in:
1 parent
734aa81710
commit
6baea55216
47 files changed
+1892
-124
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import Link from 'next/link';
|
||||
import { api_groupCompare } from '@/actions/procon/api-group-sync';
|
||||
import AggregateWorkspace from '@/components/procon/aggregateWorkspace';
|
||||
export default async function Page({ params }: { params: Promise<{ id: string }> }) {
|
||||
const { id } = await params;
|
||||
if (!/^\d+$/.test(id) || !Number.isSafeInteger(Number(id))) return <p>Ungültige ID</p>;
|
||||
|
||||
const back = <Link className="text-sm underline" href={`/procon/aggregate/${id}/visualisierungen`}>Zurück zu Visualisierungen</Link>;
|
||||
try {
|
||||
return <div>
|
||||
{back}
|
||||
<AggregateWorkspace
|
||||
aggregateId={Number(id)}
|
||||
initial={await api_groupCompare(Number(id))} />
|
||||
</div>;
|
||||
}
|
||||
catch (error) {
|
||||
return <div>
|
||||
{back}
|
||||
<p role="alert" className="mt-3">{error instanceof Error ? error.message : 'Laden fehlgeschlagen'}
|
||||
</p>
|
||||
<Link className="underline" href="/procon/zuordnung">Zuordnung prüfen</Link>
|
||||
</div>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user