feat: Objekt→Einheit architecture — unit-level pre-market, property detail page, click-through from cards

- Domain: PropertyUnit extended with propertyId + schattenmarktRelease per unit
- Domain: FutureAvailabilityResult carries resolved property + unit
- useSchattenmarktSignals: generates unit-level signals (schattenmarkt-{propId}-{unitId})
- useUnifiedResults: resolves backing property + unit on FUTURE_AVAILABILITY fast path
- IUnitProvider + MockupUnitProvider: first-class unit access and mutation
- matchCardAdapter: maps preMarketUnit, preMarketAllUnits, propertyId, unitId to ViewModel
- IntelligenceMatchCard: PRE-MARKET VERIFIED shows unit info strip + "Zur Einheit →" button
- PropertyDetailView: unit-level toggles + date pickers inside PreMarketPanel
- New page: /demand/property/:propertyId with unit table, status chips, inquiry form
- App.tsx: demand route /demand/property/:propertyId registered
- Mock data: prop-001/007/037 units updated with correct lease dates + unit-level schattenmarktRelease

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Sutter
2026-05-20 19:47:59 +02:00
parent 66aabde1dc
commit d902feb6c0
14 changed files with 578 additions and 18 deletions
+3
View File
@@ -55,4 +55,7 @@ export interface FutureSignal {
// DEMAND = company is looking for space → shown as Markt-Lead in Verwaltung
// undefined = treated as SUPPLY (backwards compat for generated signals)
signalDirection?: 'SUPPLY' | 'DEMAND'
// Unit-level reference: if set, this signal is about a specific rentable unit
unitId?: string
}
+6
View File
@@ -86,6 +86,7 @@ export interface SoftFactors {
export interface PropertyUnit {
id: string
propertyId?: string // FK to parent Property (set when stored independently)
floorLevel: number // 0=EG, 1=1.OG, -1=UG
unitLabel?: string // e.g. "Ost", "West", "Einheit A"
areaSqm: number
@@ -98,6 +99,11 @@ export interface PropertyUnit {
isFlexible?: boolean // can be partially leased (Teilfläche)
minLettableSqm?: number // minimum area that can be leased standalone
offeredSqm?: number // currently offered area (≤ areaSqm); undefined = full unit
// Unit-level pre-market release
schattenmarktRelease?: {
enabled: boolean
availableFrom?: string // ISO date; overrides property-level leaseEndDate for this unit
}
}
// A bundle groups multiple free units for a combined offer
+3 -1
View File
@@ -1,5 +1,5 @@
import type { ResultType } from './enums'
import type { Property } from './property'
import type { Property, PropertyUnit } from './property'
import type { FutureSignal } from './futureSignal'
import type { Match } from './match'
@@ -30,6 +30,8 @@ export interface FutureAvailabilityResult extends UnifiedResultBase {
resultType: 'FUTURE_AVAILABILITY'
signal: FutureSignal
match: Match
property?: Property // backing property (when signal has a propertyId)
unit?: PropertyUnit // specific rentable unit (when signal has a unitId)
}
export type UnifiedMatchResult =