'use client' /** * Korrektur-Workspace (Admin Route) * * Main correction interface with 2/3 - 1/3 layout: * - Left (2/3): Document viewer with annotation overlay * - Right (1/3): Criteria scoring, Gutachten editor, Annotations */ import { useParams, useRouter } from 'next/navigation' import AdminLayout from '@/components/admin/AdminLayout' import { useKorrekturWorkspace } from '@/components/klausur-korrektur/useKorrekturWorkspace' import WorkspaceTopBar from '@/components/klausur-korrektur/WorkspaceTopBar' import DocumentViewer from '@/components/klausur-korrektur/DocumentViewer' import CorrectionPanel from '@/components/klausur-korrektur/CorrectionPanel' import EinigungModal from '@/components/klausur-korrektur/EinigungModal' import ErrorBanner from '@/components/klausur-korrektur/ErrorBanner' import AnnotationLayer from '../../components/AnnotationLayer' import AnnotationToolbar from '../../components/AnnotationToolbar' import AnnotationPanel from '../../components/AnnotationPanel' import EHSuggestionPanel from '../../components/EHSuggestionPanel' export default function KorrekturWorkspacePage() { const params = useParams() const router = useRouter() const klausurId = params.klausurId as string const studentId = params.studentId as string const ws = useKorrekturWorkspace({ klausurId, studentId }) const goToStudent = (direction: 'prev' | 'next') => { const newIndex = direction === 'prev' ? ws.currentIndex - 1 : ws.currentIndex + 1 if (newIndex >= 0 && newIndex < ws.students.length) { router.push(`/admin/klausur-korrektur/${klausurId}/${ws.students[newIndex].id}`) } } if (ws.loading) { return (
) } return ( {ws.showEinigungModal && ws.workflow && ( ws.setShowEinigungModal(false)} /> )} {ws.error && ws.setError(null)} />}
{ ws.setSelectedAnnotation(ann) ws.setActiveTab('annotationen') }} AnnotationToolbarComponent={AnnotationToolbar} AnnotationLayerComponent={AnnotationLayer} /> ws.setShowEinigungModal(true)} AnnotationPanelComponent={AnnotationPanel} EHSuggestionPanelComponent={EHSuggestionPanel} />
) }