Aère le récapitulatif d'astreinte : un bloc par jour lisible
Chaque jour devient un bloc avec en-tête (jour abrégé, forfait, total du
jour astreinte → pondéré) et interventions indentées dessous ; les jours
forfait-seul tiennent sur une ligne au lieu d'un pseudo-événement.
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
This commit is contained in:
@ -27,6 +27,7 @@ DEFAULT_FACTEURS_ASTREINTE = [
|
||||
]
|
||||
|
||||
_EPOCH_DATE = date(2000, 1, 1)
|
||||
JOURS_COURTS = ["Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"]
|
||||
|
||||
|
||||
def hhmm_to_minutes(val: str | None) -> int:
|
||||
@ -495,7 +496,11 @@ def compute_week(pointages: list[dict], conges: list[dict], heures_jour_min: int
|
||||
if (dec and dec["total_min"] > 0) or forfait:
|
||||
as_jours.append({
|
||||
"date": p["date"],
|
||||
"jour": JOURS_COURTS[datetime.strptime(p["date"], "%Y-%m-%d").weekday()],
|
||||
"events": dec["events"] if dec else [],
|
||||
"total_min": dec["total_min"] if dec else 0,
|
||||
"total_h": dec["total_h"] if dec else "",
|
||||
"total_pondere_h": dec["total_pondere_h"] if dec else "",
|
||||
"forfait_min": forfait,
|
||||
"forfait_h": minutes_to_hhmm(forfait) if forfait else "",
|
||||
})
|
||||
|
||||
@ -54,7 +54,11 @@
|
||||
</div>
|
||||
{% for j in result.astreinte.jours %}
|
||||
<div class="as-jour">
|
||||
<span class="as-jour-date">{{ j.date[8:] }}/{{ j.date[5:7] }}</span>
|
||||
<div class="as-jour-head">
|
||||
<span class="as-jour-date">{{ j.jour }} {{ j.date[8:] }}/{{ j.date[5:7] }}</span>
|
||||
{% if j.forfait_min %}<span class="as-forfait" title="Forfait du jour AS déclaré (réglé dans Réglages) : ajouté au temps travaillé de la semaine, hors compteurs d'astreinte">forfait + {{ j.forfait_h }}</span>{% endif %}
|
||||
{% if j.total_min %}<span class="as-jour-total">astreinte {{ j.total_h }} → {{ j.total_pondere_h }} pondérées</span>{% endif %}
|
||||
</div>
|
||||
{% for ev in j.events %}
|
||||
<div class="as-ev">
|
||||
<span class="as-ev-h">{{ ev.debut }} → {{ ev.fin }}</span>
|
||||
@ -68,12 +72,11 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if j.forfait_min %}<div class="as-ev"><span class="as-forfait" title="Forfait du jour AS déclaré (réglé dans Réglages) : ajouté au temps travaillé de la semaine, hors compteurs d'astreinte">forfait + {{ j.forfait_h }}</span></div>{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="as-totaux">
|
||||
{% for c in result.astreinte.categories %}<span class="as-cat">{{ c.nom }} : {{ c.min_h }} ×{{ c.facteur_txt }} = {{ c.pondere_h }}</span>{% endfor %}
|
||||
{% if result.astreinte.total_forfait_min %}<span class="as-forfait" title="Forfaits des jours AS déclarés : ajoutés au temps travaillé, hors compteurs d'astreinte">forfaits + {{ result.astreinte.total_forfait_h }}</span>{% endif %}
|
||||
{% if result.astreinte.total_forfait_min %}<span class="as-forfait" title="Forfaits des jours AS déclarés : ajoutés au temps travaillé, hors compteurs d'astreinte">forfaits + {{ result.astreinte.total_forfait_h }} <em>(dans le travaillé)</em></span>{% endif %}
|
||||
<span class="as-grand">total {{ result.astreinte.total_h }} → {{ result.astreinte.total_pondere_h }} pondérées</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -580,7 +580,15 @@
|
||||
margin: -.15rem 0 .45rem;
|
||||
}
|
||||
.as-decompte-help b { color: var(--text); font-weight: 500; }
|
||||
.as-ev { display: flex; flex-wrap: wrap; gap: .45rem; align-items: baseline; padding: .12rem 0; }
|
||||
.as-ev {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .45rem;
|
||||
align-items: baseline;
|
||||
padding: .12rem 0 .12rem .6rem;
|
||||
margin: .2rem 0 .2rem .25rem;
|
||||
border-left: 2px solid var(--rule-l);
|
||||
}
|
||||
.as-ev-h { font-family: var(--mono); }
|
||||
.as-ev-desc { color: var(--muted); font-style: italic; }
|
||||
.as-ev-q {
|
||||
@ -592,7 +600,11 @@
|
||||
.as-ev-cat, .as-cat { color: var(--accent); font-family: var(--mono); font-size: 11px; }
|
||||
.as-forfait { font-family: var(--mono); color: var(--muted); font-size: 11px; }
|
||||
.as-ev-pond { font-family: var(--mono); color: var(--accent-2); }
|
||||
.as-jour-date { font-family: var(--mono); font-weight: 500; margin-right: .4rem; }
|
||||
.as-jour { padding: .35rem 0; border-top: 1px dashed var(--rule-l); }
|
||||
.as-jour:first-of-type { border-top: none; padding-top: .1rem; }
|
||||
.as-jour-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
|
||||
.as-jour-date { font-family: var(--mono); font-weight: 500; }
|
||||
.as-jour-total { font-family: var(--mono); color: var(--muted); font-size: 11px; margin-left: auto; }
|
||||
.as-totaux {
|
||||
border-top: 1px dashed var(--rule);
|
||||
margin-top: .4rem;
|
||||
|
||||
Reference in New Issue
Block a user