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:
@@ -21,7 +21,7 @@ export const BACKOFF_BASE_MS = 2_000;
|
||||
export const BACKOFF_MAX_MS = 5 * 60_000;
|
||||
|
||||
/** Ops that change WorkOrder.version on the server (status changes). */
|
||||
export const VERSION_CHANGING_OPS: readonly SyncOpType[] = ["session.start", "session.pause", "session.resume", "session.end", "work_order.transition", "report.submit"];
|
||||
export const VERSION_CHANGING_OPS: readonly SyncOpType[] = ["session.start", "session.pause", "session.resume", "session.end", "session.stop_day", "session.segment", "work_order.transition", "report.submit"];
|
||||
|
||||
const TRANSIENT_CODES = new Set<OutboxError["code"]>(["internal", "network"]);
|
||||
|
||||
@@ -337,7 +337,13 @@ export function problemKey(e: Pick<OutboxEntry, "status" | "opType" | "lastError
|
||||
case "blocked":
|
||||
return "blocked";
|
||||
case "invalid":
|
||||
// L12: plain-language texts for rejected time entries
|
||||
if (e.lastError?.message === "overlap") return "timeOverlap";
|
||||
if (["too_old", "in_future", "too_long", "end_before_start"].includes(e.lastError?.message ?? "")) return "timeWindow";
|
||||
return "invalid";
|
||||
case "conflict":
|
||||
if (e.lastError?.message?.startsWith("other_session_running")) return "otherSession";
|
||||
return "internal";
|
||||
case "upload":
|
||||
return "upload";
|
||||
case "unauthorized":
|
||||
|
||||
Reference in New Issue
Block a user