Phase 6: Plan-Ansicht — solution list + weekly grid view
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 27s
CI / test-go-edu-search (push) Successful in 29s
CI / test-python-klausur (push) Failing after 3m18s
CI / test-python-agent-core (push) Successful in 20s
CI / test-nodejs-website (push) Successful in 23s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 27s
CI / test-go-edu-search (push) Successful in 29s
CI / test-python-klausur (push) Failing after 3m18s
CI / test-python-agent-core (push) Successful in 20s
CI / test-nodejs-website (push) Successful in 23s
Frontend additions in studio-v2:
- types.ts adds TimetableSolution, TimetableLesson, SolutionStatus,
CreateTimetableSolution mirroring the Go models.
- lib/stundenplan/api.ts adds solutionsApi with list/get/create/remove/
lessons. Solve trigger is POST /timetable/solutions — school-service
forwards to the solver-service over the Docker network.
- _components/plan/SolutionList: table of past solves with status
badges, hard/soft score, Anzeigen + Loeschen buttons, and a
'Neuen Plan generieren' trigger. Auto-polls every 4 s while any
solution is pending/running, clears the interval otherwise.
- _components/plan/PlanView: Mo–Fr × period weekly grid. Three
perspectives (Klasse / Lehrer / Raum) toggleable via test-id'd
buttons; selector below lists every unique resource with at least
one lesson. Cells colour-coded by tt_subject.color.
- _components/plan/PlanHub orchestrates list + view; default tab in
page.tsx switches from 'klassen' to 'plan'.
Tests:
- mockSchoolApi helper extracted to e2e/_helpers.ts so the spec file
stays under 500 LOC. Helper now also mocks /solutions GET/POST/DELETE
and /solutions/:id/lessons; solutions kept in a closure so POST
appears in the next GET.
- 8 new tests across two suites: SolutionList empty state, list
render, completed-vs-failed Anzeigen visibility, solve trigger;
PlanView placeholder when no selection, grid render, perspective
switching.
- Existing Klassen CRUD tests now click the Klassen tab first
(Plan is the new default landing tab).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,11 +13,13 @@ import { PeriodsManager } from './_components/PeriodsManager'
|
||||
import { CurriculumManager } from './_components/CurriculumManager'
|
||||
import { AssignmentsManager } from './_components/AssignmentsManager'
|
||||
import { RegelnHub } from './_components/regeln/RegelnHub'
|
||||
import { PlanHub } from './_components/plan/PlanHub'
|
||||
import { setStundenplanToken, getStundenplanToken } from '@/lib/stundenplan/api'
|
||||
|
||||
type Tab = 'klassen' | 'lehrer' | 'faecher' | 'raeume' | 'periods' | 'curriculum' | 'assignments' | 'regeln'
|
||||
type Tab = 'plan' | 'klassen' | 'lehrer' | 'faecher' | 'raeume' | 'periods' | 'curriculum' | 'assignments' | 'regeln'
|
||||
|
||||
const TABS: { id: Tab; label: string }[] = [
|
||||
{ id: 'plan', label: 'Plan' },
|
||||
{ id: 'klassen', label: 'Klassen' },
|
||||
{ id: 'lehrer', label: 'Lehrer' },
|
||||
{ id: 'faecher', label: 'Faecher' },
|
||||
@@ -30,7 +32,7 @@ const TABS: { id: Tab; label: string }[] = [
|
||||
|
||||
export default function StundenplanPage() {
|
||||
const { isDark } = useTheme()
|
||||
const [tab, setTab] = useState<Tab>('klassen')
|
||||
const [tab, setTab] = useState<Tab>('plan')
|
||||
const [token, setToken] = useState(getStundenplanToken())
|
||||
|
||||
const handleSaveToken = () => {
|
||||
@@ -108,6 +110,7 @@ export default function StundenplanPage() {
|
||||
</nav>
|
||||
|
||||
<section>
|
||||
{tab === 'plan' && <PlanHub />}
|
||||
{tab === 'klassen' && <KlassenManager />}
|
||||
{tab === 'lehrer' && <LehrerManager />}
|
||||
{tab === 'faecher' && <FaecherManager />}
|
||||
|
||||
Reference in New Issue
Block a user