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:
Benjamin Sutter
2026-05-19 16:05:18 +02:00
parent 18f4b2b37a
commit 0651333030
3 changed files with 27 additions and 35 deletions
@@ -1,9 +1,7 @@
import { useEffect, useRef, useState } from 'react'
import { useNavigate } from 'react-router'
import { Alert, Box, Button, Chip, CircularProgress, Dialog, DialogContent, DialogTitle, LinearProgress, Typography } from '@mui/material'
import { BarChart2, Building2, CheckCircle, Download, FileText, Lightbulb, Send, TrendingUp } from 'lucide-react'
import { BarChart2, Building2, CheckCircle, Download, FileText, Lightbulb, TrendingUp } from 'lucide-react'
import { marketReportService } from '../../services/marketReportService'
import { useOfferWizardStore } from '../../stores/offerWizardStore'
import type { MarketReport, PropertyMarketSignal, SignalCategory } from '../../domain/marketReport'
interface Props {
@@ -222,13 +220,6 @@ export function PropertyMarketSignalsTab({ propertyId }: Props) {
const [report, setReport] = useState<MarketReport | null>(null)
const [loading, setLoading] = useState(true)
const [dialogOpen, setDialogOpen] = useState(false)
const navigate = useNavigate()
const setSelectedProperties = useOfferWizardStore(s => s.setSelectedProperties)
function handleAngebotErstellen() {
setSelectedProperties([propertyId])
navigate('/supply/anfragen', { state: { tab: 1 } })
}
useEffect(() => {
let cancelled = false
@@ -260,26 +251,15 @@ export function PropertyMarketSignalsTab({ propertyId }: Props) {
</Typography>
)}
</Box>
<Box sx={{ display: 'flex', gap: 1 }}>
<Button
variant="contained"
size="small"
startIcon={<Send size={14} />}
onClick={handleAngebotErstellen}
sx={{ textTransform: 'none', fontSize: '0.8125rem', bgcolor: '#1e3a5f', '&:hover': { bgcolor: '#16304d' } }}
>
Angebot erstellen
</Button>
<Button
variant="outlined"
size="small"
startIcon={<FileText size={14} />}
onClick={() => setDialogOpen(true)}
sx={{ textTransform: 'none', fontSize: '0.8125rem' }}
>
Bericht erstellen
</Button>
</Box>
<Button
variant="outlined"
size="small"
startIcon={<FileText size={14} />}
onClick={() => setDialogOpen(true)}
sx={{ textTransform: 'none', fontSize: '0.8125rem' }}
>
Bericht erstellen
</Button>
</Box>
{!report ? (