Ajoute une carte « Dernières entrées » sous « Aujourd'hui », rafraîchie via htmx sur entries-changed (route /ui/recent). Closes #1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
1018 B
HTML
28 lines
1018 B
HTML
<section id="recent" class="card" hx-get="/ui/recent" hx-trigger="entries-changed from:body" hx-swap="outerHTML">
|
||
<div class="card-head">
|
||
<h2>Dernières entrées</h2>
|
||
<a href="/entries">Tout voir</a>
|
||
</div>
|
||
{% if recent_entries.is_empty() %}
|
||
<p class="empty">Aucune entrée pour l'instant.</p>
|
||
{% else %}
|
||
<div class="table-wrap">
|
||
<table class="entries">
|
||
<tbody>
|
||
{% for e in recent_entries %}
|
||
<tr{% if e.running() %} class="running"{% endif %}>
|
||
<td class="nowrap">{{ e.day() }}</td>
|
||
<td class="time">{{ e.start_time() }} – {{ e.end_time() }}</td>
|
||
<td>
|
||
<span class="dot" style="--color: {{ e.color }}"></span><span class="client">{{ e.client_name }}</span> / {{ e.project_name }}
|
||
{% if !e.note.is_empty() %}<div class="note">{{ e.note }}</div>{% endif %}
|
||
</td>
|
||
<td class="num">{{ e.duration() }}</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
{% endif %}
|
||
</section>
|