stand2026_10_06
This commit is contained in:
1 parent
41f80ce947
commit
266f8c3b4f
199 files changed
+17061
-87
No files matched your search
@@ -0,0 +1,28 @@
|
||||
"use client";
|
||||
|
||||
import Modal from "@/components/ui/Modal";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
interface Props{
|
||||
test:string
|
||||
}
|
||||
|
||||
export default function AggregateDetails({test}:Props) {
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<Modal goBack={true}>
|
||||
|
||||
|
||||
<h2>Produktdetails</h2>
|
||||
|
||||
<p>Hier stehen die detaillierten Informationen.</p>
|
||||
|
||||
<button onClick={() => router.back()}>
|
||||
Schließen
|
||||
</button>
|
||||
|
||||
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
export default function Default() {
|
||||
return null
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
export default async function DetailsPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ id: string }>;
|
||||
}) {
|
||||
const { id } = await params;
|
||||
|
||||
return (
|
||||
<main>
|
||||
<h1>Details für Produkt {id}</h1>
|
||||
|
||||
<p>
|
||||
Diese Seite wird angezeigt, wenn man direkt
|
||||
/produkte/{id}/details aufruft.
|
||||
</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
export default function Layout({
|
||||
children,
|
||||
modal,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
modal: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
{children}
|
||||
{modal}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
import { Sites } from "@/_config/sites";
|
||||
import { api_ProconAggregate_GetById } from "@/actions/procon/api-procon-aggregate";
|
||||
import Visualisierungen from "@/components/procon/Visualsierungen";
|
||||
|
||||
|
||||
import Link from "next/link";
|
||||
|
||||
type Props = {
|
||||
params: Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
};
|
||||
|
||||
export default async function PageAggregateDetail({ params }: Props) {
|
||||
const { id } = await params;
|
||||
const data = await api_ProconAggregate_GetById(Number(id));
|
||||
|
||||
|
||||
return (
|
||||
<div className=" ">
|
||||
|
||||
{/* Überschrift Leiste */}
|
||||
<div className="p-4 border-1 m-1 flex gap-4 mb-6">
|
||||
<Link href={Sites.main.url}>{Sites.main.name}</Link>
|
||||
<Link href={Sites.procon.aggregate.url}>{Sites.procon.aggregate.name}</Link>
|
||||
</div>
|
||||
|
||||
{/* Aggregat Base Data */}
|
||||
<div>
|
||||
<div className="ps-4 flex gap-4">
|
||||
<div className="font-bold">Anlage :</div>
|
||||
<div>{data.anlage}</div>
|
||||
</div>
|
||||
|
||||
<div className="ps-8 flex gap-4">
|
||||
<div className="font-bold w-30">Agg Nr :</div>
|
||||
<div>{data.aggNr}</div>
|
||||
</div>
|
||||
|
||||
<div className="ps-8 flex gap-4">
|
||||
<div className="font-bold w-30">Bezeichnung :</div>
|
||||
<div>{data.bezeichnung}</div>
|
||||
</div>
|
||||
|
||||
<div className="ps-8 flex gap-4">
|
||||
<div className="font-bold w-30">SPS Name :</div>
|
||||
<div>{data.viewName}</div>
|
||||
</div>
|
||||
|
||||
<div className="ps-8 flex gap-4">
|
||||
<div className="font-bold w-30">BMK :</div>
|
||||
<div>{data.bmk}</div>
|
||||
</div>
|
||||
<div>ss <Link href={`/procon/aggregate/${id}/details`}>Modal</Link></div>
|
||||
|
||||
</div>
|
||||
|
||||
{/* Visualisrung Elemente Anzeigen */}
|
||||
<div className="p-4 m-4 border-1 gap-8 w-400 rounded-lg border-gray-200">
|
||||
{data.visuElements ?
|
||||
<Visualisierungen visuElements={data.visuElements} />:
|
||||
<div>Keine Daten</div>
|
||||
|
||||
}
|
||||
</div>
|
||||
{false &&
|
||||
<div className="flex flex-col m-4 w-300 ">
|
||||
{JSON.stringify(data, null, 2)}
|
||||
{id}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import { Sites } from "@/_config/sites";
|
||||
import { api_ProconAggregate_GetAll } from "@/actions/procon/api-procon-aggregate";
|
||||
|
||||
import Link from "next/link";
|
||||
|
||||
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user