feat: add 'Zur Einheit →' CTA on all VERIFIED_PORTFOLIO cards
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user