Add round-type-specific observer reports with dynamic tabs
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m44s
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m44s
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>
This commit is contained in:
29
src/components/observer/reports/mentoring-report-tabs.tsx
Normal file
29
src/components/observer/reports/mentoring-report-tabs.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
'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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user