diff --git a/src/app/parser/schedule.ts b/src/app/parser/schedule.ts
index b2668c7..709cc24 100644
--- a/src/app/parser/schedule.ts
+++ b/src/app/parser/schedule.ts
@@ -991,20 +991,43 @@ const parseLesson = (row: Element, isTeacherSchedule: boolean = false): Lesson |
lesson.topic = cells[4].textContent?.trim() || ''
}
+ // Колонка "Ресурс"
lesson.resources = []
if (cells[5]) {
- Array.from(cells[5].querySelectorAll('a'))
- .forEach(a => {
- const title = a.textContent?.trim()
- const url = a.getAttribute('href')
- if (title && url) {
- lesson.resources.push({
- type: 'link',
- title,
- url
- })
- }
- })
+ Array.from(cells[5].querySelectorAll('a')).forEach(a => {
+ const title = a.textContent?.trim()
+ const url = a.getAttribute('href')
+ if (title && url) {
+ lesson.resources.push({
+ type: 'link',
+ title,
+ url,
+ })
+ }
+ })
+ }
+
+ // Колонка "Задание для выполнения"
+ lesson.homework = ''
+ if (cells[6]) {
+ const hwCell = cells[6]
+ const rawText = hwCell.textContent?.replace(/\s+/g, ' ').trim() || ''
+ if (rawText) {
+ lesson.homework = rawText
+ }
+
+ // Добавляем ссылки из задания тоже в список материалов
+ Array.from(hwCell.querySelectorAll('a')).forEach(a => {
+ const title = a.textContent?.trim()
+ const url = a.getAttribute('href')
+ if (title && url) {
+ lesson.resources.push({
+ type: 'link',
+ title,
+ url,
+ })
+ }
+ })
}
return lesson
diff --git a/src/widgets/schedule/lesson.tsx b/src/widgets/schedule/lesson.tsx
index bc6644c..e33092e 100644
--- a/src/widgets/schedule/lesson.tsx
+++ b/src/widgets/schedule/lesson.tsx
@@ -39,6 +39,9 @@ export function Lesson({ lesson, width = 350, animationDelay, hideTeacher = fals
const hasSubject = 'subject' in lesson && lesson.subject
const hasContent = hasSubject || (isFallbackDiscipline && lesson.fallbackDiscipline) || (lesson.topic && lesson.topic.trim())
const isCancelled = lesson.isChange && !hasContent
+ const hasHomework = Boolean(lesson.homework && lesson.homework.trim())
+ const hasResources = Boolean(lesson.resources.length)
+ const hasAnyMaterials = hasResources || hasHomework
const getTeacherPhoto = (url?: string) => {
if(url) {
@@ -134,7 +137,7 @@ export function Lesson({ lesson, width = 350, animationDelay, hideTeacher = fals
)}
- {!isCancelled && (Boolean(lesson.resources.length) || ('place' in lesson && lesson.place)) && (
+ {!isCancelled && (hasAnyMaterials || ('place' in lesson && lesson.place)) && (