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:
@@ -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')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user