Files
MOPC-Portal/src/components/observer/reports/mentoring-report-tabs.tsx
Matt 2e4b95f29c
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m44s
Add round-type-specific observer reports with dynamic tabs
Refactor the observer reports page from a static 3-tab layout to a
dynamic tab system that adapts to each round type (INTAKE, FILTERING,
EVALUATION, SUBMISSION, MENTORING, LIVE_FINAL, DELIBERATION). Adds a
persistent Global tab for edition-wide analytics, juror score heatmap,
expandable juror assignment rows, filtering screening bar, and
deliberation results with tie detection.

- Add 5 observer proxy procedures to analytics router
- Create JurorScoreHeatmap, ExpandableJurorTable, FilteringScreeningBar
- Create 8 round-type tab components + GlobalAnalyticsTab
- Reduce reports page from 914 to ~190 lines (thin dispatcher)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 09:29:26 +01:00

30 lines
889 B
TypeScript

'use client'
import { trpc } from '@/lib/trpc/client'
import { Skeleton } from '@/components/ui/skeleton'
import { StatusBreakdownChart } from '@/components/charts'
import { RoundTypeStatsCards } from '@/components/observer/round-type-stats'
interface MentoringReportTabsProps {
roundId: string
programId: string
}
function StatusBreakdownSection({ roundId }: { roundId: string }) {
const { data: statusBreakdown, isLoading } =
trpc.analytics.getStatusBreakdown.useQuery({ roundId })
if (isLoading) return <Skeleton className="h-[350px]" />
if (!statusBreakdown) return null
return <StatusBreakdownChart data={statusBreakdown} />
}
export function MentoringReportTabs({ roundId }: MentoringReportTabsProps) {
return (
<div className="space-y-6">
<RoundTypeStatsCards roundId={roundId} />
<StatusBreakdownSection roundId={roundId} />
</div>
)
}