From e09c247f43a28ad8fb227b183598750b0df65742 Mon Sep 17 00:00:00 2001 From: DanielS Date: Tue, 11 Aug 2026 00:45:58 +0200 Subject: [PATCH] feat: make admin dashboard KPI cards clickable links --- shop/app/admin/page.tsx | 93 ++++++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 42 deletions(-) diff --git a/shop/app/admin/page.tsx b/shop/app/admin/page.tsx index 634da05..6589660 100644 --- a/shop/app/admin/page.tsx +++ b/shop/app/admin/page.tsx @@ -3,6 +3,7 @@ import { createAdminClient } from '@/lib/supabase/admin' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Package, ShoppingCart, Users, TrendingUp } from 'lucide-react' import { AdminRecentOrders } from '@/components/admin/recent-orders' +import Link from 'next/link' // ─── KPI-Daten aus DB ──────────────────────────────────────────────────────── async function getKpis() { @@ -44,51 +45,59 @@ export default async function AdminDashboard() { {/* KPI Cards – echte DB-Daten */}
- - - Umsatz aktueller Monat - - - -
- {new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(totalRevenue)} -
-

Nur fertige Bestellungen

-
-
+ + + + Umsatz aktueller Monat + + + +
+ {new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(totalRevenue)} +
+

Nur fertige Bestellungen

+
+
+ - - - Bestellungen - - - -
{orderCount}
-

Gesamt

-
-
+ + + + Bestellungen + + + +
{orderCount}
+

Gesamt

+
+
+ - - - Produkte - - - -
{productCount}
-

Im Katalog

-
-
+ + + + Produkte + + + +
{productCount}
+

Im Katalog

+
+
+ - - - Kunden - - - -
{userCount}
-

Registrierte User

-
-
+ + + + Kunden + + + +
{userCount}
+

Registrierte User

+
+
+
{/* Letzte Bestellungen – Client Component mit 30s-Polling */}