Closed oskargotte closed 2 years ago
Konstigt beteende här har jag lyckats återskapa med fakeData. Jag kan kika på den.
The lessons are sorted on date and not timeStart.
const lessons = weekLessons .filter((lesson) => lesson.dayOfWeek === currentDate.isoWeekday()) .sort((a, b) => a.timeStart.localeCompare(b.timeStart))
in daySummary.component.tsx will solve it.
Also if there are overlapping lessons at the end of the day the end date should be calculated by the last endTime and not just the last lesson endTime:
const endTime = lessons .sort((a, b) => a.timeEnd.localeCompare(b.timeEnd))[lessons.length - 1] .timeEnd.slice(0, 5)
I can make a pr later tonight
The lessons are sorted on date and not timeStart.
const lessons = weekLessons .filter((lesson) => lesson.dayOfWeek === currentDate.isoWeekday()) .sort((a, b) => a.timeStart.localeCompare(b.timeStart))
in daySummary.component.tsx will solve it.
Yes that's what I thought as well. And the same fix should go into week.component.tsx I guess?
I can make a pr later tonight
I can fix it. Already started
The ending time displayed on the child card is not correct on the Android app. In the example below there are in fact lesson ending later than 10.20. However, this might be to the incorrect sorting of lessons, see #590