feat: clickable NeedMatchCard in Matchability tab navigates to Anfragencenter
Clicking a need card in the Matchability tab pre-selects the property and navigates to Anfragencenter → Latente Anfragen tab. Angebot creation lives here (demand-side), not in Marktsignale. NeedMatchCard gains onClick prop with navy hover + shadow treatment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import type { PropertyNeedMatch } from '../../domain/match'
|
||||
|
||||
interface Props {
|
||||
match: PropertyNeedMatch
|
||||
onClick?: () => void
|
||||
}
|
||||
|
||||
function ScoreBadge({ score }: { score: number }) {
|
||||
@@ -43,17 +44,19 @@ function InfoRow({ icon, label, value }: { icon: React.ReactNode; label: string;
|
||||
)
|
||||
}
|
||||
|
||||
export function NeedMatchCard({ match }: Props) {
|
||||
export function NeedMatchCard({ match, onClick }: Props) {
|
||||
return (
|
||||
<Card
|
||||
elevation={0}
|
||||
onClick={onClick}
|
||||
sx={{
|
||||
p: 2,
|
||||
mb: 1.5,
|
||||
border: '1px solid #e2e8f0',
|
||||
borderRadius: 1.5,
|
||||
'&:hover': { borderColor: '#cbd5e1', bgcolor: '#fafafa' },
|
||||
transition: 'border-color 0.15s, background-color 0.15s',
|
||||
cursor: onClick ? 'pointer' : 'default',
|
||||
'&:hover': onClick ? { borderColor: '#1e3a5f', bgcolor: '#f8fafc', boxShadow: '0 2px 8px rgba(30,58,95,0.08)' } : { borderColor: '#cbd5e1', bgcolor: '#fafafa' },
|
||||
transition: 'border-color 0.15s, background-color 0.15s, box-shadow 0.15s',
|
||||
}}
|
||||
>
|
||||
<Box sx={{ display: 'flex', alignItems: 'flex-start', gap: 1.5 }}>
|
||||
|
||||
Reference in New Issue
Block a user