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 ( -
- Eingeloggt als {result.profile.name} ({result.profile.role}) -
-