89 lines
6.2 KiB
PHP
89 lines
6.2 KiB
PHP
<x-filament-panels::page>
|
|
<div class="space-y-4">
|
|
<div class="rounded-xl border bg-white p-4">
|
|
<div class="flex flex-wrap items-center justify-between gap-3">
|
|
<div>
|
|
<div class="text-lg font-semibold">Pratiche assicurative</div>
|
|
<div class="text-sm text-gray-600">Elenco centralizzato dei sinistri aperti o chiusi, separato dalla lavorazione generale dei ticket.</div>
|
|
</div>
|
|
<div class="flex flex-wrap gap-2">
|
|
<a href="{{ \App\Filament\Pages\Supporto\TicketGestione::getUrl(panel: 'admin-filament') }}" class="inline-flex items-center rounded-md bg-slate-800 px-3 py-1.5 text-xs font-medium text-white hover:bg-slate-700">Torna a Gestione Ticket</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid gap-4 md:grid-cols-3">
|
|
<button type="button" wire:click="setStatus('aperte')" class="rounded-xl border p-4 text-left {{ $status === 'aperte' ? 'border-amber-400 bg-amber-50' : 'bg-white' }}">
|
|
<div class="text-xs uppercase tracking-wide text-gray-500">Aperte</div>
|
|
<div class="mt-1 text-2xl font-semibold">{{ $totals['aperte'] }}</div>
|
|
<div class="mt-2 text-sm text-gray-600">Pratiche in corso o da completare.</div>
|
|
</button>
|
|
<button type="button" wire:click="setStatus('chiuse')" class="rounded-xl border p-4 text-left {{ $status === 'chiuse' ? 'border-emerald-400 bg-emerald-50' : 'bg-white' }}">
|
|
<div class="text-xs uppercase tracking-wide text-gray-500">Chiuse</div>
|
|
<div class="mt-1 text-2xl font-semibold">{{ $totals['chiuse'] }}</div>
|
|
<div class="mt-2 text-sm text-gray-600">Storico pratiche definite o archiviate.</div>
|
|
</button>
|
|
<button type="button" wire:click="setStatus('tutte')" class="rounded-xl border p-4 text-left {{ $status === 'tutte' ? 'border-slate-400 bg-slate-50' : 'bg-white' }}">
|
|
<div class="text-xs uppercase tracking-wide text-gray-500">Tutte</div>
|
|
<div class="mt-1 text-2xl font-semibold">{{ $totals['tutte'] }}</div>
|
|
<div class="mt-2 text-sm text-gray-600">Vista completa di tutte le pratiche.</div>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="rounded-xl border bg-white p-0">
|
|
<div class="overflow-x-auto">
|
|
<table class="min-w-full divide-y divide-gray-200 text-sm">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left font-medium text-gray-600">Ticket</th>
|
|
<th class="px-4 py-3 text-left font-medium text-gray-600">Stabile</th>
|
|
<th class="px-4 py-3 text-left font-medium text-gray-600">Sinistro</th>
|
|
<th class="px-4 py-3 text-left font-medium text-gray-600">Polizza</th>
|
|
<th class="px-4 py-3 text-left font-medium text-gray-600">Stato</th>
|
|
<th class="px-4 py-3 text-left font-medium text-gray-600">Prossima azione</th>
|
|
<th class="px-4 py-3 text-left font-medium text-gray-600">Aperta il</th>
|
|
<th class="px-4 py-3"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-100 bg-white">
|
|
@forelse($rows as $row)
|
|
<tr>
|
|
<td class="px-4 py-3 align-top">
|
|
<div class="font-medium">#{{ $row['ticket_id'] }} - {{ $row['ticket_title'] }}</div>
|
|
@if($focusTicketId && (int) $focusTicketId === (int) $row['ticket_id'])
|
|
<div class="mt-1 text-[11px] font-semibold text-amber-700">Pratica aperta dal ticket corrente</div>
|
|
@endif
|
|
</td>
|
|
<td class="px-4 py-3 align-top">{{ $row['stabile'] }}</td>
|
|
<td class="px-4 py-3 align-top">
|
|
<div>{{ $row['claim_number'] !== '' ? $row['claim_number'] : 'Da definire' }}</div>
|
|
@if($row['policy_reference'] !== '')
|
|
<div class="text-xs text-gray-500">Rif. {{ $row['policy_reference'] }}</div>
|
|
@endif
|
|
</td>
|
|
<td class="px-4 py-3 align-top">{{ $row['policy_label'] !== '' ? $row['policy_label'] : '-' }}</td>
|
|
<td class="px-4 py-3 align-top">
|
|
<span class="inline-flex rounded-full bg-amber-100 px-2 py-1 text-xs font-medium text-amber-800">{{ $row['status'] }}</span>
|
|
</td>
|
|
<td class="px-4 py-3 align-top">
|
|
{{ $row['next_action'] !== '' ? $row['next_action'] : '-' }}
|
|
@if($row['documents_sent_at'] !== '')
|
|
<div class="mt-1 text-xs text-gray-500">Documenti inviati: {{ \Carbon\Carbon::parse($row['documents_sent_at'])->format('d/m/Y H:i') }}</div>
|
|
@endif
|
|
</td>
|
|
<td class="px-4 py-3 align-top text-gray-600">{{ $row['opened_at'] }}</td>
|
|
<td class="px-4 py-3 text-right align-top">
|
|
<a href="{{ $row['ticket_url'] }}" class="inline-flex items-center rounded-md bg-primary-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-primary-500">Apri Tab 4</a>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="8" class="px-4 py-10 text-center text-sm text-gray-500">Nessuna pratica assicurativa trovata per il filtro selezionato.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-filament-panels::page> |