visualisation et ajout des gardes pour le chef de caserne

This commit is contained in:
pierre renaudot
2023-09-28 15:54:31 +02:00
parent 22149c3f1f
commit 9aa3a1dbf4
4 changed files with 73 additions and 27 deletions

View File

@@ -50,13 +50,24 @@
<td><small><small>" . $unPompier['pNom'] . " " . $unPompier['pPrenom'] . "</small></small></td>";
for ($jour = 0; $jour <= 6; $jour++) {
for ($tranche = 0; $tranche <= 3; $tranche++) {
echo '<td style="border: 1px solid grey; cursor:pointer;" class="click-garde"></td>';
}
}
$leJour = date('Y-m-d', strtotime('+' . $jour . ' day', $premierJour));
$dateTab = date('d/m/Y', strtotime('+' . $jour . ' day', $premierJour));
$dispos = $lesDispos[$unPompier['pId']][$dateTab];
for ($tranche = 1; $tranche <= 4; $tranche++) {
$couleur = 'c' . $tranche;
$garde = 'g' . $tranche;
$dispo = 'd' . $tranche;
echo '<td style="border: 1px solid grey; cursor:pointer;
background-color: ' . $dispos[$couleur] . ';
color: black;"
class="click-garde" id="' . $leJour . '/' . $tranche . '/' . $unPompier['pId'] . '">'
. (($dispos[$garde] == 1) ? 'X' : '')
. '</td>';
}
}
echo ("</tr>" . PHP_EOL . " ");
// TODO POUR AFFICHER LES GARDES
}
?>
</tr>