feat: F006 supply dashboard — complete spec implementation

- dataQualityService with getPortfolioQualitySummary()
- Service methods: getDashboardPropertiesSummary, getStrongMatches,
  getSignalSummary, getDashboardTasks added to respective services
- dashboardService uses Promise.allSettled for partial error resilience
- KpiCard: onClick + Tooltip support
- KpiGrid: navigate actions and tooltips per card
- StrongMatchMiniCard: Match Center, Prüfung, Vergleichen action buttons
- FutureSignalWidget: time horizon distribution (0–6, 6–12, 12–24 Mo.)
- SupplyDashboard: DashboardHeader, empty state, error state,
  partial widget errors, permission-based rendering per UserRole

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Sutter
2026-05-15 16:31:54 +02:00
parent 46acca9e62
commit 7b7be0b436
12 changed files with 454 additions and 183 deletions
+21
View File
@@ -1,6 +1,7 @@
import { MockupFutureSignalProvider } from '../provider/MockupFutureSignalProvider'
import type { FutureSignalFilters } from '../provider/IFutureSignalProvider'
import type { FutureSignal } from '../domain/futureSignal'
import type { FutureSignalSummary } from '../domain/dashboard'
import type { ListResponse, ItemResponse } from './types'
const provider = MockupFutureSignalProvider
@@ -22,4 +23,24 @@ export const futureSignalService = {
const data = await provider.verify(id, verifiedBy)
return { data }
},
async getSignalSummary(): Promise<FutureSignalSummary> {
const signals = await provider.getAll()
const RESTRICTED: readonly string[] = ['CONFIDENTIAL', 'INTERNAL']
return {
total: signals.length,
highConfidence: signals.filter(s => s.confidenceScore >= 0.75).length,
restricted: signals.filter(s => RESTRICTED.includes(s.sensitivityLevel)).length,
needsReview: signals.filter(s => !s.isVerified).length,
avgTimeHorizonMonths:
signals.length > 0
? Math.round(signals.reduce((sum, s) => sum + (s.timeHorizonMonths ?? 0), 0) / signals.length)
: 0,
timeHorizonDistribution: {
short: signals.filter(s => (s.timeHorizonMonths ?? 0) <= 6).length,
medium: signals.filter(s => { const m = s.timeHorizonMonths ?? 0; return m > 6 && m <= 12 }).length,
long: signals.filter(s => (s.timeHorizonMonths ?? 0) > 12).length,
},
}
},
}