feat(night-contingent) : gabarit PDF paysage

This commit is contained in:
2026-06-11 12:00:42 +02:00
parent 829f7f7e95
commit 0b5044c47b
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<style>
@page { margin: 16px; }
body { font-family: DejaVu Sans, sans-serif; font-size: 8px; color: #000; }
h1 { font-size: 13px; margin: 0 0 2px; }
.meta { font-size: 8px; color: #555; margin-bottom: 8px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { border: 1px solid #999; padding: 2px 3px; text-align: center; }
th { background: #d9d9d9; }
td.name, th.name { text-align: left; width: 90px; }
.sub { font-size: 7px; }
tr.site-title td { text-align: left; font-weight: bold; }
td.hours { white-space: nowrap; }
</style>
</head>
<body>
<h1>Contingent heures de nuit — {{ year }}</h1>
<div class="meta">Édité le {{ exportedAt }}</div>
{% set months = ['Janv', 'Févr', 'Mars', 'Avr', 'Mai', 'Juin', 'Juil', 'Août', 'Sept', 'Oct', 'Nov', 'Déc'] %}
<table>
<thead>
<tr>
<th class="name" rowspan="2">Nom</th>
{% for m in months %}
<th colspan="2">{{ m }}</th>
{% endfor %}
</tr>
<tr>
{% for m in months %}
<th class="sub">H.nuit</th>
<th class="sub">N.jours</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for group in groups %}
<tr class="site-title">
<td colspan="25" style="background: {{ group.siteColor|default('#eee') }}">{{ group.siteName }}</td>
</tr>
{% for row in group.rows %}
<tr>
<td class="name">{{ row.employeeName }}</td>
{% for cell in row.cells %}
<td class="hours">{{ cell.hours }}</td>
<td>{{ cell.days }}</td>
{% endfor %}
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</body>
</html>