From 13553f60a002a3bef2eabf3c0d51620091fbdfda Mon Sep 17 00:00:00 2001 From: Benjamin Sutter Date: Tue, 19 May 2026 19:57:16 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20close=20spec=20gaps=20=E2=80=94=20delete?= =?UTF-8?q?=20InquiryStatusBadge,=20extend=20match=20reasons,=20full=20fie?= =?UTF-8?q?ld=20keys?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Delete InquiryStatusBadge.tsx (dead code after Part A read/unread migration) - AdditionalPropertyMatch: add reasons[] + topUncertainty from positiveFactors/tradeoffs - AdditionalMatchCard: render green reasons and amber uncertainty below match score - ReportObjectFieldKey: add breakoutOptionDate, roomHeight, floorLoad, deliveryAccess, goodsLift, passengerLift, internet, microLocation, competitionEnvironment, infrastructure, marketSignals, negotiationHints, missingData (now 45 keys) - ReportObjectFieldSelector: regroup into 5 spec-aligned groups (Basisdaten, Miet-/Vertragsdaten, Technische Hard Facts, Soft Factors, Marktinformationen) - LatentInquiryReportPreview: add labels for all new field keys Co-Authored-By: Claude Sonnet 4.6 --- .../anfragencenter/InquiryStatusBadge.tsx | 31 -------- .../LatentInquiryReportPreview.tsx | 33 +++++++-- .../RelatedPropertyCardPanel.tsx | 18 ++++- .../ReportObjectFieldSelector.tsx | 73 +++++++++++-------- src/components/anfragencenter/index.ts | 1 - src/domain/additionalMatch.ts | 2 + src/domain/inquiryReport.ts | 23 ++++-- src/services/matchService.ts | 8 +- 8 files changed, 111 insertions(+), 78 deletions(-) delete mode 100644 src/components/anfragencenter/InquiryStatusBadge.tsx diff --git a/src/components/anfragencenter/InquiryStatusBadge.tsx b/src/components/anfragencenter/InquiryStatusBadge.tsx deleted file mode 100644 index ec20599..0000000 --- a/src/components/anfragencenter/InquiryStatusBadge.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { Chip } from '@mui/material' -import type { InquiryStatus } from '../../domain/inquiry' - -const STATUS_MAP: Record = { - new: { label: 'Neu', bg: '#1e40af' }, - in_progress: { label: 'In Bearbeitung', bg: '#d97706' }, - answered: { label: 'Beantwortet', bg: '#1a7a4a' }, - archived: { label: 'Archiviert', bg: '#64748b' }, -} - -interface InquiryStatusBadgeProps { - status: InquiryStatus - size?: 'small' | 'medium' -} - -export function InquiryStatusBadge({ status, size = 'small' }: InquiryStatusBadgeProps) { - const cfg = STATUS_MAP[status] - return ( - - ) -} diff --git a/src/components/anfragencenter/LatentInquiryReportPreview.tsx b/src/components/anfragencenter/LatentInquiryReportPreview.tsx index d582d6a..3543d15 100644 --- a/src/components/anfragencenter/LatentInquiryReportPreview.tsx +++ b/src/components/anfragencenter/LatentInquiryReportPreview.tsx @@ -16,21 +16,42 @@ const FIELD_LABELS: Partial> = { availabilityDate: 'Verfügbar ab', leaseTerm: 'Mietlaufzeit', breakoutOption: 'Breakout-Option', + breakoutOptionDate: 'Breakout Zeitpunkt', currentTenant: 'Aktueller Mieter', propertyNumber: 'Objektnummer', - assetType: 'Objekttyp', + assetType: 'Asset Type', floor: 'Stockwerk', parking: 'Parkplätze', - ceilingHeightM: 'Deckenhöhe', - loadingDocksCount: 'Laderampen', + fitOut: 'Ausbaugrad', + isBarrierFree: 'Barrierefrei', + ceilingHeightM: 'Raumhöhe', + floorLoad: 'Bodenlast', + loadingDocksCount: 'Anlieferung', + goodsLift: 'Warenaufzug', + passengerLift: 'Personenaufzug', powerSupplyKva: 'Stromanschluss', hasServerRoom: 'Serverraum', - isBarrierFree: 'Barrierefrei', - fitOut: 'Ausbaustandard', - publicTransportScore: 'ÖV-Score', + internet: 'Internet', + deliveryAccess: 'Zufahrt', + publicTransportScore: 'ÖV-Anbindung', prestigeScore: 'Prestige', visibilityScore: 'Sichtbarkeit', + footfallScore: 'Passantenfrequenz', + commuterAccessScore: 'Pendlererreichbarkeit', + talentAccessScore: 'Talent Access', + esgScore: 'ESG', + flexibilityScore: 'Flexibilität', + expansionPotentialScore: 'Expansionspotenzial', + taxEnvironmentScore: 'Steuerumfeld', + microLocation: 'Mikrostandort', + competitionEnvironment: 'Konkurrenzumfeld', + infrastructure: 'Infrastruktur', + marketSignals: 'Marktsignale', + negotiationHints: 'Verhandlungshinweise', + missingData: 'Datenlücken', + dataQuality: 'Datenqualität', description: 'Beschreibung', + units: 'Stockwerkstruktur', } function getFieldValue(property: Property, key: ReportObjectFieldKey): string | null { diff --git a/src/components/anfragencenter/RelatedPropertyCardPanel.tsx b/src/components/anfragencenter/RelatedPropertyCardPanel.tsx index 341301c..9ba6f3b 100644 --- a/src/components/anfragencenter/RelatedPropertyCardPanel.tsx +++ b/src/components/anfragencenter/RelatedPropertyCardPanel.tsx @@ -189,9 +189,23 @@ function AdditionalMatchCard({ match }: { match: AdditionalPropertyMatch }) { {match.matchScore}% - - {match.location} · {match.areaSqm.toLocaleString('de-CH')} m² + + {match.location} · {match.areaSqm.toLocaleString('de-CH')} m² · CHF {match.rentPricePerSqm}/m² + {match.reasons.length > 0 && ( + + {match.reasons.map((r, i) => ( + + + {r} + + ))} + + )} + {match.topUncertainty && ( + + ⚠ {match.topUncertainty} + + )}