Files
evig/src/components/common
Mao NakamotoandClaude Opus 4.7 948dc387a5 feat(config): unified LifecycleStage taxonomy across booking/appointment/IT-Hilfe (QQ.5)
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>
2026-06-04 23:19:05 +02:00
..