Added Function to config Profil

This commit is contained in:
2026-02-08 14:21:07 +01:00
parent ff6201a42c
commit f1e9e3f8d4
11 changed files with 557 additions and 10 deletions

View File

@@ -10,6 +10,7 @@ interface User {
id: string;
email: string;
name: string | null;
photoUrl?: string | null;
roleId: string | null;
role: {
id: string;
@@ -328,16 +329,27 @@ export default function ParametresContent() {
<div>
<div className="bg-white rounded-xl shadow-sm border border-gray-100 p-6">
<div className="text-center mb-6">
<div className="w-20 h-20 rounded-full bg-gradient-to-br from-lblue to-dblue flex items-center justify-center mx-auto mb-4 shadow-lg">
<span className="text-white text-2xl font-bold">{getUserInitials()}</span>
</div>
{user?.photoUrl ? (
<img
src={user.photoUrl}
alt={user.name || 'Utilisateur'}
className="w-20 h-20 rounded-full object-cover mx-auto mb-4 shadow-lg border-4 border-white"
/>
) : (
<div className="w-20 h-20 rounded-full bg-gradient-to-br from-lblue to-dblue flex items-center justify-center mx-auto mb-4 shadow-lg">
<span className="text-white text-2xl font-bold">{getUserInitials()}</span>
</div>
)}
<h2 className="text-xl font-bold text-gray-900 mb-1">
{user?.name || 'Utilisateur'}
</h2>
<p className="text-sm text-gray-500">{user?.email}</p>
</div>
<button className="w-full px-4 py-3 bg-gray-50 hover:bg-gray-100 rounded-lg text-left transition-colors border border-gray-200">
<button
onClick={() => router.push('/dashboard/parametres/compte')}
className="w-full px-4 py-3 bg-gray-50 hover:bg-gray-100 rounded-lg text-left transition-colors border border-gray-200"
>
<div className="flex items-center gap-3">
<svg className="w-5 h-5 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" />