"use client"; import React from "react"; import { useAuth } from "@/components/auth/authContext"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, } from "@/components/ui/card"; function formatRole(role) { if (role === "branch") return "Niederlassung"; if (role === "admin") return "Admin"; if (role === "dev") return "Entwicklung"; return role ? String(role) : "Unbekannt"; } export default function ProfilePage() { const { status, user } = useAuth(); const isAuthenticated = status === "authenticated" && user; const roleLabel = isAuthenticated ? formatRole(user.role) : "—"; const branchLabel = isAuthenticated ? user.branchId || "—" : "—"; const userIdLabel = isAuthenticated ? user.userId || "—" : "—"; return (

Profil

Konto- und Zugangseinstellungen.

Konto Aktuelle Sitzungsinformationen.
Rolle {roleLabel}
Niederlassung {branchLabel}
User ID {userIdLabel}
E-Mail Die Änderung der E-Mail-Adresse wird in einem späteren Ticket aktiviert. Passwort Die Passwort-Änderung wird in einem separaten Ticket umgesetzt. {!isAuthenticated ? (

Hinweis: Profilfunktionen sind nur verfügbar, wenn Sie angemeldet sind.

) : null}
); }