58 lines
2.4 KiB
PHP
58 lines
2.4 KiB
PHP
<!doctype html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<style>
|
|
@page { margin: 28px 34px 58px; }
|
|
body { color: #17211b; font-family: DejaVu Sans, sans-serif; font-size: 11px; margin: 0; }
|
|
h1 { font-size: 21px; margin: 0 0 3px; }
|
|
.subtitle { color: #66736b; margin: 0 0 15px; }
|
|
.summary { background: #eef5f1; border-left: 4px solid #198754; margin-bottom: 14px; padding: 8px 11px; }
|
|
.summary strong { font-size: 12px; }
|
|
table { border-collapse: collapse; width: 100%; }
|
|
thead { display: table-header-group; }
|
|
tr { page-break-inside: avoid; }
|
|
th { background: #26382e; color: #fff; font-size: 11px; letter-spacing: .25px; padding: 6px 5px; text-align: left; text-transform: uppercase; }
|
|
td { border-bottom: 1px solid #dfe7e2; overflow-wrap: break-word; padding: 6px 5px; vertical-align: top; }
|
|
tbody tr:nth-child(even) { background: #f7f9f8; }
|
|
.number { text-align: right; }
|
|
.ticket-id { font-size: 11px; word-break: break-all; }
|
|
.empty { color: #66736b; padding: 24px; text-align: center; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Listado de tickets</h1>
|
|
<p class="subtitle">{{ $tenant->nombre }} · Generado el {{ $generatedAt->copy()->timezone($timeZone)->format('d/m/Y H:i') }}</p>
|
|
|
|
<div class="summary">
|
|
Tickets incluidos: <strong>{{ $tickets->count() }}</strong>
|
|
·
|
|
Escaneados: <strong>{{ $tickets->where('status', 'Usado')->count() }}</strong>
|
|
</div>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
@foreach ($columns as $column)
|
|
<th @class(['number' => $column['type'] === 'currency'])>{{ $column['label'] }}</th>
|
|
@endforeach
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse ($tickets as $ticket)
|
|
<tr>
|
|
@foreach ($columns as $column)
|
|
<td @class([
|
|
'number' => $column['type'] === 'currency',
|
|
'ticket-id' => $column['key'] === 'ticket',
|
|
])>{{ $ticket[$column['key']] }}</td>
|
|
@endforeach
|
|
</tr>
|
|
@empty
|
|
<tr><td class="empty" colspan="{{ count($columns) }}">No hay tickets para los criterios seleccionados.</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</body>
|
|
</html>
|