From b39c67d1aa1f6967b6c5ace05906133acc434931 Mon Sep 17 00:00:00 2001 From: DeeCee03 Date: Sat, 6 Jun 2026 21:08:35 +0200 Subject: [PATCH] =?UTF-8?q?Zeit-heute-Liste=20aufsteigend=20sortieren=20(V?= =?UTF-8?q?ormittag=20=E2=86=92=20Abend)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Blöcke werden jetzt nach Startzeit aufsteigend angezeigt statt neueste zuerst. Co-Authored-By: Claude Opus 4.8 (1M context) --- apps/web/src/components/time/TimelineSection.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/time/TimelineSection.tsx b/apps/web/src/components/time/TimelineSection.tsx index d016952..e2ff109 100644 --- a/apps/web/src/components/time/TimelineSection.tsx +++ b/apps/web/src/components/time/TimelineSection.tsx @@ -31,7 +31,10 @@ export function TimelineSection() { const [editing, setEditing] = useState(null); if (listQuery.isPending) return null; - const entries = listQuery.data?.entries ?? []; + // Aufsteigend sortieren: Vormittag oben, Abend unten. + const entries = [...(listQuery.data?.entries ?? [])].sort( + (a, b) => new Date(a.startedAt).getTime() - new Date(b.startedAt).getTime(), + ); const totalSeconds = listQuery.data?.totalSeconds ?? 0; const todoTitles = new Map((todayQuery.data?.todos ?? []).map((t) => [t.id, t.title]));