Миллион изменений, создание вкладки "Расписание занятий"
This commit is contained in:
424
frontend/admin/views/schedule.html
Executable file → Normal file
424
frontend/admin/views/schedule.html
Executable file → Normal file
@@ -1,179 +1,281 @@
|
||||
<div class="card create-card">
|
||||
<div class="card-header-row">
|
||||
<h2 id="schedule-rule-form-title">Новое правило расписания</h2>
|
||||
<button type="button" class="btn-edit-classroom" id="schedule-rule-reset">Очистить форму</button>
|
||||
</div>
|
||||
<form id="schedule-rule-form" novalidate>
|
||||
<input type="hidden" id="schedule-rule-id">
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="schedule-rule-subject">Дисциплина</label>
|
||||
<select id="schedule-rule-subject" required>
|
||||
<option value="">Загрузка...</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="schedule-rule-semester">Семестр</label>
|
||||
<select id="schedule-rule-semester" required>
|
||||
<option value="">Загрузка...</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="schedule-rule-active-from">Дата начала</label>
|
||||
<input type="date" id="schedule-rule-active-from" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="schedule-rule-hours">Академические часы</label>
|
||||
<input type="number" id="schedule-rule-hours" min="1" step="1" placeholder="72" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="schedule-groups-panel">
|
||||
<label class="schedule-section-label">Группы</label>
|
||||
<div id="schedule-rule-groups" class="schedule-checkbox-grid"></div>
|
||||
</div>
|
||||
|
||||
<div class="schedule-slots-panel">
|
||||
<div class="card-header-row">
|
||||
<h2>Слоты правила</h2>
|
||||
<button type="button" class="btn-edit-classroom" id="schedule-slot-add">Добавить слот</button>
|
||||
</div>
|
||||
<div id="schedule-rule-slots" class="schedule-slots-list"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<button type="submit" class="btn-primary">Сохранить правило</button>
|
||||
</div>
|
||||
<div class="form-alert" id="schedule-rule-alert" role="alert"></div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header-row">
|
||||
<h2>Расписание занятий</h2>
|
||||
<button class="btn-primary" id="sch-btn-add-lesson">Добавить занятие</button>
|
||||
<h2>Правила динамического расписания</h2>
|
||||
<button class="btn-primary" id="schedule-refresh">Обновить</button>
|
||||
</div>
|
||||
<div class="table-wrap">
|
||||
<table id="schedule-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sortable" data-sort-key="id">ID <span class="sort-arrow"></span></th>
|
||||
<th class="filterable" data-filter-key="teacher">
|
||||
Преподаватель <span class="filter-icon">▾</span>
|
||||
</th>
|
||||
<th class="filterable" data-filter-key="group">
|
||||
Группа <span class="filter-icon">▾</span>
|
||||
</th>
|
||||
<th class="filterable" data-filter-key="classroomName">
|
||||
Аудитория <span class="filter-icon">▾</span>
|
||||
</th>
|
||||
<th class="filterable" data-filter-key="educationForm">
|
||||
Форма обучения <span class="filter-icon">▾</span>
|
||||
</th>
|
||||
<th class="filterable" data-filter-key="subject">
|
||||
Дисциплина <span class="filter-icon">▾</span>
|
||||
</th>
|
||||
<th class="filterable" data-filter-key="lessonFormat">
|
||||
Формат занятия <span class="filter-icon">▾</span>
|
||||
</th>
|
||||
<th class="filterable" data-filter-key="typeLesson">
|
||||
Тип занятия <span class="filter-icon">▾</span>
|
||||
</th>
|
||||
<th class="filterable" data-filter-key="day">
|
||||
День недели <span class="filter-icon">▾</span>
|
||||
</th>
|
||||
<th>Неделя</th>
|
||||
<th>Время</th>
|
||||
<th>ID</th>
|
||||
<th>Дисциплина</th>
|
||||
<th>Семестр</th>
|
||||
<th>Группы</th>
|
||||
<th>Начало</th>
|
||||
<th>Часы</th>
|
||||
<th>Слоты</th>
|
||||
<th>Действия</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="schedule-tbody">
|
||||
<tr>
|
||||
<td colspan="11" class="loading-row">Загрузка...</td>
|
||||
<td colspan="8" class="loading-row">Загрузка...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===== Оверлей для модалок добавления занятия ===== -->
|
||||
<div class="cs-overlay" id="sch-overlay">
|
||||
<div class="cs-overlay-scroll">
|
||||
|
||||
<!-- Модалка 1: Форма добавления -->
|
||||
<div class="cs-modal cs-modal-form card" id="sch-modal-form">
|
||||
<div class="cs-modal-header">
|
||||
<h2>Добавить занятие</h2>
|
||||
<button class="btn-close-panel" id="sch-modal-close">×</button>
|
||||
</div>
|
||||
|
||||
<form id="sch-add-lesson-form">
|
||||
<div class="form-row" style="align-items: flex-end; gap: 1rem; flex-wrap: wrap; width: 100%; justify-content: space-between;">
|
||||
|
||||
<!-- Преподаватель -->
|
||||
<div class="form-group" style="flex: 0 1 auto; max-width: 220px">
|
||||
<label for="sch-teacher">Преподаватель</label>
|
||||
<select id="sch-teacher" required>
|
||||
<option value="">Выберите преподавателя</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Группа -->
|
||||
<div class="form-group" style="flex: 0 1 auto; max-width: 190px">
|
||||
<label for="sch-group">Группа</label>
|
||||
<select id="sch-group" required>
|
||||
<option value="">Выберите группу</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Дисциплина -->
|
||||
<div class="form-group" style="flex: 0 1 auto; max-width: 220px">
|
||||
<label for="sch-discipline">Дисциплина</label>
|
||||
<select id="sch-discipline" required>
|
||||
<option value="">Выберите дисциплину</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Аудитория -->
|
||||
<div class="form-group" style="flex: 0 1 auto; max-width: 215px">
|
||||
<label for="sch-classroom">Аудитория</label>
|
||||
<select id="sch-classroom" required>
|
||||
<option value="">Выберите аудиторию</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- День недели -->
|
||||
<div class="form-group" style="flex: 0 1 auto; max-width: 170px">
|
||||
<label for="sch-day">День недели</label>
|
||||
<select id="sch-day" required>
|
||||
<option value="">Выберите день</option>
|
||||
<option value="Понедельник">Понедельник</option>
|
||||
<option value="Вторник">Вторник</option>
|
||||
<option value="Среда">Среда</option>
|
||||
<option value="Четверг">Четверг</option>
|
||||
<option value="Пятница">Пятница</option>
|
||||
<option value="Суббота">Суббота</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Неделя -->
|
||||
<div class="form-group" style="flex: 0 1 auto; max-width: 192px">
|
||||
<label>Неделя</label>
|
||||
<div style="display: flex; gap: 0.2rem;">
|
||||
<label class="btn-checkbox">
|
||||
<input type="checkbox" name="schWeekType" value="Верхняя" id="sch-week-upper">
|
||||
<span class="checkbox-btn">Верхняя</span>
|
||||
</label>
|
||||
<label class="btn-checkbox">
|
||||
<input type="checkbox" name="schWeekType" value="Нижняя" id="sch-week-lower">
|
||||
<span class="checkbox-btn">Нижняя</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Тип занятия -->
|
||||
<div class="form-group" style="flex: 0 1 auto; max-width: 160px">
|
||||
<label for="sch-type">Тип занятия</label>
|
||||
<select id="sch-type" required>
|
||||
<option value="">Выберите тип</option>
|
||||
<option value="Практическая работа">Практическая</option>
|
||||
<option value="Лекция">Лекция</option>
|
||||
<option value="Лабораторная работа">Лабораторная</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Формат занятия -->
|
||||
<div class="form-group" style="flex: 0 1 auto; max-width: 170px">
|
||||
<label>Формат занятия</label>
|
||||
<div style="display: flex; gap: 0.2rem;">
|
||||
<label class="btn-checkbox">
|
||||
<input type="radio" name="schLessonFormat" value="Очно" id="sch-format-offline" checked>
|
||||
<span class="checkbox-btn">Очно</span>
|
||||
</label>
|
||||
<label class="btn-checkbox">
|
||||
<input type="radio" name="schLessonFormat" value="Онлайн" id="sch-format-online">
|
||||
<span class="checkbox-btn">Онлайн</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Время занятия -->
|
||||
<div class="form-group" style="flex: 0 0 auto; max-width: 235px">
|
||||
<label for="sch-time">Время занятия</label>
|
||||
<select id="sch-time" required disabled>
|
||||
<option value="">Сначала выберите день</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Кнопка Сохранить -->
|
||||
<div class="form-group" style="flex: 0 0 auto;">
|
||||
<button type="submit" class="btn-primary" style="white-space: nowrap;">Сохранить</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-alert" id="sch-add-alert" role="alert" style="margin-top: 1rem;"></div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Модалка 2: Занятия выбранного преподавателя -->
|
||||
<div class="cs-modal cs-modal-table card" id="sch-modal-lessons" style="display:none;">
|
||||
<div class="cs-modal-header">
|
||||
<h2 id="sch-teacher-name">Занятия преподавателя</h2>
|
||||
</div>
|
||||
<div class="lessons-container" id="sch-lessons-container">
|
||||
<div class="no-lessons">Выберите преподавателя для просмотра занятий</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card create-card">
|
||||
<div class="card-header-row">
|
||||
<h2 id="time-slot-form-title">Новый временной слот</h2>
|
||||
<button type="button" class="btn-edit-classroom" id="time-slot-reset">Очистить форму</button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="time-slot-form" novalidate>
|
||||
<input type="hidden" id="time-slot-id">
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="time-slot-order">Номер пары</label>
|
||||
<input type="number" id="time-slot-order" min="1" step="1" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="time-slot-start">Начало</label>
|
||||
<input type="time" id="time-slot-start" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="time-slot-end">Окончание</label>
|
||||
<input type="time" id="time-slot-end" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="time-slot-duration">Минут</label>
|
||||
<input type="number" id="time-slot-duration" min="1" step="1" placeholder="90">
|
||||
</div>
|
||||
<button type="submit" class="btn-primary">Сохранить слот</button>
|
||||
</div>
|
||||
<div class="form-alert" id="time-slot-alert" role="alert"></div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header-row">
|
||||
<h2>Сетка пар</h2>
|
||||
<button class="btn-primary" id="time-slots-refresh">Обновить</button>
|
||||
</div>
|
||||
<div class="table-wrap">
|
||||
<table id="time-slots-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Пара</th>
|
||||
<th>Начало</th>
|
||||
<th>Окончание</th>
|
||||
<th>Минут</th>
|
||||
<th>Действия</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="time-slots-tbody">
|
||||
<tr>
|
||||
<td colspan="5" class="loading-row">Загрузка...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card create-card">
|
||||
<h2 id="academic-year-form-title">Учебный год</h2>
|
||||
<form id="academic-year-form" novalidate>
|
||||
<input type="hidden" id="academic-year-id">
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="academic-year-title">Название</label>
|
||||
<input type="text" id="academic-year-title" placeholder="2026-2027" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="academic-year-start">Начало</label>
|
||||
<input type="date" id="academic-year-start" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="academic-year-end">Окончание</label>
|
||||
<input type="date" id="academic-year-end" required>
|
||||
</div>
|
||||
<button type="submit" class="btn-primary">Сохранить год</button>
|
||||
<button type="button" class="btn-edit-classroom" id="academic-year-reset">Очистить</button>
|
||||
</div>
|
||||
<div class="form-alert" id="academic-year-alert" role="alert"></div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header-row">
|
||||
<h2>Учебные годы</h2>
|
||||
<button class="btn-primary" id="academic-years-refresh">Обновить</button>
|
||||
</div>
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Название</th>
|
||||
<th>Период</th>
|
||||
<th>Семестры</th>
|
||||
<th>Действия</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="academic-years-tbody">
|
||||
<tr>
|
||||
<td colspan="4" class="loading-row">Загрузка...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card create-card">
|
||||
<h2 id="semester-form-title">Семестр</h2>
|
||||
<form id="semester-form" novalidate>
|
||||
<input type="hidden" id="semester-id">
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="semester-year">Учебный год</label>
|
||||
<select id="semester-year" required>
|
||||
<option value="">Загрузка...</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="semester-type">Тип семестра</label>
|
||||
<select id="semester-type" required>
|
||||
<option value="autumn">Осенний</option>
|
||||
<option value="spring">Весенний</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="semester-start">Начало</label>
|
||||
<input type="date" id="semester-start" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="semester-end">Окончание</label>
|
||||
<input type="date" id="semester-end" required>
|
||||
</div>
|
||||
<button type="submit" class="btn-primary">Сохранить семестр</button>
|
||||
<button type="button" class="btn-edit-classroom" id="semester-reset">Очистить</button>
|
||||
</div>
|
||||
<div class="form-alert" id="semester-alert" role="alert"></div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card create-card">
|
||||
<h2 id="holiday-form-title">Праздники и исключения</h2>
|
||||
<form id="holiday-form" novalidate>
|
||||
<input type="hidden" id="holiday-id">
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="holiday-year">Учебный год</label>
|
||||
<select id="holiday-year" required>
|
||||
<option value="">Загрузка...</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="holiday-date">Дата</label>
|
||||
<input type="date" id="holiday-date" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="holiday-description">Описание</label>
|
||||
<input type="text" id="holiday-description" placeholder="Праздничный день">
|
||||
</div>
|
||||
<button type="submit" class="btn-primary">Сохранить дату</button>
|
||||
<button type="button" class="btn-edit-classroom" id="holiday-reset">Очистить</button>
|
||||
</div>
|
||||
<div class="form-alert" id="holiday-alert" role="alert"></div>
|
||||
</form>
|
||||
<div class="table-wrap schedule-inline-table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Дата</th>
|
||||
<th>Описание</th>
|
||||
<th>Действия</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="holidays-tbody">
|
||||
<tr>
|
||||
<td colspan="3" class="loading-row">Выберите учебный год</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card create-card">
|
||||
<h2>Матрица учебного графика</h2>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="matrix-semester">Семестр</label>
|
||||
<select id="matrix-semester">
|
||||
<option value="">Загрузка...</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="matrix-course">Курс</label>
|
||||
<input type="number" id="matrix-course" min="1" step="1" placeholder="1">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="matrix-specialty">Специальность</label>
|
||||
<select id="matrix-specialty">
|
||||
<option value="">Загрузка...</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="button" class="btn-primary" id="matrix-load">Загрузить</button>
|
||||
<button type="button" class="btn-primary" id="matrix-save">Сохранить</button>
|
||||
</div>
|
||||
<div class="form-alert" id="matrix-alert" role="alert"></div>
|
||||
<div id="matrix-grid" class="matrix-grid"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user