95 lines
4.6 KiB
PHP
95 lines
4.6 KiB
PHP
@extends('admin.layouts.netgescon')
|
|
|
|
@section('title', 'I miei ticket operativi')
|
|
|
|
@section('content')
|
|
<div class="container-fluid py-4">
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<div>
|
|
<h1 class="h4 mb-0">Ticket operativi - {{ $fornitore->ragione_sociale ?? $fornitore->nome ?? 'Fornitore' }}</h1>
|
|
<small class="text-muted">Gestione interventi, chiusure operative e raggruppamento fattura</small>
|
|
</div>
|
|
<div>
|
|
<a href="{{ route('fornitore.dipendenti.index') }}" class="btn btn-sm btn-outline-primary">Gestisci dipendenti</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mb-3 d-flex gap-2">
|
|
<a class="btn btn-sm {{ $stato === 'aperti' ? 'btn-primary' : 'btn-outline-primary' }}" href="{{ route('fornitore.tickets.index', ['stato' => 'aperti']) }}">Aperti</a>
|
|
<a class="btn btn-sm {{ $stato === 'fatturabili' ? 'btn-primary' : 'btn-outline-primary' }}" href="{{ route('fornitore.tickets.index', ['stato' => 'fatturabili']) }}">Fatturabili</a>
|
|
<a class="btn btn-sm {{ $stato === 'chiusi' ? 'btn-primary' : 'btn-outline-primary' }}" href="{{ route('fornitore.tickets.index', ['stato' => 'chiusi']) }}">Chiusi</a>
|
|
</div>
|
|
|
|
<div class="card mb-4">
|
|
<div class="card-header">Interventi da fatturare</div>
|
|
<div class="card-body">
|
|
@if($fatturabili->isEmpty())
|
|
<p class="text-muted mb-0">Nessun intervento ancora pronto per fattura.</p>
|
|
@else
|
|
<div class="table-responsive">
|
|
<table class="table table-sm align-middle mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th>Ticket</th>
|
|
<th>Stabile</th>
|
|
<th>Stato</th>
|
|
<th>Rif. chiusura</th>
|
|
<th>Fattura</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($fatturabili as $item)
|
|
<tr>
|
|
<td><a href="{{ route('fornitore.tickets.show', $item) }}">#{{ $item->ticket_id }} - {{ $item->ticket->titolo ?? '-' }}</a></td>
|
|
<td>{{ $item->ticket->stabile->denominazione ?? '-' }}</td>
|
|
<td><span class="badge bg-secondary">{{ $item->stato }}</span></td>
|
|
<td>{{ $item->riferimento_chiusura ?: '-' }}</td>
|
|
<td>{{ $item->fattura_numero ?: 'Da emettere' }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-header">I miei ticket</div>
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<table class="table table-hover mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th>Ticket</th>
|
|
<th>Stabile</th>
|
|
<th>Stato</th>
|
|
<th>Aggiornato</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($interventi as $intervento)
|
|
<tr>
|
|
<td>#{{ $intervento->ticket_id }} - {{ $intervento->ticket->titolo ?? '-' }}</td>
|
|
<td>{{ $intervento->ticket->stabile->denominazione ?? '-' }}</td>
|
|
<td><span class="badge bg-info text-dark">{{ $intervento->stato }}</span></td>
|
|
<td>{{ optional($intervento->updated_at)->format('d/m/Y H:i') }}</td>
|
|
<td>
|
|
<a href="{{ route('fornitore.tickets.show', $intervento) }}" class="btn btn-sm btn-outline-primary">Apri</a>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="5" class="text-center text-muted py-4">Nessun intervento disponibile.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="card-footer">{{ $interventi->links() }}</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|