++ fix: aggiornamento dipendenze e correzione bug
This commit is contained in:
102
resources/views/pdf/territori-lista.blade.php
Normal file
102
resources/views/pdf/territori-lista.blade.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="it">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ $titolo }}</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body { font-family: DejaVu Sans, sans-serif; font-size: 11px; color: #1f2937; padding: 20px; }
|
||||
.header { text-align: center; margin-bottom: 20px; border-bottom: 2px solid #6366f1; padding-bottom: 12px; }
|
||||
.header h1 { font-size: 18px; color: #1e1b4b; margin-bottom: 4px; }
|
||||
.header .sub { font-size: 10px; color: #6b7280; }
|
||||
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
|
||||
th { background: #eef2ff; color: #4338ca; font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 6px; text-align: left; border-bottom: 2px solid #c7d2fe; }
|
||||
td { padding: 7px 6px; border-bottom: 1px solid #e5e7eb; font-size: 10px; }
|
||||
tr:nth-child(even) td { background: #f9fafb; }
|
||||
.prioritario { background: #fef3c7; color: #92400e; padding: 2px 6px; border-radius: 3px; font-size: 9px; font-weight: bold; }
|
||||
.badge-green { background: #dcfce7; color: #166534; padding: 2px 6px; border-radius: 3px; font-size: 9px; font-weight: bold; }
|
||||
.badge-red { background: #fee2e2; color: #991b1b; padding: 2px 6px; border-radius: 3px; font-size: 9px; font-weight: bold; }
|
||||
.footer { margin-top: 20px; padding-top: 10px; border-top: 1px solid #e5e7eb; text-align: center; font-size: 9px; color: #9ca3af; }
|
||||
.total { margin-top: 12px; text-align: right; font-size: 11px; font-weight: bold; color: #4338ca; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<h1>{{ $titolo }}</h1>
|
||||
<div class="sub">{{ $congregazione }} — {{ $data }}</div>
|
||||
</div>
|
||||
|
||||
@if($tipo === 'assegnare')
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:10%">N°</th>
|
||||
<th style="width:20%">Zona</th>
|
||||
<th style="width:20%">Tipologia</th>
|
||||
<th style="width:20%">Giorni in reparto</th>
|
||||
<th style="width:15%">Priorità</th>
|
||||
<th style="width:15%">Note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($territori as $t)
|
||||
<tr>
|
||||
<td style="font-weight:bold">{{ $t->numero }}</td>
|
||||
<td>{{ $t->zona?->nome ?? '-' }}</td>
|
||||
<td>{{ $t->tipologia?->nome ?? '-' }}</td>
|
||||
<td>{{ $t->home_giorni_giacenza }} gg</td>
|
||||
<td>
|
||||
@if($t->home_is_prioritario)
|
||||
<span class="prioritario">★ Prioritario</span>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td style="font-size:9px;color:#6b7280">{{ \Illuminate\Support\Str::limit($t->note, 40) }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="6" style="text-align:center;color:#9ca3af;padding:20px">Nessun territorio da assegnare</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="total">Totale: {{ $territori->count() }} territori</div>
|
||||
@endif
|
||||
|
||||
@if($tipo === 'rientrare')
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:10%">N°</th>
|
||||
<th style="width:20%">Zona</th>
|
||||
<th style="width:25%">Assegnatario</th>
|
||||
<th style="width:15%">Assegnato il</th>
|
||||
<th style="width:15%">Giorni</th>
|
||||
<th style="width:15%">Note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($territori as $t)
|
||||
@php($a = $t->assegnazioneCorrente)
|
||||
<tr>
|
||||
<td style="font-weight:bold">{{ $t->numero }}</td>
|
||||
<td>{{ $t->zona?->nome ?? '-' }}</td>
|
||||
<td>{{ $a?->proclamatore?->nome_completo ?? '-' }}</td>
|
||||
<td>{{ $a?->assigned_at?->format('d/m/Y') }}</td>
|
||||
<td>
|
||||
<span class="badge-red">{{ $a?->giorni ?? '-' }} gg</span>
|
||||
</td>
|
||||
<td style="font-size:9px;color:#6b7280">{{ \Illuminate\Support\Str::limit($t->note, 40) }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="6" style="text-align:center;color:#9ca3af;padding:20px">Nessun territorio da rientrare</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="total">Totale: {{ $territori->count() }} territori</div>
|
||||
@endif
|
||||
|
||||
<div class="footer">
|
||||
Generato da TerManager2 il {{ $data }}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user