feat: anonymes Suchprofil — Toggle im Speichern-Schritt, supply-side Masking
- Toggle 'Anonymes Suchprofil' im AISearchSavePreview (nicht in Suchmaske) - Box wechselt zu lila wenn aktiv, Text erklärt was anonymisiert wird - isAnonymous wird via buildNeedInput in gespeichertes Need geschrieben - MatchListCard + NeedSelectionPanel: zeigen 'Anonyme Anfrage' (lila) statt Firmenname Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Alert, Box, Button, CircularProgress } from '@mui/material'
|
||||
import { Alert, Box, Button, CircularProgress, FormControlLabel, Switch, Typography } from '@mui/material'
|
||||
import { Save } from 'lucide-react'
|
||||
import { NeedCardPreview } from './NeedCardPreview'
|
||||
import type { ParseNeedResult, ParsedNeedCriteria, WeightingKey } from '../../domain/needBuilder'
|
||||
@@ -10,7 +10,9 @@ interface Props {
|
||||
needTitle: string
|
||||
overallConfidence: number
|
||||
isSaving: boolean
|
||||
isAnonymous: boolean
|
||||
onNeedTitleChange: (t: string) => void
|
||||
onAnonymousChange: (v: boolean) => void
|
||||
onBack: () => void
|
||||
onSave: () => void
|
||||
}
|
||||
@@ -22,7 +24,9 @@ export function AISearchSavePreview({
|
||||
needTitle,
|
||||
overallConfidence,
|
||||
isSaving,
|
||||
isAnonymous,
|
||||
onNeedTitleChange,
|
||||
onAnonymousChange,
|
||||
onBack,
|
||||
onSave,
|
||||
}: Props) {
|
||||
@@ -39,7 +43,41 @@ export function AISearchSavePreview({
|
||||
needTitle={needTitle}
|
||||
onNeedTitleChange={onNeedTitleChange}
|
||||
/>
|
||||
<Box sx={{ maxWidth: 720, mx: 'auto', display: 'flex', justifyContent: 'space-between', mt: 3 }}>
|
||||
|
||||
{/* Anonymity option */}
|
||||
<Box sx={{
|
||||
maxWidth: 720, mx: 'auto', mt: 2,
|
||||
p: 1.5, borderRadius: 1.5, border: '1px solid',
|
||||
borderColor: isAnonymous ? '#7c3aed' : '#e2e8f0',
|
||||
bgcolor: isAnonymous ? '#f5f3ff' : '#f8fafc',
|
||||
transition: 'all 0.15s',
|
||||
}}>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
size="small"
|
||||
checked={isAnonymous}
|
||||
onChange={e => onAnonymousChange(e.target.checked)}
|
||||
sx={{
|
||||
'& .MuiSwitch-switchBase.Mui-checked': { color: '#7c3aed' },
|
||||
'& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': { bgcolor: '#7c3aed' },
|
||||
}}
|
||||
/>
|
||||
}
|
||||
label={
|
||||
<Box>
|
||||
<Typography variant="body2" sx={{ fontWeight: 700, color: isAnonymous ? '#6d28d9' : 'text.primary' }}>
|
||||
Anonymes Suchprofil
|
||||
</Typography>
|
||||
<Typography variant="caption" sx={{ color: isAnonymous ? '#7c3aed' : 'text.secondary' }}>
|
||||
Firmenname wird nicht an Vermieter übermittelt — Verwalter sehen nur Branche und Flächenbedarf
|
||||
</Typography>
|
||||
</Box>
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
<Box sx={{ maxWidth: 720, mx: 'auto', display: 'flex', justifyContent: 'space-between', mt: 2 }}>
|
||||
<Button variant="outlined" onClick={onBack} disabled={isSaving}>
|
||||
← Zurück
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user