Anwesenheitszeit (Lock-in bis Feierabend) als reine Anzeige ergänzen
ci / quality (push) Failing after 36s
ci / build (push) Has been skipped
deploy / deploy (push) Successful in 1m19s

Neben der getrackten Task-Zeit zeigt der "Zeit heute"-Header jetzt
"Getrackt · Anwesend"; der Check-In/Out-Balken zeigt die Anwesenheit
live ("anwesend seit …") und nach Check-Out die finale Dauer. Kein
Eingriff ins Task-Tracking — Wert wird nur aus checkedInAt/checkedOutAt
berechnet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
dejanandClaude Fable 5 committed 2026-06-11 19:24:56 +02:00
1 parent a1cf6f3883
commit 687325ad0d
3 files changed
+54 -19

No files matched your search

@@ -7,6 +7,7 @@ import { Card } from '../ui/Card';
import { Button } from '../ui/Button';
import { Modal } from '../ui/Modal';
import { formatDuration, formatDurationCompact } from '../../lib/format-duration';
import { usePresenceSeconds } from '../../lib/use-presence-seconds';
import { TIME_CATEGORIES, type TimeCategory } from '../../lib/time-categories';
const CATEGORY_LABEL: Record<string, string> = Object.fromEntries(
@@ -30,6 +31,10 @@ export function TimelineSection() {
const todayQuery = trpc.dayEntry.today.useQuery();
const [manualOpen, setManualOpen] = useState(false);
const [editing, setEditing] = useState<string | null>(null);
const presenceSeconds = usePresenceSeconds(
todayQuery.data?.entry?.checkedInAt,
todayQuery.data?.entry?.checkedOutAt,
);
if (listQuery.isPending) return null;
// Aufsteigend sortieren: Vormittag oben, Abend unten.
@@ -45,7 +50,13 @@ export function TimelineSection() {
<div>
<h2 className="text-lg font-semibold">Zeit heute</h2>
<p className="text-xs text-[var(--color-ink-muted)]">
Gesamt: <span className="font-mono">{formatDurationCompact(totalSeconds)}</span>
Getrackt: <span className="font-mono">{formatDurationCompact(totalSeconds)}</span>
{presenceSeconds !== null && (
<>
{' · '}Anwesend:{' '}
<span className="font-mono">{formatDurationCompact(presenceSeconds)}</span>
</>
)}
</p>
</div>
<Button size="sm" variant="secondary" onClick={() => setManualOpen(true)}>