Archived
Private
Public Access
1
0

Added some qol improvements

This commit is contained in:
2023-09-04 15:03:20 +02:00
parent 969f6a4e8e
commit fd1865da2d
11 changed files with 63 additions and 55 deletions

View File

@@ -42,14 +42,15 @@ export class HomePage implements OnInit {
const classPromise = this.iserv.getCoursesAndClass();
const subsPromise = this.units.getSubstitutionPlan("today");
const timetablePromise = this.storage.getItem<Timetable>("timetable");
await Promise.all([classPromise, subsPromise, timetablePromise]);
await Promise.all([classPromise, subsPromise]);
this.classData = await classPromise;
let unitsData = await subsPromise;
const timetable = await timetablePromise;
if (scheduleDay != undefined && timetable != undefined) {
this.lessons = timetable[scheduleDay].filter(lesson => lesson != undefined);
this.lessons = timetable[scheduleDay].filter(lesson => lesson != undefined && this.storage.isLessonThisWeek(lesson));
}
if (this.dateIsPast(unitsData.date, this.today)) {