visualisierung
This commit is contained in:
1 parent
734aa81710
commit
6baea55216
47 files changed
+1892
-124
No files matched your search
@@ -1,40 +1,16 @@
|
||||
import { Sites } from "@/_config/sites";
|
||||
import { api_ProconAggregate_GetAll } from "@/actions/procon/api-procon-aggregate";
|
||||
|
||||
import Link from "next/link";
|
||||
|
||||
import Link from 'next/link';
|
||||
import { api_ProconAggregate_GetAll } from '@/actions/procon/api-procon-aggregate';
|
||||
import AggregateTable from '@/components/procon/aggregateTable';
|
||||
|
||||
export default async function PageAggregate() {
|
||||
const aggregate = await api_ProconAggregate_GetAll();
|
||||
return (
|
||||
<div className="">
|
||||
<Link href={Sites.main.url}>{Sites.main.name}</Link>
|
||||
<Link href={Sites.procon.url}>{Sites.procon.name}</Link>
|
||||
<div className="flex flex-col m-4 w-300 ">
|
||||
{aggregate.map((anlage) => (
|
||||
<div key={anlage.Id}
|
||||
className="grid grid-cols-[50px_100px_200px_200px_200px_200px] gap-4 p-2 border-b-1 border-l-1 border-r-1 first:border-t-1">
|
||||
<div>
|
||||
{anlage.Id}
|
||||
</div>
|
||||
<div>
|
||||
{anlage.SPSAntriebId}
|
||||
</div>
|
||||
<div>
|
||||
{anlage.Bezeichnung}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{anlage.BMK}
|
||||
</div>
|
||||
<div>
|
||||
{anlage.ViewName}
|
||||
</div>
|
||||
<div>
|
||||
<Link href={Sites.procon.aggregate.url+"/"+anlage.SPSAntriebId}>Auswahl</Link>
|
||||
</div>
|
||||
</div>))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
try {
|
||||
const rows = await api_ProconAggregate_GetAll();
|
||||
return <div><h2 className="mb-3 text-lg font-semibold">Aggregate</h2>
|
||||
<Link className="mb-3 inline-block text-sm underline" href="/procon/positionen">Positionstabelle öffnen</Link>
|
||||
<AggregateTable rows={rows} /></div>;
|
||||
} catch (error) {
|
||||
return <div><h2 className="mb-3 text-lg font-semibold">Aggregate</h2>
|
||||
<p role="alert" className="mb-3 text-red-600">{error instanceof Error ? error.message : 'Aggregate konnten nicht geladen werden.'}</p>
|
||||
<Link href="/rk2/verbindungen" className="underline">ProCon-Verbindung prüfen</Link></div>;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user