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:
Benjamin Sutter
2026-06-07 00:04:17 +02:00
parent b2530f9e20
commit 5a1f412ce3
5 changed files with 58 additions and 8 deletions
+4 -1
View File
@@ -38,6 +38,7 @@ export default function AISearch() {
const [weights, setWeights] = useState<Record<WeightingKey, number>>(defaultWeights)
const [weightingKey, setWeightingKey] = useState(0)
const [needTitle, setNeedTitle] = useState('')
const [isAnonymous, setIsAnonymous] = useState(false)
const [error, setError] = useState<string | null>(null)
const isManualTextRef = useRef(false)
@@ -165,7 +166,7 @@ export default function AISearch() {
setStep(NeedBuilderStep.SAVING)
const entries = Object.entries(parseResult.confidenceByField)
const conf = entries.length > 0 ? entries.reduce((s, [, v]) => s + v, 0) / entries.length : 0
const input = buildNeedInput(editedCriteria, weights, needTitle, conf, 'ACTIVE')
const input = buildNeedInput({ ...editedCriteria, isAnonymous: isAnonymous || undefined }, weights, needTitle, conf, 'ACTIVE')
createNeedMutation.mutate(input, {
onSuccess: (created) => {
queryClient.invalidateQueries({ queryKey: ['matches'] })
@@ -253,7 +254,9 @@ export default function AISearch() {
needTitle={needTitle}
overallConfidence={overallConfidence}
isSaving={step === NeedBuilderStep.SAVING}
isAnonymous={isAnonymous}
onNeedTitleChange={setNeedTitle}
onAnonymousChange={setIsAnonymous}
onBack={() => setStep(NeedBuilderStep.IDLE)}
onSave={handleSaveProfile}
/>