Python (6 files in klausur-service): - rbac.py (1,132 → 4), admin_api.py (1,012 → 4) - routes/eh.py (1,111 → 4), ocr_pipeline_geometry.py (1,105 → 5) Python (2 files in backend-lehrer): - unit_api.py (1,226 → 6), game_api.py (1,129 → 5) Website (6 page files): - 4x klausur-korrektur pages (1,249-1,328 LOC each) → shared components in website/components/klausur-korrektur/ (17 shared files) - companion (1,057 → 10), magic-help (1,017 → 8) All re-export barrels preserve backward compatibility. Zero import errors verified. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
89 lines
2.8 KiB
TypeScript
89 lines
2.8 KiB
TypeScript
'use client'
|
|
|
|
/**
|
|
* Klausur-Korrektur Admin Page
|
|
*
|
|
* Hauptseite fuer die KI-gestuetzte Abitur-Korrektur.
|
|
* Zeigt alle Klausuren und ermoeglicht das Erstellen neuer Klausuren.
|
|
*/
|
|
|
|
import AdminLayout from '@/components/admin/AdminLayout'
|
|
import { useKlausurList } from '@/components/klausur-korrektur/useKlausurList'
|
|
import ErrorBanner from '@/components/klausur-korrektur/ErrorBanner'
|
|
import ListTabNav from '@/components/klausur-korrektur/ListTabNav'
|
|
import WillkommenTab from '@/components/klausur-korrektur/WillkommenTab'
|
|
import KlausurenTab from '@/components/klausur-korrektur/KlausurenTab'
|
|
import ErstellenTab from '@/components/klausur-korrektur/ErstellenTab'
|
|
import DirektuploadTab from '@/components/klausur-korrektur/DirektuploadTab'
|
|
import StatistikenTab from '@/components/klausur-korrektur/StatistikenTab'
|
|
|
|
export default function KlausurKorrekturPage() {
|
|
const list = useKlausurList({ basePath: '/admin/klausur-korrektur' })
|
|
|
|
return (
|
|
<AdminLayout
|
|
title="Klausur-Korrektur"
|
|
description="KI-gestuetzte Abitur-Korrektur fuer Niedersachsen"
|
|
>
|
|
{list.error && <ErrorBanner error={list.error} onDismiss={() => list.setError(null)} />}
|
|
|
|
<ListTabNav
|
|
activeTab={list.activeTab}
|
|
onTabChange={list.setActiveTab}
|
|
markAsVisited={list.markAsVisited}
|
|
/>
|
|
|
|
{list.activeTab === 'willkommen' && (
|
|
<WillkommenTab
|
|
klausuren={list.klausuren}
|
|
onNavigate={list.setActiveTab}
|
|
markAsVisited={list.markAsVisited}
|
|
/>
|
|
)}
|
|
|
|
{list.activeTab === 'klausuren' && (
|
|
<KlausurenTab
|
|
klausuren={list.klausuren}
|
|
loading={list.loading}
|
|
basePath={list.basePath}
|
|
onNavigate={list.setActiveTab}
|
|
onDelete={list.handleDeleteKlausur}
|
|
/>
|
|
)}
|
|
|
|
{list.activeTab === 'erstellen' && (
|
|
<ErstellenTab
|
|
form={list.form}
|
|
ehForm={list.ehForm}
|
|
templates={list.templates}
|
|
creating={list.creating}
|
|
loadingTemplates={list.loadingTemplates}
|
|
onFormChange={list.setForm}
|
|
onEhFormChange={list.setEhForm}
|
|
onSubmit={list.handleCreateKlausur}
|
|
onCancel={() => list.setActiveTab('klausuren')}
|
|
/>
|
|
)}
|
|
|
|
{list.activeTab === 'direktupload' && (
|
|
<DirektuploadTab
|
|
direktForm={list.direktForm}
|
|
direktStep={list.direktStep}
|
|
uploading={list.uploading}
|
|
onFormChange={list.setDirektForm}
|
|
onStepChange={list.setDirektStep}
|
|
onUpload={list.handleDirektupload}
|
|
onCancel={() => list.setActiveTab('willkommen')}
|
|
/>
|
|
)}
|
|
|
|
{list.activeTab === 'statistiken' && (
|
|
<StatistikenTab
|
|
klausuren={list.klausuren}
|
|
gradeInfo={list.gradeInfo}
|
|
/>
|
|
)}
|
|
</AdminLayout>
|
|
)
|
|
}
|