From a82e31d75e6dcf209f52ed9374f24ad4b3ba917c Mon Sep 17 00:00:00 2001 From: Jonny Date: Wed, 8 Jul 2026 08:21:13 +0200 Subject: [PATCH] feat: wire Kanban board into the dashboard page --- web/app/dashboard/page.tsx | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/web/app/dashboard/page.tsx b/web/app/dashboard/page.tsx index b9338c0..1c8805a 100644 --- a/web/app/dashboard/page.tsx +++ b/web/app/dashboard/page.tsx @@ -1,21 +1,23 @@ import { loadProfile } from "@/lib/auth/profile"; -import { Card } from "@/components/ui/Card"; +import { listAuftraegeFuerKanban, listFahrerNutzer } from "@/lib/dashboard/queries"; +import { KanbanBoard } from "@/components/dashboard/KanbanBoard"; export default async function DashboardPage() { - const result = await loadProfile(); - - if (result.status !== "ok") { + const profileResult = await loadProfile(); + if (profileResult.status !== "ok") { return null; } + const kannZuweisen = profileResult.profile.role === "admin" || profileResult.profile.role === "disponent"; + const [spalten, fahrerListe] = await Promise.all([ + listAuftraegeFuerKanban(), + kannZuweisen ? listFahrerNutzer() : Promise.resolve([]), + ]); + return ( -
- -

Dashboard

-

- Eingeloggt als {result.profile.name} ({result.profile.role}) -

-
+
+

Dashboard

+
); }