Files
SIRH/templates/work-hour-day-export/print.html.twig
T
2026-06-08 17:51:25 +02:00

69 lines
3.0 KiB
Twig

<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Heures - {{ dateLabel }}</title>
<style>
@page { size: A4 portrait; margin: 4mm; }
html, body { margin: 0; padding: 2mm; font-family: Helvetica, sans-serif; font-size: 10px; }
.title-bar { position: relative; margin: 0 0 3mm 0; }
h1 { text-align: center; font-size: 15px; margin: 0; }
.export-date { position: absolute; top: 0; right: 0; font-size: 9px; color: #333; padding-top: 4px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; border: 2px solid #0a0a0a; }
th, td { border: 1px solid #0a0a0a; padding: 1px 2px; vertical-align: middle; text-align: center; overflow: hidden; }
th { font-weight: 700; background: #f0f0f0; white-space: normal; }
td { white-space: nowrap; }
td.name { text-align: left; }
tr.site-title td { font-weight: bold; font-size: 11px; text-transform: uppercase; text-align: left; padding: 2px 6px; white-space: nowrap; }
tr.weekend td { background: #c0c0c0; }
td.statut { background: #b3e5fc; }
</style>
</head>
<body>
<div class="title-bar">
<h1>Heures du {{ dateLabel }}</h1>
<div class="export-date">Édité le {{ exportedAt }}</div>
</div>
<table>
<thead>
<tr>
<th style="width: 38mm;">Nom</th>
<th style="width: 22mm;">Statut</th>
<th style="width: 16mm;">Début matin</th>
<th style="width: 16mm;">Fin matin</th>
<th style="width: 16mm;">Début après-midi</th>
<th style="width: 16mm;">Fin après-midi</th>
<th style="width: 16mm;">Début soir</th>
<th style="width: 16mm;">Fin soir</th>
<th style="width: 10mm;">Jour</th>
<th style="width: 10mm;">Nuit</th>
<th style="width: 10mm;">Total</th>
</tr>
</thead>
<tbody>
{% for group in groups %}
<tr class="site-title">
<td colspan="11" style="background: {{ group.siteColor ?: '#e8e8e8' }};">{{ group.siteName }}</td>
</tr>
{% for row in group.rows %}
<tr class="{{ row.isWeekend ? 'weekend' : '' }}">
<td class="name">{{ row.employeeName }}</td>
<td class="{{ row.statut ? 'statut' : '' }}">{{ row.statut }}</td>
<td>{{ row.morningFrom }}</td>
<td>{{ row.morningTo }}</td>
<td>{{ row.afternoonFrom }}</td>
<td>{{ row.afternoonTo }}</td>
<td>{{ row.eveningFrom }}</td>
<td>{{ row.eveningTo }}</td>
<td>{{ row.dayHours }}</td>
<td>{{ row.nightHours }}</td>
<td>{{ row.total }}</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</body>
</html>