added teacher-focused lesson sheet with direct class and teacher timetable links
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user