45 lines
2.5 KiB
PHP
45 lines
2.5 KiB
PHP
<div>
|
|
<div class="mb-6">
|
|
<a href="{{ route('dashboard') }}" class="inline-flex items-center gap-1 text-sm text-gray-500 hover:text-indigo-600 transition-colors mb-1">
|
|
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"/></svg>
|
|
Torna alla home
|
|
</a>
|
|
<h1 class="text-2xl font-bold text-gray-900">Il mio profilo</h1>
|
|
</div>
|
|
|
|
<div class="max-w-2xl bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden">
|
|
{{-- Intestazione: avatar iniziale + nome --}}
|
|
<div class="p-6 flex items-center gap-4 border-b border-gray-100">
|
|
<div class="h-16 w-16 flex-none rounded-full flex items-center justify-center text-white text-2xl font-bold shadow-sm"
|
|
style="background:linear-gradient(135deg,#4f46e5,#6366f1)">
|
|
{{ strtoupper(mb_substr($user->name, 0, 1)) }}
|
|
</div>
|
|
<div class="min-w-0">
|
|
<h2 class="text-xl font-bold text-gray-900 truncate">{{ $user->name }}</h2>
|
|
<p class="text-sm text-gray-500 truncate mt-0.5">
|
|
<span class="break-all">{{ $user->email }}</span>
|
|
<span class="ml-1 inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-indigo-50 text-indigo-700 align-middle">
|
|
{{ ucfirst($user->roles->first()?->name ?? 'utente') }}
|
|
</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- Dettagli --}}
|
|
<dl class="divide-y divide-gray-100">
|
|
<div class="px-6 py-4 grid grid-cols-1 sm:grid-cols-3 gap-1 sm:gap-4">
|
|
<dt class="text-sm font-medium text-gray-500">Nome</dt>
|
|
<dd class="text-sm text-gray-900 sm:col-span-2">{{ $user->name }}</dd>
|
|
</div>
|
|
<div class="px-6 py-4 grid grid-cols-1 sm:grid-cols-3 gap-1 sm:gap-4">
|
|
<dt class="text-sm font-medium text-gray-500">Email</dt>
|
|
<dd class="text-sm text-gray-900 sm:col-span-2 break-all">{{ $user->email }}</dd>
|
|
</div>
|
|
<div class="px-6 py-4 grid grid-cols-1 sm:grid-cols-3 gap-1 sm:gap-4">
|
|
<dt class="text-sm font-medium text-gray-500">Qualifica</dt>
|
|
<dd class="text-sm text-gray-900 sm:col-span-2">{{ ucfirst($user->roles->first()?->name ?? 'utente') }}</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</div>
|