Модуль отчетов

This commit is contained in:
brusnitsyn
2026-06-21 23:40:55 +09:00
parent f163b95663
commit bd2cc24b98
27 changed files with 2781 additions and 3 deletions

View File

@@ -0,0 +1,85 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<title>{{ $payload->title }}</title>
<style>
body {
font-family: 'DejaVu Sans', sans-serif;
font-size: 11px;
color: #1f2430;
}
h1 {
font-size: 16px;
margin: 0 0 12px;
}
h2 {
font-size: 13px;
margin: 16px 0 6px;
}
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 8px;
}
th, td {
border: 1px solid #cfd4dc;
padding: 4px 6px;
text-align: left;
vertical-align: top;
}
th {
background: #eef2ff;
font-weight: bold;
}
.meta-table td:first-child {
font-weight: bold;
width: 220px;
}
.empty {
color: #6b7280;
font-style: italic;
margin: 0 0 8px;
}
</style>
</head>
<body>
<h1>{{ $payload->title }}</h1>
<table class="meta-table">
@foreach ($payload->meta as $label => $value)
<tr>
<td>{{ $label }}</td>
<td>{{ $value }}</td>
</tr>
@endforeach
</table>
@foreach ($payload->sections as $section)
<h2>{{ $section->title }}</h2>
@if (empty($section->rows))
<p class="empty">Нет данных за выбранный период.</p>
@else
<table>
<thead>
<tr>
@foreach ($section->columns as $label)
<th>{{ $label }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($section->rows as $row)
<tr>
@foreach (array_keys($section->columns) as $key)
<td>{{ $row[$key] ?? '' }}</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
@endif
@endforeach
</body>
</html>