Ajoute colonnes Δ sem. / Fin cible, supprime solde global, indicateurs minima
- Nouvelles colonnes : Δ sem. (solde cumulé semaine) et Fin cible (heure de sortie aprem optimale pour 0h suppl. en fin de semaine) - Δ sem. n'est affiché que quand la journée est complète et la chaîne de jours ininterrompue (pas de saut de jour non saisi) - Fin cible disparaît quand la journée est validée (passée/complète) - Delta = "—" pour les jours non travaillés (futur ou congé jour) - Indicateur warn (fond rouge) sur matin/aprem si horaires < minimum (matin 09:00→12:00, aprem 14:00→17:00) ; mise à jour live via JS - Suppression du solde global (3 cartes au lieu de 4) - Tableau sans largeurs fixes + container 1100 px pour éviter scroll horizontal sur écrans normaux ; touch-scroll conservé sur mobile - Base reste 39h/semaine (7h48/jour) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@ -46,7 +46,9 @@
|
||||
<th class="g-matin">Matin</th>
|
||||
<th class="g-aprem">Après-midi</th>
|
||||
<th class="g-calc" rowspan="2">Travaillé</th>
|
||||
<th class="g-calc" rowspan="2">Delta</th>
|
||||
<th class="g-calc" rowspan="2">Δ jour</th>
|
||||
<th class="g-cumul" rowspan="2">Δ sem.</th>
|
||||
<th class="g-cible" rowspan="2">Fin cible</th>
|
||||
<th class="g-save" rowspan="2"></th>
|
||||
<th class="g-conge" rowspan="2">Congé</th>
|
||||
</tr>
|
||||
@ -202,4 +204,25 @@
|
||||
})();
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// Live warn on time inputs that violate minimum directives
|
||||
document.addEventListener('input', function(e) {
|
||||
if (!e.target.matches('.time-input')) return;
|
||||
var date = e.target.dataset.date;
|
||||
var me = document.querySelector('[name="matin_entree"][data-date="' + date + '"]');
|
||||
var ms = document.querySelector('[name="matin_sortie"][data-date="' + date + '"]');
|
||||
var ae = document.querySelector('[name="aprem_entree"][data-date="' + date + '"]');
|
||||
var as = document.querySelector('[name="aprem_sortie"][data-date="' + date + '"]');
|
||||
var maDiv = document.getElementById('cg-matin-' + date);
|
||||
var apDiv = document.getElementById('cg-aprem-' + date);
|
||||
if (maDiv && !maDiv.classList.contains('cg')) {
|
||||
var warn = (me && me.value && me.value > '09:00') || (ms && ms.value && ms.value < '12:00');
|
||||
maDiv.classList.toggle('warn', !!warn);
|
||||
}
|
||||
if (apDiv && !apDiv.classList.contains('cg')) {
|
||||
var warnA = (ae && ae.value && ae.value > '14:00') || (as && as.value && as.value < '17:00');
|
||||
apDiv.classList.toggle('warn', !!warnA);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user