94 lines
6.5 KiB
PHP
94 lines
6.5 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">Ticket operativi fornitore</div>
|
|
<div class="text-sm text-gray-600">
|
|
@if($this->fornitoreLabel)
|
|
Vista operativa attiva per {{ $this->fornitoreLabel }}.
|
|
@else
|
|
Seleziona un fornitore dalla gestione ticket per aprire questa vista.
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="flex flex-wrap gap-2">
|
|
<a href="{{ $this->getCollaboratoriUrl() }}" class="inline-flex items-center rounded-md bg-gray-800 px-3 py-1.5 text-xs font-medium text-white hover:bg-gray-700">Collaboratori</a>
|
|
<a href="{{ $this->getContabilitaUrl() }}" class="inline-flex items-center rounded-md bg-white px-3 py-1.5 text-xs font-medium text-gray-700 ring-1 ring-inset ring-gray-300 hover:bg-gray-50">Contabilita</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@if($this->missingAdminContext)
|
|
<div class="rounded-xl border border-amber-300 bg-amber-50 p-4 text-sm text-amber-800">
|
|
Questa vista per amministratori richiede un fornitore selezionato. Aprila dalla gestione ticket oppure usa un link con il parametro fornitore.
|
|
</div>
|
|
@else
|
|
<div class="grid gap-4 md:grid-cols-3">
|
|
<button type="button" wire:click="setStatus('aperti')" class="rounded-xl border p-4 text-left {{ $status === 'aperti' ? 'border-primary-500 bg-primary-50' : 'bg-white' }}">
|
|
<div class="text-xs uppercase tracking-wide text-gray-500">Aperti</div>
|
|
<div class="mt-1 text-2xl font-semibold">{{ $totals['aperti'] }}</div>
|
|
<div class="mt-2 text-sm text-gray-600">Assegnati, in corso o in verifica.</div>
|
|
</button>
|
|
<button type="button" wire:click="setStatus('fatturabili')" class="rounded-xl border p-4 text-left {{ $status === 'fatturabili' ? 'border-primary-500 bg-primary-50' : 'bg-white' }}">
|
|
<div class="text-xs uppercase tracking-wide text-gray-500">Fatturabili</div>
|
|
<div class="mt-1 text-2xl font-semibold">{{ $totals['fatturabili'] }}</div>
|
|
<div class="mt-2 text-sm text-gray-600">Interventi pronti o gia fatturati.</div>
|
|
</button>
|
|
<button type="button" wire:click="setStatus('chiusi')" class="rounded-xl border p-4 text-left {{ $status === 'chiusi' ? 'border-primary-500 bg-primary-50' : 'bg-white' }}">
|
|
<div class="text-xs uppercase tracking-wide text-gray-500">Chiusi</div>
|
|
<div class="mt-1 text-2xl font-semibold">{{ $totals['chiusi'] }}</div>
|
|
<div class="mt-2 text-sm text-gray-600">Storico completato del fornitore.</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">Contatto</th>
|
|
<th class="px-4 py-3 text-left font-medium text-gray-600">Problema</th>
|
|
<th class="px-4 py-3 text-left font-medium text-gray-600">Operatore</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">Aggiornato</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['titolo'] }}</div>
|
|
<div class="text-xs text-gray-500">{{ $row['stabile'] }} · ingresso {{ $row['ingresso'] }}</div>
|
|
</td>
|
|
<td class="px-4 py-3 align-top">
|
|
<div>{{ $row['contatto'] }}</div>
|
|
<div class="text-xs text-gray-500">{{ $row['telefono'] !== '' ? $row['telefono'] : 'Telefono non disponibile' }}</div>
|
|
</td>
|
|
<td class="px-4 py-3 align-top">
|
|
<div>{{ $row['problema'] }}</div>
|
|
<div class="text-xs text-gray-500">Apparato: {{ $row['apparato'] }}</div>
|
|
</td>
|
|
<td class="px-4 py-3 align-top">{{ $row['operatore'] }}</td>
|
|
<td class="px-4 py-3 align-top">
|
|
<span class="inline-flex rounded-full bg-gray-100 px-2 py-1 text-xs font-medium text-gray-700">{{ $row['stato'] }}</span>
|
|
</td>
|
|
<td class="px-4 py-3 align-top text-gray-600">{{ $row['updated_at'] }}</td>
|
|
<td class="px-4 py-3 text-right align-top">
|
|
<a href="{{ $row['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 scheda</a>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="7" class="px-4 py-10 text-center text-sm text-gray-500">Nessun intervento trovato per questo filtro.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</x-filament-panels::page> |