feat : ajout des demi-journées d'absence dans le calendrier et l'export pdf
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 2mm;
|
||||
padding: 4mm;
|
||||
font-family: Helvetica, sans-serif;
|
||||
font-size: 8px;
|
||||
}
|
||||
@@ -69,6 +69,11 @@
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.holiday-code {
|
||||
font-weight: bold;
|
||||
font-size: 4px;
|
||||
}
|
||||
|
||||
.month-separator {
|
||||
border-right: 4px solid #0a0a0a !important;
|
||||
}
|
||||
@@ -80,6 +85,49 @@
|
||||
.holiday {
|
||||
background: #b3e5fc;
|
||||
}
|
||||
|
||||
.body-cell {
|
||||
height: 6mm;
|
||||
padding: 0 !important;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.full-cell {
|
||||
display: block;
|
||||
height: 6mm;
|
||||
line-height: 6mm;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.half-table {
|
||||
width: 100%;
|
||||
height: 6mm;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
border: 0;
|
||||
border-spacing: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.half-td {
|
||||
height: 3mm;
|
||||
line-height: 3mm;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 7px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
td.body-cell table,
|
||||
td.body-cell td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -198,11 +246,26 @@
|
||||
{% set info = absenceMap[employee.id][day.date] ?? null %}
|
||||
{% set isMonthEnd = (not loop.last) and (days[loop.index].date|date('n') != day.date|date('n')) %}
|
||||
{% set isWeekend = day.date|date('N') in [6, 7] %}
|
||||
<td class="col-day{% if isMonthEnd %} month-separator{% endif %}{% if isWeekend %} weekend{% endif %}{% if isHoliday %} holiday{% endif %}" style="width: {{ dayColWidthMm }}mm;{% if info and not isHoliday %} background-color: {{ info.color }};{% endif %}">
|
||||
<td class="col-day body-cell{% if isMonthEnd %} month-separator{% endif %}{% if isWeekend %} weekend{% endif %}{% if isHoliday %} holiday{% endif %}" style="width: {{ dayColWidthMm }}mm;{% if info and not isHoliday and not info.half %} background-color: {{ info.color }};{% endif %}">
|
||||
{% if isHoliday %}
|
||||
<span class="code">F</span>
|
||||
<span class="full-cell code">Férié</span>
|
||||
{% elseif info %}
|
||||
<span class="code">{{ info.code }}</span>
|
||||
{% if info.half %}
|
||||
<table class="half-table">
|
||||
<tr>
|
||||
<td class="half-td" style="{% if info.halfLabel == 'AM' %}background-color: {{ info.color }};{% endif %}">
|
||||
{% if info.halfLabel == 'AM' %}{{ info.code }}{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="half-td" style="{% if info.halfLabel == 'PM' %}background-color: {{ info.color }};{% endif %}">
|
||||
{% if info.halfLabel == 'PM' %}{{ info.code }}{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% else %}
|
||||
<span class="full-cell code">{{ info.code }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user