Изменил метод на получение общего списка занятий. Внёс небольшие правки в FE для странички с расписанием
This commit is contained in:
@@ -27,6 +27,7 @@ export async function initSchedule() {
|
||||
// Извлекаем имена из вложенных объектов или используем запасные поля
|
||||
const teacherName = lesson.teacher?.username || lesson.teacherName || '—';
|
||||
const groupName = lesson.group?.name || lesson.groupName || '—';
|
||||
const educationForm = lesson.educationForm?.name || lesson.educationFormName || '-';
|
||||
const subjectName = lesson.subject?.name || lesson.subjectName || '—';
|
||||
const day = lesson.day || '—';
|
||||
const week = lesson.week || '—';
|
||||
@@ -36,6 +37,7 @@ export async function initSchedule() {
|
||||
<td>${escapeHtml(lesson.id)}</td>
|
||||
<td>${escapeHtml(teacherName)}</td>
|
||||
<td>${escapeHtml(groupName)}</td>
|
||||
<td>${escapeHtml(educationForm)}</td>
|
||||
<td>${escapeHtml(subjectName)}</td>
|
||||
<td>${escapeHtml(day)}</td>
|
||||
<td>${escapeHtml(week)}</td>
|
||||
|
||||
@@ -185,7 +185,7 @@ export async function initUsers() {
|
||||
const response = await api.post('/api/users/lessons/create', {
|
||||
teacherId: parseInt(userId),
|
||||
groupId: parseInt(groupId),
|
||||
lessonTypeId: parseInt(subjectId),
|
||||
subjectId: parseInt(subjectId),
|
||||
day: dayOfWeek,
|
||||
week: weekType,
|
||||
time: timeSlot // передаём время
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<th>ID</th>
|
||||
<th>Преподаватель</th>
|
||||
<th>Группа</th>
|
||||
<th>Форма обучения</th>
|
||||
<th>Дисциплина</th>
|
||||
<th>День недели</th>
|
||||
<th>Неделя</th>
|
||||
|
||||
Reference in New Issue
Block a user