feat: F014 compare view — side-by-side decision table with AI summary

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Sutter
2026-05-16 14:28:06 +02:00
parent 2cb29a1920
commit 2753d1717c
14 changed files with 884 additions and 350 deletions
+20 -2
View File
@@ -42,6 +42,7 @@ export default function MatchDetail() {
const isFuture = match?.resultType === 'FUTURE_AVAILABILITY'
const { data: property = null } = useQuery({
queryKey: ['property', match?.propertyId],
queryFn: () => propertyService.getById(match!.propertyId),
@@ -85,10 +86,27 @@ export default function MatchDetail() {
}
const reasons = buildReasons(match)
const compareId = property?.id ?? ''
const handleCompare = () => {
if (compareId) addToCompare(compareId)
if (match && !isFuture && property) {
addToCompare({
resultType: property.resultType === 'EXTERNAL_MARKET' ? 'EXTERNAL_MARKET' : 'VERIFIED_PORTFOLIO',
matchId: match.id,
needId: match.needId,
matchScore: match.matchScore,
match,
property,
})
} else if (match && isFuture && signal) {
addToCompare({
resultType: 'FUTURE_AVAILABILITY',
matchId: match.id,
needId: match.needId,
matchScore: match.matchScore,
match,
signal,
})
}
navigate('/demand/compare')
}