Auto-commit for deploy to production - 2025-12-09 12:09:17

This commit is contained in:
2025-12-09 12:09:18 +01:00
parent dd41f0c6c0
commit 72726ba7af
3 changed files with 62 additions and 31 deletions
+6 -2
View File
@@ -176,12 +176,12 @@ input[type="number"] {
/* Ligne de semaine contenant au moins un jour de vacances scolaires */
.fc-row--school-holiday {
background-color: #fff5cc;
background-color: #fff8d5; /* jaune clair uniforme */
}
/* Jour individuel en vacances scolaires (cellule) */
.fc-day--school-holiday {
background-color: #ffe9a6;
background-color: #ffe9a6; /* un ton un peu plus marqué mais pas orange vif */
}
/* Tableau recap vacances scolaires */
@@ -202,3 +202,7 @@ input[type="number"] {
.fc-holidays-table th {
background-color: #f0f4f8;
}
.fc-row--school-holiday td:first-child {
background-color: #ffffff;
}
+37 -9
View File
@@ -164,27 +164,55 @@ function addSchoolHolidayEventsFromRecords(records, events) {
const tbody = document.querySelector("#schoolHolidaysTable tbody");
if (tbody) tbody.innerHTML = "";
records.forEach((record) => {
const start = new Date(record.start_date);
const end = new Date(record.end_date);
// 1) Normaliser et regrouper par periode (start_date, end_date, description)
const groups = new Map();
// Remplir le tableau recap
records.forEach((record) => {
const startIso = record.start_date; // ISO string
const endIso = record.end_date;
const desc = record.description || "";
const zones = record.zones || "";
const key = `${startIso}|${endIso}|${desc}`;
const existing = groups.get(key);
if (!existing) {
groups.set(key, {
startIso,
endIso,
description: desc,
zones, // pour Zone C, ça suffira
});
}
// on ignore les académies (location) pour le tableau recap
});
// 2) Construire le tableau recap avec un seul record par groupe
if (tbody) {
const tr = document.createElement("tr");
Array.from(groups.values())
.sort((a, b) => new Date(a.startIso) - new Date(b.startIso))
.forEach((g) => {
const start = new Date(g.startIso);
const end = new Date(g.endIso);
const startStr = formatDayMonth(start) + "/" + start.getFullYear();
const endStr = formatDayMonth(end) + "/" + end.getFullYear();
const tr = document.createElement("tr");
tr.innerHTML = `
<td>${record.description || ""}</td>
<td>${g.description}</td>
<td>${startStr}</td>
<td>${endStr}</td>
<td>${record.zones || ""}</td>
<td>${record.location || ""}</td>
<td>${g.zones}</td>
`;
tbody.appendChild(tr);
});
}
// Chaque jour de la plage -> event VACANCES_SCOLAIRES
// 3) Créer les événements jour par jour (VACANCES_SCOLAIRES)
groups.forEach((g) => {
const start = new Date(g.startIso);
const end = new Date(g.endIso);
let current = new Date(start);
while (current <= end) {
const year = current.getFullYear();
-1
View File
@@ -120,7 +120,6 @@ require __DIR__ . '/header.php';
<th>Du</th>
<th>Au</th>
<th>Zones</th>
<th>Académies</th>
</tr>
</thead>
<tbody>