feat: F025 button & action logic audit — global toast, confirm dialog, wired mutations
- Add ToastProvider (global MUI Snackbar stack) + toastStore (Zustand) - Add ConfirmDialog reusable component for destructive actions - Wire toast feedback to all async mutations: review status, AI output status, match approval, shortlist add/remove/title/finalize, signal review actions - Fix dead UserMenu buttons (Profil, Einstellungen) — show info toast - Migrate local Snackbar instances in AddToShortlistDialog and FutureSignalDetailPanel to global toast store Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { useMatchesByProperty, useApproveMatch } from '../../hooks/useMatches'
|
||||
import { usePropertyById } from '../../hooks/useProperties'
|
||||
import { useMatchCenterStore } from '../../stores/matchCenterStore'
|
||||
import { useCompareStore } from '../../stores/compareStore'
|
||||
import { useToastStore } from '../../stores/toastStore'
|
||||
import { MatchCardExpanded } from '../match-card/MatchCardExpanded'
|
||||
import { buildMatchCardViewModel } from '../../features/matching/matchCardAdapter'
|
||||
import { reviewService } from '../../services/reviewService'
|
||||
@@ -17,6 +18,7 @@ export function MatchBriefingPanel() {
|
||||
const { selectedPropertyId, selectedNeedId } = useMatchCenterStore()
|
||||
const { addToCompare } = useCompareStore()
|
||||
const approveMatch = useApproveMatch()
|
||||
const showToast = useToastStore((s) => s.showToast)
|
||||
|
||||
const { data: matches = [], isLoading: matchesLoading } = useMatchesByProperty(selectedPropertyId ?? '')
|
||||
const { data: property = null, isLoading: propLoading } = usePropertyById(selectedPropertyId)
|
||||
@@ -52,7 +54,10 @@ export function MatchBriefingPanel() {
|
||||
label: 'Genehmigen',
|
||||
actionType: 'APPROVE',
|
||||
variant: 'primary',
|
||||
onClick: () => approveMatch.mutate(match.id),
|
||||
onClick: () => approveMatch.mutate(match.id, {
|
||||
onSuccess: () => showToast('Match genehmigt.'),
|
||||
onError: () => showToast('Genehmigung fehlgeschlagen.', 'error'),
|
||||
}),
|
||||
},
|
||||
{
|
||||
id: 'review',
|
||||
|
||||
Reference in New Issue
Block a user