Affiche les entrées de l'accueil comme sur /entries
Les tableaux « Aujourd'hui » et « Dernières entrées » réutilisent _entry_row.html : mêmes colonnes, en-tête et actions (modifier, dupliquer, supprimer). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f4c94f9b5b
commit
6307be4f79
3 files changed
+7
-22
No files matched your search
+2
-11
@@ -8,18 +8,9 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<div class="table-wrap">
|
<div class="table-wrap">
|
||||||
<table class="entries">
|
<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>
|
<tbody>
|
||||||
{% for e in recent_entries %}
|
{% for e in recent_entries %}{% include "_entry_row.html" %}{% endfor %}
|
||||||
<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>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+4
-10
@@ -6,19 +6,13 @@
|
|||||||
{% if today_entries.is_empty() %}
|
{% if today_entries.is_empty() %}
|
||||||
<p class="empty">Rien de saisi pour l'instant.</p>
|
<p class="empty">Rien de saisi pour l'instant.</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
<div class="table-wrap">
|
||||||
<table class="entries">
|
<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>
|
<tbody>
|
||||||
{% for e in today_entries %}
|
{% for e in today_entries %}{% include "_entry_row.html" %}{% endfor %}
|
||||||
<tr{% if e.running() %} class="running"{% endif %}>
|
|
||||||
<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>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</section>
|
</section>
|
||||||
+1
-1
@@ -467,7 +467,7 @@ async fn dashboard_lists_20_most_recent_entries() {
|
|||||||
|
|
||||||
let (status, html) = get_html(&app, "/ui/dernieres-entrees").await;
|
let (status, html) = get_html(&app, "/ui/dernieres-entrees").await;
|
||||||
assert_eq!(status, StatusCode::OK);
|
assert_eq!(status, StatusCode::OK);
|
||||||
assert_eq!(html.matches("<tr").count(), 20);
|
assert_eq!(html.matches("<tr id=\"entry-").count(), 20);
|
||||||
assert!(html.contains("25/03/2026") && html.contains("06/03/2026"));
|
assert!(html.contains("25/03/2026") && html.contains("06/03/2026"));
|
||||||
assert!(!html.contains("05/03/2026"));
|
assert!(!html.contains("05/03/2026"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user