fix(schedule): hide empty days and lessons, update design and fonts

This commit is contained in:
kilyabin
2026-03-05 12:32:48 +04:00
parent e6ba2e0334
commit a6da1129c9
2 changed files with 8 additions and 26 deletions

View File

@@ -525,6 +525,9 @@ function parseTeacherSchedule(
subject: subject || groupShort || group || roomText,
}
// Если нет предмета и группы, это пустая пара
if (!subject && !groupShort && !group) continue
if (location || roomText) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error — расширяем union тип за счет наличия place
@@ -545,6 +548,9 @@ function parseTeacherSchedule(
})
}
// Фильтруем пустые дни для преподавателей
const filteredDays = days.filter(day => day.lessons.length > 0)
// Извлекаем wk из URL
const currentUrl = url || document.location?.href || ''
const wkMatch = currentUrl.match(/[?&]wk=(\d+)/)
@@ -570,7 +576,7 @@ function parseTeacherSchedule(
}
return {
days,
days: filteredDays,
currentWk,
availableWeeks,
}