diff --git a/src/components/results/UnifiedResultCard.tsx b/src/components/results/UnifiedResultCard.tsx index 9eb5277..cc05a17 100644 --- a/src/components/results/UnifiedResultCard.tsx +++ b/src/components/results/UnifiedResultCard.tsx @@ -25,6 +25,8 @@ export function UnifiedResultCard({ result, view = 'list' }: Props) { const { openAddDialog } = useShortlistStore() const inCompare = isInCompare(result.matchId) + const isPortfolio = result.resultType === 'VERIFIED_PORTFOLIO' + const actions: MatchCardAction[] = [ { id: 'shortlist', @@ -56,9 +58,22 @@ export function UnifiedResultCard({ result, view = 'list' }: Props) { id: 'details', label: 'Details →', actionType: 'OPEN_DETAIL', - variant: 'primary', + // Downgrade to secondary when the unit CTA is the primary action + variant: isPortfolio ? 'secondary' : 'primary', onClick: () => navigate(`/demand/results/${result.matchId}`), }, + // Portfolio properties: direct link to unit page + management inquiry form + ...(isPortfolio ? [{ + id: 'contact', + label: 'Zur Einheit →', + actionType: 'OPEN_DETAIL' as const, + variant: 'primary' as const, + onClick: () => { + const propId = result.property.id + const unitId = result.match.unitId + navigate(`/demand/property/${propId}${unitId ? `?unit=${unitId}` : ''}`) + }, + }] : []), ] const vm = buildMatchCardViewModel(result, actions)