Added explicit timetable objects with defined types

This commit is contained in:
2023-06-19 10:54:23 +02:00
parent 3d6e0cec0e
commit b7bb3805a2
11 changed files with 235 additions and 171 deletions

View File

@ -192,11 +192,11 @@ class _TimetableState extends State<Timetable> {
id: element,
startTime: startTime,
endTime: endTime,
subject: subjects.result.firstWhere((subject) => subject.id == element.su[0]['id']).alternateName,
subject: subjects.result.firstWhere((subject) => subject.id == element.su[0].id).alternateName,
location: ""
"${rooms.result.firstWhere((room) => room.id == element.ro[0]['id']).name}"
"${rooms.result.firstWhere((room) => room.id == element.ro[0].id).name}"
"\n"
"${element.te.first['longname']}",
"${element.te.first.longname}",
notes: element.activityType,
color: _getEventColor(element.code, startTime, endTime),
);