mirror of
https://github.com/bitbaum/evig.git
synced 2026-12-05 15:58:23 +01:00
ARCHITECTURE_DEBT.md #3 fix. Three subsystems carry their own status enums (booking-status.ts, appointment-status.ts, it-hilfe REQUEST_STATUS) with subtly different states. A full merge would erase meaningful distinctions (quote_approved is specific to repair bookings). Instead: LifecycleStage: pending | active | completed | cancelled Each subsystem maps its specific states to a lifecycle stage. Code that doesn't care about subsystem specifics (cross-subsystem dashboards, generic "is this done?" checks, badge tiering) operates on this layer. Provided: - Mapping tables for all three subsystems - Conversion helpers: bookingStatusToStage, appointmentStatusToStage, itHilfeStatusToStage - Predicate helpers: isPending, isActive, isDone, isCancelled - LIFECYCLE_STAGE_VARIANT — pairs with <StatusBadge> for consistent cross-subsystem rendering Additive only — does NOT change any existing enum, label, badge, or caller. Adoption is opt-in. typecheck: clean Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>