L12 Zeiterfassung: Services für Nachtrag, Freigabe, Auto-Wechsel und Für heute beenden

time-entries.ts (manuelle Einträge, Korrekturvorschläge, Freigabe/Ablehnung mit
Team-Scope), Sessions in inTransaction mit switchFromOther, stopForToday,
Segmentwechsel und getMyActiveSession. Sync-Ops time.add_manual,
time.propose_correction, session.stop_day, session.segment inkl. optimistischer
Offline-Ansicht. Bericht, Zeiten-Tab, Dashboard und Lotse zählen nur freigegebene
Zeiten; Abrechnungsfreigabe blockiert bei offenen Zeiten. Empfänger und Links der
Zeit-Events. Notdienst-Start pausiert eine laufende Uhr automatisch.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 09:29:30 +02:00
co-authored by Claude Opus 5
parent 03a2ccab4f
commit 0e94eb0d9d
19 changed files with 1054 additions and 107 deletions
@@ -135,7 +135,7 @@ function textVars(locale: Locale, f: EventFacts): Record<string, string | undefi
customer: f.customer,
actor: f.actorName ?? fallbackText(locale, "system"),
fileName: f.fileName ?? fallbackText(locale, "document"),
reason: f.syncErrorCode,
reason: f.syncErrorCode ?? f.rejectionReason,
};
}
@@ -152,6 +152,10 @@ export function linkFor(event: DomainEvent, f: EventFacts, permissions: Readonly
return `/imports/${event.entityId}`;
case "sync_operation":
return backoffice ? "/work-orders/conflicts" : "/m/sync";
case "time_entry":
// L12: approvers open their approval list, the technician „Meine Zeiten"
if (event.type === "time.approval_requested") return backoffice && permissions.has("time:approve") ? "/work-orders/time-approvals" : "/m/approvals";
return "/m/time";
default:
return null;
}