cогласно расписания

This commit is contained in:
2026-04-13 18:06:41 +05:00
parent fe3824b9da
commit 5af0487869
3 changed files with 68 additions and 34 deletions

View File

@@ -118,11 +118,11 @@ function renderLessons(lessons) {
container.innerHTML = lessons.map(lesson => {
// Определяем, что показывать в строке времени
let timeHtml = '';
if (lesson.topic === 'Консультация' && lesson.date && lesson.time) {
timeHtml = `<p><strong>Дата/время:</strong> ${escapeHtml(lesson.date)} ${escapeHtml(lesson.time)}</p>`;
} else {
timeHtml = `<p><strong>Время:</strong> Согласно расписания</p>`;
}
if (lesson.topic && lesson.topic.includes('Консультация') && lesson.date && lesson.time) {
timeHtml = `<p><strong>Дата/время:</strong> ${escapeHtml(lesson.date)} ${escapeHtml(lesson.time)}</p>`;
} else {
timeHtml = `<p><strong>Время:</strong> Согласно расписания</p>`;
}
return `
<div class="lesson-card" data-id="${lesson.id}">
@@ -192,11 +192,11 @@ function openModal(lessonId) {
if (!lesson) return;
let timeInfo = '';
if (lesson.topic === 'Консультация' && lesson.date && lesson.time) {
timeInfo = `${lesson.date} ${lesson.time}`;
} else {
timeInfo = 'Согласно расписания';
}
if (lesson.topic && lesson.topic.includes('Консультация') && lesson.date && lesson.time) {
timeInfo = `${lesson.date} ${lesson.time}`;
} else {
timeInfo = 'Согласно расписания';
}
document.getElementById('lessonId').value = lessonId;
document.getElementById('modalLessonInfo').innerHTML = `