77 lines
5.0 KiB
PHP
Executable File
77 lines
5.0 KiB
PHP
Executable File
<div class="space-y-6">
|
|
<div class="grid gap-4 md:grid-cols-4">
|
|
<div class="rounded-xl border bg-white p-4">
|
|
<div class="text-xs uppercase tracking-wide text-slate-500">Totale</div>
|
|
<div class="mt-2 text-2xl font-semibold text-slate-900">{{ $this->communicationStats['totale'] }}</div>
|
|
<div class="mt-1 text-sm text-slate-500">Eventi protocollati sullo stabile.</div>
|
|
</div>
|
|
<div class="rounded-xl border bg-white p-4">
|
|
<div class="text-xs uppercase tracking-wide text-slate-500">Email</div>
|
|
<div class="mt-2 text-2xl font-semibold text-slate-900">{{ $this->communicationStats['email'] }}</div>
|
|
<div class="mt-1 text-sm text-slate-500">Canale email registrato.</div>
|
|
</div>
|
|
<div class="rounded-xl border bg-white p-4">
|
|
<div class="text-xs uppercase tracking-wide text-slate-500">Da lavorare</div>
|
|
<div class="mt-2 text-2xl font-semibold text-slate-900">{{ $this->communicationStats['da_lavorare'] }}</div>
|
|
<div class="mt-1 text-sm text-slate-500">Messaggi senza ticket o non chiusi.</div>
|
|
</div>
|
|
<div class="rounded-xl border bg-white p-4">
|
|
<div class="text-xs uppercase tracking-wide text-slate-500">Oggi</div>
|
|
<div class="mt-2 text-2xl font-semibold text-slate-900">{{ $this->communicationStats['oggi'] }}</div>
|
|
<div class="mt-1 text-sm text-slate-500">Movimenti registrati in giornata.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="rounded-xl border border-amber-200 bg-amber-50 p-4">
|
|
<div class="flex flex-wrap items-start justify-between gap-3">
|
|
<div>
|
|
<div class="text-sm font-semibold text-amber-900">Protocollo comunicazioni dello stabile</div>
|
|
<div class="mt-1 text-xs text-amber-800">Questo protocollo tiene lo storico per stabile ma resta compatibile con una regia amministratore unica, come già succede per i ticket.</div>
|
|
</div>
|
|
<a href="{{ $this->getGlobalCommunicationsUrl() }}" class="inline-flex items-center rounded-md bg-slate-900 px-3 py-1.5 text-xs font-medium text-white hover:bg-slate-800">Apri regia amministratore</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="rounded-xl border bg-white overflow-hidden">
|
|
<div class="border-b px-4 py-3 text-sm font-semibold text-slate-900">Ultime comunicazioni dello stabile</div>
|
|
<div class="overflow-x-auto">
|
|
<table class="min-w-full divide-y divide-slate-200 text-sm">
|
|
<thead class="bg-slate-50">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left font-medium text-slate-600">Protocollo</th>
|
|
<th class="px-4 py-3 text-left font-medium text-slate-600">Canale</th>
|
|
<th class="px-4 py-3 text-left font-medium text-slate-600">Mittente</th>
|
|
<th class="px-4 py-3 text-left font-medium text-slate-600">Messaggio</th>
|
|
<th class="px-4 py-3 text-left font-medium text-slate-600">Stato</th>
|
|
<th class="px-4 py-3 text-left font-medium text-slate-600">Ticket</th>
|
|
<th class="px-4 py-3 text-left font-medium text-slate-600">Ricevuto</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-slate-100 bg-white">
|
|
@forelse($this->communicationRows as $message)
|
|
<tr>
|
|
<td class="px-4 py-3 align-top font-mono text-xs text-slate-700">{{ $message->protocol_number }}</td>
|
|
<td class="px-4 py-3 align-top">{{ strtoupper((string) $message->channel) }}</td>
|
|
<td class="px-4 py-3 align-top">{{ $message->sender_name ?: '-' }}</td>
|
|
<td class="px-4 py-3 align-top text-slate-600">{{ \Illuminate\Support\Str::limit((string) ($message->message_text ?? ''), 120) }}</td>
|
|
<td class="px-4 py-3 align-top">{{ $message->status ?: '-' }}</td>
|
|
<td class="px-4 py-3 align-top">
|
|
@if($message->ticket_id)
|
|
<a href="{{ \App\Filament\Pages\Supporto\TicketGestione::getUrl(['ticket' => (int) $message->ticket_id, 'tab' => 'scheda'], panel: 'admin-filament') }}" class="text-primary-600 hover:underline">#{{ (int) $message->ticket_id }}</a>
|
|
@else
|
|
-
|
|
@endif
|
|
</td>
|
|
<td class="px-4 py-3 align-top text-slate-500">{{ optional($message->received_at)->format('d/m/Y H:i') ?: '-' }}</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="7" class="px-4 py-10 text-center text-sm text-slate-500">Nessuna comunicazione protocollata per questo stabile.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|