Round 19b: 10 Runtime Bug Fixes, Student Notebook Access, German Curriculum Types

Bug Fixes:
- Fixed duplicate i18n keys (notebooks.type_lined etc.)
- Fixed settings-view.tsx: studentsList undefined → students
- Fixed student-detail-view.tsx: pe.competencyId → pe.competency.id
- Fixed student-detail-view.tsx: locale variable not in scope
- Fixed student-detail-view.tsx: studentId/setStudent undefined
- Fixed notebooks-view.tsx: onClick={onAddPage} passing MouseEvent
- Fixed curriculum-coverage-view.tsx: Map import shadowing built-in
- Fixed api.ts: avatarUrl missing from AttendanceRecord/Report types
- Fixed badge-check.ts: invalid Prisma queries with wrong field names

Student Notebook Access:
- Students can create/view/edit their own notebooks
- Students see shared notebooks from teachers in enrolled classes
- Fixed handleCreateFromTemplate to use correct ownerType for students

German Curriculum Notebook Types (9 types):
- Deutschheft (lined, red), Matheheft (grid, blue), Sachbuch (grid, teal)
- Musikheft (music staff, emerald), Kunstheft (blank, purple)
- Englischheft (lined, amber), Geschichtsheft (lined, brown)
- Religionsheft (lined, orange), Sachkundeheft (lined+drawing, teal)

Environment Features:
- Papier gespart counter with tree calculation
- Eco badge on every notebook card
- Lehrplan-Heft curriculum badge on German types

60+ new i18n keys (DE/EN)
This commit is contained in:
Mustafa Cetin committed 2026-07-29 16:44:13 +00:00
1 parent 9b2168d775
commit 58cb7afd81
14 files changed
+593 -64

No files matched your search

+5 -3
View File
@@ -582,7 +582,7 @@ export interface Report {
status: string;
pdfFilePath: string | null;
includesGrades: boolean;
student: { id: string; firstName: string; lastName: string };
student: { id: string; firstName: string; lastName: string; avatarUrl: string | null };
classGroup: { id: string; name: string; gradeLevel: number };
schoolYear: { id: string; label: string };
generatedByUser: { id: string; firstName: string; lastName: string };
@@ -890,7 +890,7 @@ export function downloadCsvExport(params: {
classGroupId?: string;
schoolYearId?: string;
schoolId?: string;
format?: 'csv' | 'json';
format?: 'csv' | 'json' | 'pdf';
dateFrom?: string;
dateTo?: string;
}): void {
@@ -1141,6 +1141,8 @@ export interface StudentDetailData {
lastName: string;
dateOfBirth: string | null;
externalId: string | null;
avatarUrl: string | null;
avatarInitials: string | null;
createdAt: string;
school: { id: string; name: string };
enrollments: Array<{
@@ -1548,7 +1550,7 @@ export interface AttendanceRecord {
status: AttendanceStatus;
arrivalTime: string | null;
comment: string | null;
student: { id: string; firstName: string; lastName: string };
student: { id: string; firstName: string; lastName: string; avatarUrl: string | null };
}
export interface AttendanceSession {