Zeiterfassung + Visual-Polish (Keycap-Buttons, Space Grotesk)
ci / quality (push) Has been cancelled
ci / build (push) Has been cancelled

Zeiterfassung
- Neue Tabelle time_entry mit started_at/ended_at/duration_seconds,
  optional todo_id/bezug, category-Enum (focus/meeting/break/admin/learning/other),
  description, day_entry_id-Verknüpfung. Partial-Unique-Index erzwingt
  max. einen aktiven Timer pro User.
- tRPC time-Router: now, start (stoppt aktiven automatisch), stop,
  listToday (Liste + Tagessumme), update, upsertManual (retroaktiv),
  delete, teamToday (personenübergreifend mit byCategory + aktivem
  Timer pro User).
- TopNav: persistente TimerPill links neben Streak. Quick-Picker mit
  heutigen ToDos, Kategorie-Auswahl und Freitext-Start. Live-Sekundenzähler.
- /heute: TimelineSection mit Edit/Delete pro Eintrag, ToDo-Bindung
  nachträglich änderbar, Block-nachtragen-Dialog. Pro ToDo-Zeile
  ▶-Start- und 🕐-Nachtrag-Button.
- /puls: TeamTimeSection mit aktiver Timer-Anzeige + Tagessumme +
  Kategorie-Breakdown pro User (refresh alle 30s, Live-Tick jede Sekunde).

Visual
- Space Grotesk als Hausschrift (selbst-gehostet, latin + latin-ext)
- Keycap-Button-Stil (Gradient + Druckeffekt) für primary/secondary/destructive
- Neue Helper-Module: format-duration, time-categories

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
dejanandClaude Opus 4.7 committed 2026-06-02 17:27:40 +02:00
1 parent 4f33509a0f
commit 95beb99cd4
23 files changed
+3442 -49

No files matched your search

+7 -3
View File
@@ -224,10 +224,13 @@ export const dayEntryRouter = router({
if (!entry) {
throw new TRPCError({ code: 'NOT_FOUND', message: 'Tageseintrag nicht gefunden.' });
}
if (entry.status === 'full' && entry.editLockedAt && entry.editLockedAt < new Date()) {
// Editierbar, solange das Eintrags-Datum noch der heutige Berlin-Tag ist.
// Damit kann mehrmals am Tag aktualisiert werden; nach 00:00 (Europe/Berlin)
// ist der Vortag final und kann nicht mehr verändert werden.
if (entry.date !== todayIso(new Date())) {
throw new TRPCError({
code: 'BAD_REQUEST',
message: 'Die Reflexion ist nicht mehr editierbar.',
message: 'Reflexion eines Vortags kann nicht mehr bearbeitet werden.',
});
}
@@ -279,7 +282,8 @@ export const dayEntryRouter = router({
trend: input.trend ?? null,
url: input.url ?? null,
blockerId: blockerRecord?.id ?? entry.blockerId,
editLockedAt: new Date(now.getTime() + 30 * 60 * 1000),
// Edit-Lock wird datums­basiert geprüft (s. o.); kein zeitlicher Lock mehr.
editLockedAt: null,
updatedAt: now,
})
.where(eq(dayEntry.id, entry.id))