From e2ec1b1dc9e35d04f80f44e36af6f62a8afefe6d Mon Sep 17 00:00:00 2001 From: Benjamin Sutter Date: Thu, 21 May 2026 00:17:20 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20add=20'Zur=20Einheit=20=E2=86=92'=20CTA?= =?UTF-8?q?=20on=20all=20VERIFIED=5FPORTFOLIO=20cards?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every portfolio match card now shows a primary 'Zur Einheit →' button that navigates to /demand/property/:propertyId?unit=:unitId, where the user can see the unit table and contact management via the inquiry form. 'Details →' is demoted to secondary for portfolio cards (match analysis still accessible, but unit/contact page is the primary action). EXTERNAL_MARKET and MAISON_WORK cards are unchanged. Co-Authored-By: Claude Sonnet 4.6 --- src/components/results/UnifiedResultCard.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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)