feat(unita): render prominent Timeline Subentri e Gestioni Anteriore section card on Riepilogo tab (task-d095b0e23b)

This commit is contained in:
michele 2026-08-26 18:46:44 +02:00
parent 9d7992b324
commit da28f26cb9

View File

@ -375,40 +375,49 @@ class="inline-flex items-center gap-2 rounded-lg border px-3 py-2 text-sm font-s
@endif
</div>
<div class="mt-6">
<div class="text-sm font-semibold text-gray-900 mb-2">Nominativi storici (legacy)</div>
<div class="mt-6 border-t pt-4">
<div class="flex items-center gap-2 mb-3">
<x-filament::icon icon="heroicon-o-clock" class="h-5 w-5 text-amber-600" />
<span class="text-base font-bold text-gray-900">Timeline Subentri e Gestioni Anteriore</span>
</div>
<div class="text-xs text-gray-500 mb-3">Cronistoria titolari ed avvicendamenti storici per questa unità immobiliare tra le diverse gestioni</div>
@if(empty($nominativiStorici))
<div class="text-sm text-gray-500">Nessun nominativo storico disponibile.</div>
<div class="rounded-lg border border-dashed border-gray-200 p-4 text-center text-sm text-gray-500">Nessun avvicendamento o storico subentri registrato per questa unità.</div>
@else
<div class="overflow-x-auto">
<table class="min-w-full text-sm">
<thead>
<tr class="border-b text-left text-gray-500">
<th class="py-2 pr-4">Ruolo</th>
<th class="py-2 pr-4">Nominativo</th>
<th class="py-2 pr-4">Periodo</th>
<th class="py-2 pr-4 text-right">Quota</th>
</tr>
</thead>
<tbody class="divide-y">
@foreach($nominativiStorici as $nominativo)
<tr>
<td class="py-2 pr-4 text-gray-700">{{ $nominativo['ruolo'] ?? '—' }}</td>
<td class="py-2 pr-4">
<div class="text-sm font-semibold text-gray-900">{{ $nominativo['nominativo'] ?? '—' }}</div>
@if(!empty($nominativo['fonte']))
<div class="text-xs text-gray-500">Fonte: {{ $nominativo['fonte'] }}</div>
@endif
@if(!empty($nominativo['detail']))
<div class="text-xs text-gray-500">{{ $nominativo['detail'] }}</div>
@endif
</td>
<td class="py-2 pr-4 text-gray-700">{{ $nominativo['periodo'] ?? '—' }}</td>
<td class="py-2 pr-4 text-right text-gray-900">{{ $nominativo['percentuale'] ?? '—' }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="space-y-3">
@foreach($nominativiStorici as $item)
<div class="rounded-xl border border-gray-200 bg-white p-4 shadow-xs transition hover:border-amber-300">
<div class="flex flex-wrap items-center justify-between gap-2">
<div class="flex flex-wrap items-center gap-2">
<span class="rounded-md bg-amber-50 border border-amber-200 px-2.5 py-1 text-xs font-bold text-amber-800">
{{ $item['periodo'] ?? 'Da sempre' }}
</span>
<span class="text-base font-bold text-gray-900">
{{ $item['nominativo'] }}
</span>
@if(!empty($item['ruolo']))
<span class="rounded-full bg-gray-100 px-2.5 py-0.5 text-xs font-semibold text-gray-700">
{{ $item['ruolo'] }}
</span>
@endif
@if(!empty($item['percentuale']))
<span class="rounded-full bg-blue-50 text-blue-700 border border-blue-200 px-2.5 py-0.5 text-xs font-semibold">
Quota: {{ $item['percentuale'] }}
</span>
@endif
</div>
@if(!empty($item['fonte']))
<div class="text-xs text-gray-500 font-medium">Fonte: {{ $item['fonte'] }}</div>
@endif
</div>
@if(!empty($item['detail']))
<div class="mt-2 text-xs font-medium text-gray-600 bg-gray-50 rounded-lg p-2.5">
{{ $item['detail'] }}
</div>
@endif
</div>
@endforeach
</div>
@endif
</div>