++ fix grafici, aggiunta statistiche su area assegnatario, sezione profilo
This commit is contained in:
@@ -215,6 +215,27 @@
|
||||
<span class="label">Data</span>
|
||||
<span class="value">{{ $assignment->assigned_at->format('d/m/Y') }}</span>
|
||||
</div>
|
||||
<div class="chip">
|
||||
<span class="label">Giorni assegnato</span>
|
||||
<span class="value">{{ $assignment->giorni }}</span>
|
||||
</div>
|
||||
<div class="chip">
|
||||
<span class="label">Consegna prevista</span>
|
||||
<span class="value">{{ optional($assignment->data_consegna_presunta)->format('d/m/Y') ?? '—' }}</span>
|
||||
</div>
|
||||
@php($giorniScadenza = $assignment->giorni_alla_scadenza)
|
||||
<div class="chip">
|
||||
<span class="label">Scadenza</span>
|
||||
<span class="value" @if($giorniScadenza !== null && $giorniScadenza < 0) style="color:#dc2626" @endif>
|
||||
@if($giorniScadenza === null)
|
||||
—
|
||||
@elseif($giorniScadenza >= 0)
|
||||
tra {{ $giorniScadenza }} {{ $giorniScadenza === 1 ? 'giorno' : 'giorni' }}
|
||||
@else
|
||||
scaduto da {{ abs($giorniScadenza) }} {{ abs($giorniScadenza) === 1 ? 'giorno' : 'giorni' }}
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($showDownload)
|
||||
|
||||
@@ -32,13 +32,15 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="hidden sm:flex items-center gap-2 px-3 py-1.5 rounded-lg" style="background:rgba(255,255,255,0.1)">
|
||||
<svg class="h-4 w-4" style="color:rgba(255,255,255,0.7)" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="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"/></svg>
|
||||
<span class="text-sm" style="color:rgba(255,255,255,0.9)">
|
||||
{{ auth()->user()->name }}
|
||||
<span class="text-xs" style="color:rgba(255,255,255,0.6)">({{ auth()->user()->roles->first()?->name ?? 'utente' }})</span>
|
||||
<a href="{{ route('profile') }}" title="Il mio profilo"
|
||||
class="hidden sm:flex items-center gap-2 px-3 py-1.5 rounded-lg transition {{ request()->routeIs('profile') ? 'ring-1 ring-white/40' : '' }}"
|
||||
style="background:rgba(255,255,255,0.1)" onmouseover="this.style.background='rgba(255,255,255,0.2)'" onmouseout="this.style.background='rgba(255,255,255,0.1)'">
|
||||
<svg class="h-5 w-5 flex-none" style="color:rgba(255,255,255,0.7)" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="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"/></svg>
|
||||
<span class="flex flex-col leading-tight text-left">
|
||||
<span class="text-sm font-medium" style="color:rgba(255,255,255,0.95)">{{ auth()->user()->name }}</span>
|
||||
<span class="text-xs" style="color:rgba(255,255,255,0.6)">{{ auth()->user()->email }} · {{ ucfirst(auth()->user()->roles->first()?->name ?? 'utente') }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
<form method="POST" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
<button type="submit" class="flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-lg transition" style="color:rgba(255,255,255,0.8);background:rgba(255,255,255,0.1)" onmouseover="this.style.background='rgba(255,255,255,0.2)'" onmouseout="this.style.background='rgba(255,255,255,0.1)'">
|
||||
@@ -149,6 +151,7 @@
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
@can('settings.manage')
|
||||
<div class="pt-4 mt-4 border-t border-gray-200">
|
||||
<a href="{{ route('privacy') }}"
|
||||
class="flex items-center gap-3 px-3 py-2 text-sm font-medium rounded-lg {{ request()->routeIs('privacy') ? 'bg-indigo-50 text-indigo-700' : 'text-gray-700 hover:bg-gray-100' }}">
|
||||
@@ -156,6 +159,7 @@
|
||||
Privacy
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
|
||||
44
resources/views/livewire/profile.blade.php
Normal file
44
resources/views/livewire/profile.blade.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user