|
@@ -5,16 +5,12 @@ import { useAuth } from "@/components/auth/authContext";
|
|
|
|
|
|
|
|
import ChangePasswordCard from "@/components/profile/ChangePasswordCard";
|
|
import ChangePasswordCard from "@/components/profile/ChangePasswordCard";
|
|
|
|
|
|
|
|
-import { Button } from "@/components/ui/button";
|
|
|
|
|
-import { Input } from "@/components/ui/input";
|
|
|
|
|
-import { Label } from "@/components/ui/label";
|
|
|
|
|
import {
|
|
import {
|
|
|
Card,
|
|
Card,
|
|
|
CardHeader,
|
|
CardHeader,
|
|
|
CardTitle,
|
|
CardTitle,
|
|
|
CardDescription,
|
|
CardDescription,
|
|
|
CardContent,
|
|
CardContent,
|
|
|
- CardFooter,
|
|
|
|
|
} from "@/components/ui/card";
|
|
} from "@/components/ui/card";
|
|
|
|
|
|
|
|
function formatRole(role) {
|
|
function formatRole(role) {
|
|
@@ -31,6 +27,7 @@ export default function ProfilePage() {
|
|
|
|
|
|
|
|
const roleLabel = isAuthenticated ? formatRole(user.role) : "—";
|
|
const roleLabel = isAuthenticated ? formatRole(user.role) : "—";
|
|
|
const branchLabel = isAuthenticated ? user.branchId || "—" : "—";
|
|
const branchLabel = isAuthenticated ? user.branchId || "—" : "—";
|
|
|
|
|
+ const emailLabel = isAuthenticated ? user.email || "—" : "—";
|
|
|
const userIdLabel = isAuthenticated ? user.userId || "—" : "—";
|
|
const userIdLabel = isAuthenticated ? user.userId || "—" : "—";
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
@@ -59,43 +56,21 @@ export default function ProfilePage() {
|
|
|
<span>{branchLabel}</span>
|
|
<span>{branchLabel}</span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+ <div className="flex items-center justify-between gap-4">
|
|
|
|
|
+ <span className="text-muted-foreground">E-Mail</span>
|
|
|
|
|
+ <span className="truncate">{emailLabel}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
<div className="flex items-center justify-between gap-4">
|
|
<div className="flex items-center justify-between gap-4">
|
|
|
<span className="text-muted-foreground">User ID</span>
|
|
<span className="text-muted-foreground">User ID</span>
|
|
|
<span className="truncate">{userIdLabel}</span>
|
|
<span className="truncate">{userIdLabel}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- </CardContent>
|
|
|
|
|
- </Card>
|
|
|
|
|
|
|
|
|
|
- <Card>
|
|
|
|
|
- <CardHeader>
|
|
|
|
|
- <CardTitle>E-Mail</CardTitle>
|
|
|
|
|
- <CardDescription>
|
|
|
|
|
- Die Änderung der E-Mail-Adresse wird in einem späteren Ticket
|
|
|
|
|
- aktiviert.
|
|
|
|
|
- </CardDescription>
|
|
|
|
|
- </CardHeader>
|
|
|
|
|
-
|
|
|
|
|
- <CardContent className="grid gap-2">
|
|
|
|
|
- <Label htmlFor="email">E-Mail-Adresse</Label>
|
|
|
|
|
- <Input
|
|
|
|
|
- id="email"
|
|
|
|
|
- type="email"
|
|
|
|
|
- placeholder="name@firma.de"
|
|
|
|
|
- disabled
|
|
|
|
|
- aria-disabled="true"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <p className="pt-1 text-xs text-muted-foreground">
|
|
|
|
|
+ Die E-Mail wird zentral verwaltet. Für Änderungen wenden Sie sich an
|
|
|
|
|
+ die IT.
|
|
|
|
|
+ </p>
|
|
|
</CardContent>
|
|
</CardContent>
|
|
|
-
|
|
|
|
|
- <CardFooter className="flex justify-end">
|
|
|
|
|
- <Button
|
|
|
|
|
- type="button"
|
|
|
|
|
- disabled
|
|
|
|
|
- aria-disabled="true"
|
|
|
|
|
- title="Kommt später"
|
|
|
|
|
- >
|
|
|
|
|
- Speichern
|
|
|
|
|
- </Button>
|
|
|
|
|
- </CardFooter>
|
|
|
|
|
</Card>
|
|
</Card>
|
|
|
|
|
|
|
|
<ChangePasswordCard />
|
|
<ChangePasswordCard />
|