diff --git a/shop/app/admin/categories/page.tsx b/shop/app/admin/categories/page.tsx
index 1814127..cf3afaa 100644
--- a/shop/app/admin/categories/page.tsx
+++ b/shop/app/admin/categories/page.tsx
@@ -37,10 +37,6 @@ async function CategoryDataWrapper() {
async function CreateCategoryAction() {
return (
-
-
-
+
)
}
diff --git a/shop/app/admin/layout.tsx b/shop/app/admin/layout.tsx
index bec2bea..44624a2 100644
--- a/shop/app/admin/layout.tsx
+++ b/shop/app/admin/layout.tsx
@@ -36,6 +36,10 @@ export default function AdminLayout({
Bestellungen
+
+
+ Benutzer
+
Einstellungen
diff --git a/shop/app/admin/orders/page.tsx b/shop/app/admin/orders/page.tsx
index d44f9e7..f4c02c8 100644
--- a/shop/app/admin/orders/page.tsx
+++ b/shop/app/admin/orders/page.tsx
@@ -13,8 +13,8 @@ export default async function AdminOrdersPage() {
-
Bestellungen & Rechnungen
-
Verwalten Sie alle Kundenbestellungen und greifen Sie auf generierte PDFs zu.
+
Bestellungen & Rechnungen
+
Verwalten Sie alle Kundenbestellungen und greifen Sie auf generierte PDFs zu.
@@ -43,12 +43,12 @@ async function OrdersData() {
- ID
- Datum
- Kunde
- Betrag
- Status
- Rechnung
+ ID
+ Datum
+ Kunde
+ Betrag
+ Status
+ Rechnung
@@ -61,17 +61,17 @@ async function OrdersData() {
) : (
orders?.map((order) => (
-
+
{order.id.slice(0, 8)}...
-
+
{new Date(order.created_at).toLocaleDateString('de-DE')}
- {order.customer_data?.company_name || 'Privatkunde'}
- {order.customer_data?.first_name} {order.customer_data?.last_name}
+ {order.customer_data?.company_name || 'Privatkunde'}
+ {order.customer_data?.first_name} {order.customer_data?.last_name}
-
+
{new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(order.total_price)}
diff --git a/shop/app/admin/page.tsx b/shop/app/admin/page.tsx
index c97de7c..71c3e93 100644
--- a/shop/app/admin/page.tsx
+++ b/shop/app/admin/page.tsx
@@ -9,42 +9,42 @@ export default function AdminDashboard() {
- Umsatz gesamt
+ Umsatz gesamt
- €12,234.56
- +20.1% zum Vormonat
+ €12,234.56
+ +20.1% zum Vormonat
- Bestellungen
+ Bestellungen
- +573
- +12% zur Vorwoche
+ +573
+ +12% zur Vorwoche
- Produkte
+ Produkte
- 12
- +2 neue Module
+ 12
+ +2 neue Module
- Kunden
+ Kunden
- 2,450
- +180 heute
+ 2,450
+ +180 heute
@@ -55,8 +55,8 @@ export default function AdminDashboard() {
Übersicht
-
- [Chart Platzhalter]
+
+ [Umsatz-Chart wird geladen...]
@@ -72,10 +72,10 @@ export default function AdminDashboard() {
JD
-
John Doe
-
john.doe@example.com
+
John Doe
+
john.doe@example.com
- +€450.00
+ +€450.00
))}
diff --git a/shop/app/admin/products/page.tsx b/shop/app/admin/products/page.tsx
index 5d3a12b..b0f28af 100644
--- a/shop/app/admin/products/page.tsx
+++ b/shop/app/admin/products/page.tsx
@@ -14,7 +14,7 @@ export default async function AdminProductsPage() {
Produkte & Module
-
+
Verwalte deine Hauptprodukte und deren zubuchbare Module.
diff --git a/shop/app/admin/users/page.tsx b/shop/app/admin/users/page.tsx
new file mode 100644
index 0000000..f517bef
--- /dev/null
+++ b/shop/app/admin/users/page.tsx
@@ -0,0 +1,42 @@
+import { getUsers } from '@/lib/actions/users'
+import { UserList } from '@/components/admin/user-list'
+import { UserDialog } from '@/components/admin/user-dialog'
+import { Users } from 'lucide-react'
+import { Suspense } from 'react'
+
+export default async function AdminUsersPage() {
+ return (
+
+
+
+
+
+ Benutzerverwaltung
+
+
+ Verwalten Sie Benutzerkonten, Berechtigungen und Sicherheit.
+
+
+
+
+
+
+
}>
+
+
+
+ )
+}
+
+async function UserDataWrapper() {
+ try {
+ const users = await getUsers()
+ return
+ } catch (error) {
+ return (
+
+ Fehler beim Laden der Benutzer. Stellen Sie sicher, dass der SERVICE_ROLE_KEY korrekt konfiguriert ist.
+
+ )
+ }
+}
diff --git a/shop/components/admin/create-product-dialog.tsx b/shop/components/admin/create-product-dialog.tsx
index c01f933..a63e599 100644
--- a/shop/components/admin/create-product-dialog.tsx
+++ b/shop/components/admin/create-product-dialog.tsx
@@ -53,7 +53,7 @@ const productSchema = z.object({
base_price: z.coerce.number().min(0, 'Preis darf nicht negativ sein'),
category_id: z.string().min(1, 'Bitte wählen Sie eine Kategorie'),
is_active: z.boolean().default(true),
- billing_interval: z.enum(['one_time', 'monthly', 'yearly']).default('monthly'),
+ billing_interval: z.enum(['one_time', 'monthly']).default('monthly'),
modules: z.array(moduleSchema).default([]),
})
@@ -190,11 +190,10 @@ export function CreateProductDialog({ children, categories, product }: { childre
render={({ field }) => (
Abrechnungsmodell
-
+
{[
{ value: 'one_time', label: 'Einmalig', icon: '💳' },
{ value: 'monthly', label: 'Monatlich', icon: '🔄' },
- { value: 'yearly', label: 'Jährlich', icon: '📅' },
].map(opt => (