Astreinte : préférence personnelle et retour aligné sur les quarts d'horloge
- La gestion des astreintes devient un réglage par compte (Réglages →
« Gestion des astreintes », actif par défaut) : désactivée, le bouton AS,
les interventions, forfaits, repos de 11h, récapitulatif, ratios, stats
et exports n'en parlent plus — sans rien supprimer, réactiver retrouve tout
- L'heure de retour au bureau tombe désormais toujours sur un quart d'heure
d'horloge fixe (:00, :15, :30, :45), arrondie au supérieur après les 11h
de repos (ex. fin comptée 23:54 → retour 11:00)
- Corrigé : enregistrer ses plages horaires écrasait le forfait d'astreinte
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
This commit is contained in:
@ -98,8 +98,8 @@
|
||||
{%- if 'matin' in j.conge %}<span class="cg-chip st-ma">MA</span>{% endif -%}
|
||||
{%- if 'aprem' in j.conge %}<span class="cg-chip st-am">AM</span>{% endif -%}
|
||||
{%- if j.ferie %}<span class="cg-chip st-ferie">F</span>{% endif -%}
|
||||
{%- if j.astreinte %}<span class="cg-chip st-as">AS</span>{% endif -%}
|
||||
{%- if not (j.conge or j.ferie or j.astreinte) %}<span class="cg-none">—</span>{% endif -%}
|
||||
{%- if plages.astreinte_active and j.astreinte %}<span class="cg-chip st-as">AS</span>{% endif -%}
|
||||
{%- if not (j.conge or j.ferie or (plages.astreinte_active and j.astreinte)) %}<span class="cg-none">—</span>{% endif -%}
|
||||
</span>
|
||||
<span class="cg-caret">▾</span>
|
||||
</summary>
|
||||
@ -122,11 +122,13 @@
|
||||
title="Jour férié : dû 0, astreinte comptée 0h00 → 0h00">
|
||||
<span class="cg-opt-chip ferie">F</span> Jour férié
|
||||
</button>
|
||||
{% if plages.astreinte_active %}
|
||||
<button hx-post="/astreinte/{{ j.date }}/toggle" hx-swap="none"
|
||||
class="cg-opt{% if j.astreinte %} on{% endif %}"
|
||||
title="Jour d'astreinte (18h → 18h, ou 0h → 0h sam/dim/férié)">
|
||||
<span class="cg-opt-chip as">AS</span> Jour d'astreinte
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
@ -143,7 +145,7 @@
|
||||
onclick="asToggle(this)">
|
||||
<span class="as-caret">▸</span> {{ nb_as }} intervention{{ 's' if nb_as != 1 else '' }}
|
||||
</button>
|
||||
{% if j.retour_min is not none %}<span class="as-hint" title="11h de repos consécutif après la dernière activité, durée arrondie au quart d'heure supérieur">retour ≥ {{ j.retour }}</span>{% endif %}
|
||||
{% if j.retour_min is not none %}<span class="as-hint" title="11h de repos consécutif après la dernière activité (durée arrondie au quart d'heure supérieur), retour arrondi au quart d'horloge supérieur : :00, :15, :30 ou :45">retour ≥ {{ j.retour }}</span>{% endif %}
|
||||
{% if j.forfait_min %}<span class="as-hint" title="Forfait du jour AS déclaré (Réglages) : suivi dans le récapitulatif d'astreinte, hors heures travaillées">forfait {{ j.forfait_h }}</span>{% endif %}
|
||||
{% if j.astreinte_min %}<span class="as-total" title="Durée réelle des interventions arrondie au quart d'heure supérieur (2, 5 ou 12 min → 15 ; 22 ou 28 → 30), même sans tomber sur un quart d'heure de l'horloge — compteur séparé, hors heures de semaine">astreinte : {{ j.astreinte_h }}</span>{% endif %}
|
||||
</div>
|
||||
|
||||
@ -50,6 +50,29 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="settings-card">
|
||||
<span class="hist-label">Gestion des astreintes</span>
|
||||
<p class="settings-p">
|
||||
Préférence personnelle : si tu ne fais jamais d'astreinte, décoche pour
|
||||
retirer de tes pages tout ce qui les concerne (bouton <b>AS</b>, saisie
|
||||
d'interventions, forfaits, repos de 11h, récapitulatif et ratios). Rien
|
||||
n'est supprimé — réactiver retrouve les données telles quelles.
|
||||
</p>
|
||||
|
||||
{% if astreinte_saved %}
|
||||
<div class="settings-saved">Enregistré.</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action="/settings/astreinte-active" class="settings-form">
|
||||
<label class="settings-check">
|
||||
<input type="checkbox" name="astreinte_active" value="1" {% if plages.astreinte_active %}checked{% endif %}>
|
||||
<span>Je gère des astreintes sur ce compte</span>
|
||||
</label>
|
||||
<button class="login-btn" type="submit">Enregistrer</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% if plages.astreinte_active %}
|
||||
<div class="settings-card">
|
||||
<span class="hist-label">Ratios des heures d'astreinte</span>
|
||||
<p class="settings-p">
|
||||
@ -122,7 +145,9 @@ function asAddRatio() {
|
||||
}
|
||||
function asDelRatio(btn) { btn.closest('.as-ratio-edit').remove(); }
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if plages.astreinte_active %}
|
||||
<div class="settings-card">
|
||||
<span class="hist-label">Forfait par jour d'astreinte</span>
|
||||
<p class="settings-p">
|
||||
@ -147,6 +172,7 @@ function asDelRatio(btn) { btn.closest('.as-ratio-edit').remove(); }
|
||||
<button class="login-btn" type="submit">Enregistrer</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="settings-card">
|
||||
<span class="hist-label">Notifications (ntfy) <a href="/aide" class="settings-help-link">Aide</a></span>
|
||||
@ -321,6 +347,14 @@ function asDelRatio(btn) { btn.closest('.as-ratio-edit').remove(); }
|
||||
.as-f-jours { order: 3; width: 100%; }
|
||||
}
|
||||
.settings-form { display: flex; flex-direction: column; gap: .5rem; max-width: 420px; }
|
||||
.settings-check {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: .55rem;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.settings-check input { margin-top: .2rem; accent-color: var(--accent); }
|
||||
.settings-saved {
|
||||
background: var(--pos-bg);
|
||||
border-left: 3px solid var(--pos);
|
||||
|
||||
Reference in New Issue
Block a user