Groupe les entrées par jour

/entries et « Dernières entrées » affichent un en-tête par jour avec son
total ; la colonne Jour disparaît des lignes. La liste de /entries se
recharge après une modification inline (date déplacée, totaux).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Romulus21andClaude Opus 5.5 committed 2026-11-13 18:27:16 +01:00
1 parent 6307be4f79
commit 467293a6bc
10 files changed
+63 -24

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
{% for d in days %}
<tbody>
<tr class="day-head"><th colspan="3">{{ d.day }}</th><th class="num">{{ d.total }}</th><th></th></tr>
{% for e in d.entries %}{% include "_entry_row.html" %}{% endfor %}
</tbody>
{% endfor %}
+1 -1
View File
@@ -1,5 +1,5 @@
<tr class="editing">
<td colspan="2">
<td>
<div class="stack">
<input type="datetime-local" name="started_at" value="{{ e.start_input() }}" required aria-label="Début">
<input type="datetime-local" name="ended_at" value="{{ end }}" required aria-label="Fin">
+1 -1
View File
@@ -1,5 +1,5 @@
<tr id="entry-{{ e.id }}" class="editing">
<td colspan="2">
<td>
<div class="stack">
<input type="datetime-local" name="started_at" value="{{ e.start_input() }}" required aria-label="Début">
{% if e.running() %}
-1
View File
@@ -1,5 +1,4 @@
<tr id="entry-{{ e.id }}"{% if e.running() %} class="running"{% endif %}>
<td class="nowrap">{{ e.day() }}</td>
<td class="time">
{{ e.start_time() }} – {{ e.end_time() }}
{% if e.overlaps %}<span class="warn" title="Chevauche une autre entrée">⚠</span>{% endif %}
+3 -5
View File
@@ -3,15 +3,13 @@
<h2>Dernières entrées</h2>
<a href="/entries">Tout voir</a>
</div>
{% if recent_entries.is_empty() %}
{% if recent_days.is_empty() %}
<p class="empty">Aucune entrée pour l'instant.</p>
{% else %}
<div class="table-wrap">
<table class="entries">
<thead><tr><th>Jour</th><th>Horaire</th><th>Projet</th><th>Note</th><th class="num">Durée</th><th></th></tr></thead>
<tbody>
{% for e in recent_entries %}{% include "_entry_row.html" %}{% endfor %}
</tbody>
<thead><tr><th>Horaire</th><th>Projet</th><th>Note</th><th class="num">Durée</th><th></th></tr></thead>
{% let days = recent_days %}{% include "_entry_days.html" %}
</table>
</div>
{% endif %}
+1 -1
View File
@@ -8,7 +8,7 @@
{% else %}
<div class="table-wrap">
<table class="entries">
<thead><tr><th>Jour</th><th>Horaire</th><th>Projet</th><th>Note</th><th class="num">Durée</th><th></th></tr></thead>
<thead><tr><th>Horaire</th><th>Projet</th><th>Note</th><th class="num">Durée</th><th></th></tr></thead>
<tbody>
{% for e in today_entries %}{% include "_entry_row.html" %}{% endfor %}
</tbody>
+4 -6
View File
@@ -16,7 +16,7 @@
{% endif %}
</section>
<section class="card">
<section id="entries-list" class="card" hx-get="/entries?from={{ from }}&to={{ to }}{{ extra_query }}" hx-select="#entries-list" hx-trigger="entries-changed from:body" hx-swap="outerHTML">
<div class="card-head">
<h2>Entrées</h2>
<span class="total">{{ total }}</span>
@@ -40,15 +40,13 @@
<button class="btn">Filtrer</button>
</form>
{% if entries.is_empty() %}
{% if days.is_empty() %}
<p class="empty">Aucune entrée sur cette période.</p>
{% else %}
<div class="table-wrap">
<table class="entries">
<thead><tr><th>Jour</th><th>Horaire</th><th>Projet</th><th>Note</th><th class="num">Durée</th><th></th></tr></thead>
<tbody>
{% for e in entries %}{% include "_entry_row.html" %}{% endfor %}
</tbody>
<thead><tr><th>Horaire</th><th>Projet</th><th>Note</th><th class="num">Durée</th><th></th></tr></thead>
{% include "_entry_days.html" %}
</table>
</div>
{% endif %}