added teacher-focused lesson sheet with direct class and teacher timetable links

This commit is contained in:
2026-09-24 23:33:13 +02:00
parent de866b12b4
commit e21560ed3d
14 changed files with 306 additions and 33 deletions
@@ -73,5 +73,6 @@ class LessonMerger {
substitutionText: source.substitutionText,
lessonText: source.lessonText,
infoText: source.infoText,
classIds: source.classIds,
);
}
@@ -240,12 +240,14 @@ class TimetableAppointmentFactory {
String _locationLabel(McTimetableEntry lesson) {
final roomName =
collapseWhitespace(lesson.rooms.firstOrNull) ?? 'Unbekannt';
// Klassenlose Einträge (Aufsichten etc.) fallen auf den Lehrer zurück.
final secondLine =
(showClassInsteadOfTeacher ? lesson.classLabel : null) ??
_teacherLabel(lesson.teachers.firstOrNull) ??
'Unbekannt';
return '$roomName\n$secondLine';
if (showClassInsteadOfTeacher) {
// Klassenlose Einträge (Aufsichten etc.) zeigen nur den Raum — die
// Lehrkraft wäre hier die Plan-Inhaberin selbst.
final classLabel = lesson.classLabel;
return classLabel == null ? roomName : '$roomName\n$classLabel';
}
final teacher = _teacherLabel(lesson.teachers.firstOrNull) ?? 'Unbekannt';
return '$roomName\n$teacher';
}
/// Backend serves teachers with their full display name ("Stefan Müller"),