feat(frontend): Abfuellungen und Produkte (Modul 23)

/products, /products/new, /bottling/new, /bottling/:id. Verbindung
von der Honigcharge-Detailseite zur Abfuellung, Nav-Dropdown "Mehr"
fuer alle Rollen mit Produkte/Abfuellungen erweitert.
This commit is contained in:
Nick Szaunig committed 2026-08-22 22:21:22 +02:00
1 parent e82cae257b
commit f4df719df7
11 files changed
+568 -18

No files matched your search

+27 -17
View File
@@ -29,6 +29,11 @@ const PRIMARY_LINKS = [
{ label: "Suche", href: "/search" },
];
const MORE_LINKS = [
{ label: "Produkte", href: "/products" },
{ label: "Abfüllungen", href: "/bottling/new" },
];
const ADMIN_LINKS = [
{ label: "Benutzer", href: "/settings/users" },
{ label: "Audit-Log", href: "/settings/audit-log" },
@@ -73,23 +78,28 @@ export default function AppLayout({ children }: { children: ReactNode }) {
{PRIMARY_LINKS.map((item) => (
<NavLink key={item.href} {...item} pathname={pathname} />
))}
{user.role === "ADMIN" ? (
<DropdownMenu>
<DropdownMenuTrigger
render={<Button variant="ghost" size="sm" className="gap-1 text-muted-foreground" />}
>
<MoreHorizontal className="size-4" />
Mehr
</DropdownMenuTrigger>
<DropdownMenuContent align="start">
{ADMIN_LINKS.map((item) => (
<DropdownMenuItem key={item.href} render={<Link href={item.href} />}>
{item.label}
</DropdownMenuItem>
))}
</DropdownMenuContent>
</DropdownMenu>
) : null}
<DropdownMenu>
<DropdownMenuTrigger
render={<Button variant="ghost" size="sm" className="gap-1 text-muted-foreground" />}
>
<MoreHorizontal className="size-4" />
Mehr
</DropdownMenuTrigger>
<DropdownMenuContent align="start">
{MORE_LINKS.map((item) => (
<DropdownMenuItem key={item.href} render={<Link href={item.href} />}>
{item.label}
</DropdownMenuItem>
))}
{user.role === "ADMIN"
? ADMIN_LINKS.map((item) => (
<DropdownMenuItem key={item.href} render={<Link href={item.href} />}>
{item.label}
</DropdownMenuItem>
))
: null}
</DropdownMenuContent>
</DropdownMenu>
</div>
</nav>
<div className="flex shrink-0 items-center gap-3 text-sm">