обновил дизайн, добавил дашборд

This commit is contained in:
Zuev
2026-05-31 16:18:27 +03:00
parent e2a3553a09
commit 7926038bdc
36 changed files with 2364 additions and 1184 deletions

View File

@@ -16,7 +16,7 @@
<div class="form-group workload-display-control">
<label for="workload-display-select">Отображение</label>
<select id="workload-display-select" class="workload-display-select" data-native-select="true">
<select id="workload-display-select" class="workload-display-select">
<option value="all">Все аудитории</option>
</select>
</div>
@@ -37,18 +37,8 @@
</div>
<div class="form-group workload-overview-filter">
<label>Вместимость</label>
<div class="custom-multi-select">
<div class="select-box" id="capacity-box">
<span class="select-text" id="capacity-text">Любая вместимость</span>
<svg class="dropdown-icon" width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 1.5L6 6.5L11 1.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
<div class="dropdown-menu" id="capacity-menu">
<div id="capacity-checkboxes" class="checkbox-group-vertical"></div>
</div>
</div>
<label for="workload-min-capacity">Мин. вместимость</label>
<input type="number" id="workload-min-capacity" placeholder="0" min="0" style="width: 100px;">
</div>
<div class="form-group workload-overview-filter">

View File

@@ -1,6 +1,9 @@
<!-- ===== Classrooms Tab ===== -->
<div class="card create-card">
<h2>Новая аудитория</h2>
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem;">
<h2 style="margin: 0;">Новая аудитория</h2>
<button type="button" class="btn-primary" id="btn-manage-equipments">Справочник оборудования</button>
</div>
<form id="create-classroom-form">
<div class="form-row">
<div class="form-group">
@@ -106,4 +109,47 @@
<div class="form-alert" id="edit-classroom-alert" role="alert"></div>
</form>
</div>
</div>
<!-- Модальное окно управления Оборудованием -->
<div class="modal-overlay" id="modal-manage-equipments">
<div class="modal-content card" style="max-width: 600px; width: 90%;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;">
<h2>Справочник оборудования</h2>
<button class="modal-close" id="modal-manage-equipments-close" style="position: static; font-size: 2rem; background: none; border: none; cursor: pointer; color: var(--text-secondary);">&times;</button>
</div>
<!-- Форма добавления -->
<div class="card create-card" style="margin-bottom: 1.5rem; background: var(--bg-secondary);">
<h3 style="margin-top: 0;">Добавить оборудование</h3>
<form id="manage-equipment-form">
<div class="form-row" style="align-items: flex-end;">
<div class="form-group" style="margin-bottom: 0;">
<label for="manage-equipment-name">Название оборудования</label>
<input type="text" id="manage-equipment-name" placeholder="Проектор" required>
</div>
<button type="submit" class="btn-primary" style="height: fit-content; margin-bottom: 0;">Добавить</button>
</div>
<div class="form-alert" id="manage-equipment-alert" role="alert"></div>
</form>
</div>
<!-- Таблица оборудования -->
<div class="table-wrap">
<table id="manage-equipments-table">
<thead>
<tr>
<th>ID</th>
<th>Название</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="manage-equipments-tbody">
<tr>
<td colspan="3" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@@ -0,0 +1,145 @@
<!-- ===== Dashboard Page ===== -->
<div class="dashboard-container" style="display: flex; flex-direction: column; gap: 1.5rem;">
<!-- Метрики (Информационные карточки) -->
<div class="metrics-grid" style="display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem;">
<div class="metric-card card" style="display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border-left: 4px solid var(--primary);">
<div class="metric-icon" style="background: rgba(99, 102, 241, 0.1); color: var(--primary); padding: 0.75rem; border-radius: 12px; display: flex; align-items: center; justify-content: center;">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" />
<circle cx="9" cy="7" r="4" />
<path d="M23 21v-2a4 4 0 0 0-3-3.87" />
<path d="M16 3.13a4 4 0 0 1 0 7.75" />
</svg>
</div>
<div>
<div style="font-size: 0.85rem; color: var(--text-secondary); font-weight: 500;">Активные группы</div>
<h3 id="metric-groups" style="margin: 0.25rem 0 0; font-size: 1.5rem; font-weight: 700;"></h3>
</div>
</div>
<div class="metric-card card" style="display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border-left: 4px solid #10b981;">
<div class="metric-icon" style="background: rgba(16, 185, 129, 0.1); color: #10b981; padding: 0.75rem; border-radius: 12px; display: flex; align-items: center; justify-content: center;">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" />
<circle cx="9" cy="7" r="4" />
<path d="M22 21v-2a4 4 0 0 0-3-3.87" />
<path d="M16 3.13a4 4 0 0 1 0 7.75" />
</svg>
</div>
<div>
<div style="font-size: 0.85rem; color: var(--text-secondary); font-weight: 500;">Всего студентов</div>
<h3 id="metric-students" style="margin: 0.25rem 0 0; font-size: 1.5rem; font-weight: 700;"></h3>
</div>
</div>
<div class="metric-card card" style="display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border-left: 4px solid #f59e0b;">
<div class="metric-icon" style="background: rgba(245, 158, 11, 0.1); color: #f59e0b; padding: 0.75rem; border-radius: 12px; display: flex; align-items: center; justify-content: center;">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" />
<circle cx="12" cy="7" r="4" />
</svg>
</div>
<div>
<div style="font-size: 0.85rem; color: var(--text-secondary); font-weight: 500;">Преподаватели</div>
<h3 id="metric-teachers" style="margin: 0.25rem 0 0; font-size: 1.5rem; font-weight: 700;"></h3>
</div>
</div>
<div class="metric-card card" style="display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border-left: 4px solid #3b82f6;">
<div class="metric-icon" style="background: rgba(59, 130, 246, 0.1); color: #3b82f6; padding: 0.75rem; border-radius: 12px; display: flex; align-items: center; justify-content: center;">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect width="18" height="18" x="3" y="3" rx="2" />
<path d="M9 3v18M15 3v18M3 9h18M3 15h18" />
</svg>
</div>
<div>
<div style="font-size: 0.85rem; color: var(--text-secondary); font-weight: 500;">Загрузка аудиторий сегодня</div>
<h3 id="metric-classrooms" style="margin: 0.25rem 0 0; font-size: 1.5rem; font-weight: 700;"></h3>
</div>
</div>
</div>
<!-- Мониторинг в реальном времени и Быстрый переход -->
<div class="dashboard-middle" style="display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; align-items: start;">
<!-- Идет сейчас -->
<div class="card" style="min-height: 250px; display: flex; flex-direction: column;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;">
<h2 style="margin: 0;">Мониторинг пар (Идет сейчас)</h2>
<div id="current-time-slot" style="background: var(--bg-secondary); padding: 0.35rem 0.75rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; color: var(--primary);"></div>
</div>
<div class="table-wrap" style="flex: 1;">
<table style="width: 100%; border-collapse: collapse;">
<thead>
<tr>
<th style="text-align: left; padding: 0.75rem;">Аудитория</th>
<th style="text-align: left; padding: 0.75rem;">Дисциплина</th>
<th style="text-align: left; padding: 0.75rem;">Преподаватель</th>
<th style="text-align: left; padding: 0.75rem;">Группа</th>
</tr>
</thead>
<tbody id="current-lessons-tbody">
<tr>
<td colspan="4" class="loading-row" style="padding: 2rem; text-align: center; color: var(--text-secondary);">Определение текущего времени...</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Свободные аудитории и Быстрые действия -->
<div style="display: flex; flex-direction: column; gap: 1.25rem;">
<!-- Свободные аудитории -->
<div class="card" style="padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem;">
<h3 style="margin: 0; font-size: 1.1rem; font-weight: 600;">Свободные аудитории (ближайшие)</h3>
<div id="free-classrooms-list" style="display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem;">
<div style="color: var(--text-secondary); font-size: 0.9rem;">Загрузка...</div>
</div>
</div>
<!-- Быстрые действия -->
<div class="card" style="padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem;">
<h3 style="margin: 0; font-size: 1.1rem; font-weight: 600;">Быстрый переход</h3>
<div style="display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-top: 0.5rem;">
<a href="#schedule" class="btn-primary" style="display: flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none; text-align: center; font-size: 0.9rem; padding: 0.6rem;">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
Конструктор расписания
</a>
<a href="#schedule-view" class="btn-secondary" style="display: flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none; text-align: center; font-size: 0.9rem; padding: 0.6rem;">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z" />
<circle cx="12" cy="12" r="3" />
</svg>
Точечные изменения / Просмотр
</a>
</div>
</div>
</div>
</div>
<!-- Центр предупреждений и конфликтов (Red Zone) -->
<div class="card red-zone-card" style="border-top: 4px solid var(--error, #ef4444);">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;">
<div>
<h2 style="margin: 0; display: flex; align-items: center; gap: 0.5rem;">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ef4444" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" />
<line x1="12" y1="8" x2="12" y2="12" />
<line x1="12" y1="16" x2="12.01" y2="16" />
</svg>
Центр предупреждений (Red Zone)
</h2>
<div style="color: var(--text-secondary); font-size: 0.85rem; margin-top: 0.25rem;">Анализ накладок и коллизий расписания на текущую неделю</div>
</div>
<button class="btn-primary" id="btn-recheck-conflicts" style="font-size: 0.85rem; padding: 0.35rem 0.75rem;">Перепроверить</button>
</div>
<div id="conflicts-container" style="display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem;">
<div class="loading-row" style="text-align: center; padding: 2rem; color: var(--text-secondary);">Анализ расписания и выявление конфликтов...</div>
</div>
</div>
</div>

View File

@@ -1,73 +0,0 @@
<!-- ===== Database / Tenants Tab ===== -->
<!-- Текущее подключение -->
<div class="card">
<h2>Текущее подключение</h2>
<div id="db-status-info" class="db-status-card">
<div class="loading-row">Загрузка...</div>
</div>
</div>
<!-- Таблица тенантов -->
<div class="card">
<h2>Подключённые университеты</h2>
<div class="table-wrap">
<table id="tenants-table">
<thead>
<tr>
<th>Название</th>
<th>Домен</th>
<th>JDBC URL</th>
<th>Пользователь</th>
<th>Статус</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="tenants-tbody">
<tr>
<td colspan="6" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Добавить тенант -->
<div class="card create-card">
<h2>Добавить подключение</h2>
<form id="add-tenant-form">
<div class="form-row">
<div class="form-group">
<label for="tenant-name">Название университета</label>
<input type="text" id="tenant-name" placeholder="ЮЗГУ" required>
</div>
<div class="form-group">
<label for="tenant-domain">Поддомен</label>
<input type="text" id="tenant-domain" placeholder="swsu" required>
</div>
</div>
<div class="form-row" style="margin-top: 0.75rem;">
<div class="form-group" style="flex: 3;">
<label for="tenant-url">JDBC URL</label>
<input type="text" id="tenant-url" placeholder="jdbc:postgresql://192.168.1.50:5432/magistr_db" required>
</div>
</div>
<div class="form-row" style="margin-top: 0.75rem;">
<div class="form-group">
<label for="tenant-username">Пользователь</label>
<input type="text" id="tenant-username" placeholder="postgres" required>
</div>
<div class="form-group">
<label for="tenant-password">Пароль</label>
<input type="password" id="tenant-password" placeholder="••••••••" required>
</div>
<button type="button" class="btn-primary" id="btn-test-connection" style="height: fit-content;">
Тест
</button>
<button type="submit" class="btn-primary" style="height: fit-content;">
Добавить
</button>
</div>
<div class="form-alert" id="add-tenant-alert" role="alert"></div>
</form>
</div>

View File

@@ -1,126 +0,0 @@
<!-- ===== Departments and Specialties Tab ===== -->
<div class="card create-card">
<h2>Создание кафедры</h2>
<form id="create-department-form">
<div class="form-row">
<div class="form-group">
<label for="dept-name">Название кафедры</label>
<input type="text" id="dept-name" placeholder="Например: Кафедра ИБ" required>
</div>
<div class="form-group">
<label for="dept-code">Код кафедры</label>
<input type="number" id="dept-code" placeholder="Например: 1" required>
</div>
<button type="submit" class="btn-primary">Создать</button>
</div>
<div class="form-alert" id="create-dept-alert" role="alert"></div>
</form>
</div>
<div class="card">
<div class="card-header-row">
<h2>Кафедры</h2>
</div>
<div class="table-wrap">
<table id="departments-table">
<thead>
<tr>
<th>ID</th>
<th>Название</th>
<th>Код</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="departments-tbody">
<tr>
<td colspan="4" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card create-card">
<h2>Создание специальности</h2>
<form id="create-specialty-form">
<div class="form-row">
<div class="form-group">
<label for="spec-name">Название специальности</label>
<input type="text" id="spec-name" placeholder="Например: Программная инженерия" required>
</div>
<div class="form-group">
<label for="spec-code">Код специальности</label>
<input type="text" id="spec-code" placeholder="Например: 09.03.04" required>
</div>
<button type="submit" class="btn-primary">Создать</button>
</div>
<div class="form-alert" id="create-spec-alert" role="alert"></div>
</form>
</div>
<div class="card">
<div class="card-header-row">
<h2>Специальности</h2>
</div>
<div class="table-wrap">
<table id="specialties-table">
<thead>
<tr>
<th>ID</th>
<th>Название</th>
<th>Код специальности</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="specialties-tbody">
<tr>
<td colspan="4" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-overlay" id="modal-edit-department">
<div class="modal-content card">
<h2>Редактирование кафедры</h2>
<button class="modal-close" id="modal-edit-department-close">&times;</button>
<form id="edit-department-form">
<input type="hidden" id="edit-dept-id">
<div class="form-row">
<div class="form-group">
<label for="edit-dept-name">Название кафедры</label>
<input type="text" id="edit-dept-name" required>
</div>
<div class="form-group">
<label for="edit-dept-code">Код кафедры</label>
<input type="number" id="edit-dept-code" required>
</div>
<button type="submit" class="btn-primary">Сохранить</button>
</div>
<div class="form-alert" id="edit-dept-alert" role="alert"></div>
</form>
</div>
</div>
<div class="modal-overlay" id="modal-edit-specialty">
<div class="modal-content card">
<h2>Редактирование специальности</h2>
<button class="modal-close" id="modal-edit-specialty-close">&times;</button>
<form id="edit-specialty-form">
<input type="hidden" id="edit-spec-id">
<div class="form-row">
<div class="form-group">
<label for="edit-spec-name">Название специальности</label>
<input type="text" id="edit-spec-name" required>
</div>
<div class="form-group">
<label for="edit-spec-code">Код специальности</label>
<input type="text" id="edit-spec-code" required>
</div>
<button type="submit" class="btn-primary">Сохранить</button>
</div>
<div class="form-alert" id="edit-spec-alert" role="alert"></div>
</form>
</div>
</div>

View File

@@ -1,34 +0,0 @@
<!-- ===== Education Forms Tab ===== -->
<div class="card create-card">
<h2>Новая форма обучения</h2>
<form id="create-ef-form">
<div class="form-row">
<div class="form-group">
<label for="new-ef-name">Название</label>
<input type="text" id="new-ef-name" placeholder="Бакалавриат" required>
</div>
<button type="submit" class="btn-primary">Создать</button>
</div>
<div class="form-alert" id="create-ef-alert" role="alert"></div>
</form>
</div>
<div class="card">
<h2>Все формы обучения</h2>
<div class="table-wrap">
<table id="ef-table">
<thead>
<tr>
<th>ID</th>
<th>Название</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="ef-tbody">
<tr>
<td colspan="3" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@@ -1,34 +0,0 @@
<!-- ===== Equipments Tab ===== -->
<div class="card create-card">
<h2>Новое оборудование</h2>
<form id="create-equipment-form">
<div class="form-row">
<div class="form-group">
<label for="new-equipment-name">Название оборудования</label>
<input type="text" id="new-equipment-name" placeholder="Проектор" required>
</div>
<button type="submit" class="btn-primary">Добавить</button>
</div>
<div class="form-alert" id="create-equipment-alert" role="alert"></div>
</form>
</div>
<div class="card">
<h2>Справочник оборудования</h2>
<div class="table-wrap">
<table id="equipments-table">
<thead>
<tr>
<th>ID</th>
<th>Название</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="equipments-tbody">
<tr>
<td colspan="3" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@@ -80,93 +80,6 @@
</div>
</div>
<div class="card create-card">
<h2>Подгруппы для лабораторных</h2>
<form id="subgroup-form">
<input type="hidden" id="subgroup-id">
<div class="form-row">
<div class="form-group">
<label for="subgroup-group">Группа</label>
<select id="subgroup-group">
<option value="">Загрузка...</option>
</select>
</div>
<div class="form-group">
<label for="subgroup-name">Название подгруппы</label>
<input type="text" id="subgroup-name" placeholder="Подгруппа 1" required>
</div>
<div class="form-group">
<label for="subgroup-capacity">Численность</label>
<input type="number" id="subgroup-capacity" min="0" placeholder="12">
</div>
<button type="submit" class="btn-primary" id="subgroup-submit">Создать подгруппу</button>
<button type="button" class="btn-edit-classroom" id="subgroup-reset">Очистить</button>
</div>
<div class="form-alert" id="subgroup-alert" role="alert"></div>
</form>
<div class="table-wrap schedule-inline-table">
<table>
<thead>
<tr>
<th>Группа</th>
<th>Подгруппа</th>
<th>Численность</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="subgroups-tbody">
<tr>
<td colspan="4" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card create-card">
<h2>Назначение календарного графика</h2>
<form id="group-calendar-form">
<div class="form-row">
<div class="form-group">
<label for="calendar-group">Группа</label>
<select id="calendar-group">
<option value="">Загрузка...</option>
</select>
</div>
<div class="form-group">
<label for="calendar-year">Учебный год</label>
<select id="calendar-year">
<option value="">Загрузка...</option>
</select>
</div>
<div class="form-group">
<label for="calendar-id">Календарный график</label>
<select id="calendar-id">
<option value="">Выберите группу и год</option>
</select>
</div>
<button type="submit" class="btn-primary">Назначить</button>
</div>
<div class="form-alert" id="group-calendar-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="group-calendar-tbody">
<tr>
<td colspan="3" class="loading-row">Выберите группу</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Модальное окно редактирования группы -->
<div class="modal-overlay" id="modal-edit-group">
<div class="modal-content card">
@@ -221,3 +134,113 @@
</form>
</div>
</div>
<!-- Модальное окно управления Подгруппами -->
<div class="modal-overlay" id="modal-manage-subgroups">
<div class="modal-content card" style="max-width: 700px; width: 90%;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;">
<div>
<h2>Подгруппы группы</h2>
<div id="subgroups-group-context" style="color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.25rem;"></div>
</div>
<button class="modal-close" id="modal-manage-subgroups-close" style="position: static; font-size: 2rem; background: none; border: none; cursor: pointer; color: var(--text-secondary);">&times;</button>
</div>
<!-- Форма -->
<div class="card create-card" style="margin-bottom: 1.5rem; background: var(--bg-secondary);">
<h3 id="subgroup-form-title" style="margin-top: 0;">Создание подгруппы</h3>
<form id="manage-subgroup-form">
<input type="hidden" id="manage-subgroup-id">
<input type="hidden" id="manage-subgroup-group-id">
<div class="form-row" style="align-items: flex-end;">
<div class="form-group" style="margin-bottom: 0;">
<label for="manage-subgroup-name">Название подгруппы</label>
<input type="text" id="manage-subgroup-name" placeholder="Подгруппа 1" required>
</div>
<div class="form-group" style="margin-bottom: 0;">
<label for="manage-subgroup-capacity">Численность (чел.)</label>
<input type="number" id="manage-subgroup-capacity" min="1" placeholder="12" required>
</div>
<div style="display: flex; gap: 0.5rem; margin-bottom: 0;">
<button type="submit" class="btn-primary" id="btn-save-subgroup">Создать</button>
<button type="button" class="btn-secondary" id="btn-cancel-subgroup-edit" style="display: none;">Отмена</button>
</div>
</div>
<div class="form-alert" id="manage-subgroup-alert" role="alert"></div>
</form>
</div>
<!-- Таблица -->
<div class="table-wrap">
<table id="manage-subgroups-table">
<thead>
<tr>
<th>Подгруппа</th>
<th>Численность</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="manage-subgroups-tbody">
<tr>
<td colspan="3" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Модальное окно назначения Календарного графика -->
<div class="modal-overlay" id="modal-manage-calendar">
<div class="modal-content card" style="max-width: 800px; width: 90%;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;">
<div>
<h2>Календарные графики группы</h2>
<div id="calendar-group-context" style="color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.25rem;"></div>
</div>
<button class="modal-close" id="modal-manage-calendar-close" style="position: static; font-size: 2rem; background: none; border: none; cursor: pointer; color: var(--text-secondary);">&times;</button>
</div>
<!-- Форма -->
<div class="card create-card" style="margin-bottom: 1.5rem; background: var(--bg-secondary);">
<h3 style="margin-top: 0;">Назначить график</h3>
<form id="manage-calendar-form">
<input type="hidden" id="manage-calendar-group-id">
<div class="form-row" style="align-items: flex-end;">
<div class="form-group" style="margin-bottom: 0;">
<label for="manage-calendar-year">Учебный год</label>
<select id="manage-calendar-year" required>
<option value="">Загрузка...</option>
</select>
</div>
<div class="form-group" style="flex: 2; margin-bottom: 0;">
<label for="manage-calendar-id">Календарный график</label>
<select id="manage-calendar-id" required>
<option value="">Выберите учебный год</option>
</select>
</div>
<button type="submit" class="btn-primary" style="height: fit-content; margin-bottom: 0;">Назначить</button>
</div>
<div class="form-alert" id="manage-calendar-alert" role="alert"></div>
</form>
</div>
<!-- Таблица -->
<div class="table-wrap">
<table id="manage-calendar-table">
<thead>
<tr>
<th>Учебный год</th>
<th>График</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="manage-calendar-tbody">
<tr>
<td colspan="3" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@@ -1,72 +0,0 @@
<div class="card create-card">
<div class="card-header-row">
<h2>Создание профиля обучения</h2>
</div>
<form id="create-profile-form">
<div class="form-row">
<div class="form-group">
<label for="profile-specialty">Специальность</label>
<select id="profile-specialty" required>
<option value="">Загрузка специальностей...</option>
</select>
</div>
<div class="form-group">
<label for="profile-name">Название профиля</label>
<input type="text" id="profile-name" placeholder="Безопасность автоматизированных систем" required>
</div>
<div class="form-group">
<label for="profile-description">Описание</label>
<input type="text" id="profile-description" placeholder="Необязательно">
</div>
<button type="submit" class="btn-primary">Создать профиль</button>
</div>
<div class="form-alert" id="create-profile-alert" role="alert"></div>
</form>
</div>
<div class="card">
<div class="card-header-row">
<h2>Профили выбранной специальности</h2>
<button class="btn-primary" id="profiles-refresh" type="button">Обновить</button>
</div>
<div class="profiles-context" id="profiles-context"></div>
<div class="table-wrap">
<table id="profiles-table">
<thead>
<tr>
<th>ID</th>
<th>Профиль</th>
<th>Описание</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="profiles-tbody">
<tr>
<td colspan="4" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-overlay" id="modal-edit-profile">
<div class="modal-content card">
<h2>Редактирование профиля</h2>
<button class="modal-close" id="modal-edit-profile-close">&times;</button>
<form id="edit-profile-form">
<input type="hidden" id="edit-profile-id">
<div class="form-row">
<div class="form-group">
<label for="edit-profile-name">Название профиля</label>
<input type="text" id="edit-profile-name" required>
</div>
<div class="form-group">
<label for="edit-profile-description">Описание</label>
<input type="text" id="edit-profile-description">
</div>
<button type="submit" class="btn-primary">Сохранить</button>
</div>
<div class="form-alert" id="edit-profile-alert" role="alert"></div>
</form>
</div>
</div>

View File

@@ -11,7 +11,7 @@
<div class="schedule-view-control-grid">
<div class="form-group">
<label for="schedule-view-target">Что смотреть</label>
<select id="schedule-view-target" data-native-select="true">
<select id="schedule-view-target">
<option value="groups">Группа</option>
<option value="teachers">Преподаватель</option>
<option value="classrooms">Аудитория</option>
@@ -21,45 +21,33 @@
<div class="form-group schedule-view-entity-field" data-schedule-view-target-field="groups">
<label for="schedule-view-group">Группа</label>
<select id="schedule-view-group" data-native-select="true">
<select id="schedule-view-group">
<option value="">Все группы</option>
</select>
</div>
<div class="form-group schedule-view-entity-field" data-schedule-view-target-field="teachers" hidden>
<label for="schedule-view-teacher">Преподаватель</label>
<select id="schedule-view-teacher" data-native-select="true">
<select id="schedule-view-teacher">
<option value="">Все преподаватели</option>
</select>
</div>
<div class="form-group schedule-view-entity-field" data-schedule-view-target-field="classrooms" hidden>
<label for="schedule-view-classroom">Аудитория</label>
<select id="schedule-view-classroom" data-native-select="true">
<select id="schedule-view-classroom">
<option value="">Все аудитории</option>
</select>
</div>
<div class="form-group schedule-view-entity-field" data-schedule-view-target-field="departments" hidden>
<label for="schedule-view-department">Кафедра</label>
<select id="schedule-view-department" data-native-select="true">
<select id="schedule-view-department">
<option value="">Все кафедры</option>
</select>
</div>
<div class="form-group">
<label for="schedule-view-date">Дата в периоде</label>
<input type="date" id="schedule-view-date">
</div>
<div class="form-group schedule-view-period-control">
<span class="form-label">Переход</span>
<div class="schedule-view-period-buttons">
<button type="button" class="btn-secondary" id="schedule-view-prev-period" aria-label="Предыдущий период"></button>
<button type="button" class="btn-secondary" id="schedule-view-today">Сегодня</button>
<button type="button" class="btn-secondary" id="schedule-view-next-period" aria-label="Следующий период"></button>
</div>
</div>
<input type="date" id="schedule-view-date" style="display: none;">
</div>
<details class="schedule-view-extra-filters">
@@ -67,19 +55,19 @@
<div class="schedule-view-extra-grid">
<div class="form-group">
<label for="schedule-view-subject">Дисциплина</label>
<select id="schedule-view-subject" data-native-select="true">
<select id="schedule-view-subject">
<option value="">Все дисциплины</option>
</select>
</div>
<div class="form-group">
<label for="schedule-view-lesson-type">Тип занятия</label>
<select id="schedule-view-lesson-type" data-native-select="true">
<select id="schedule-view-lesson-type">
<option value="">Все типы</option>
</select>
</div>
<div class="form-group">
<label for="schedule-view-parity">Неделя</label>
<select id="schedule-view-parity" data-native-select="true">
<select id="schedule-view-parity">
<option value="">Любая</option>
<option value="BOTH">Каждая</option>
<option value="ODD">Нечётная</option>

View File

@@ -12,8 +12,10 @@
<input type="text" id="new-subject-code" placeholder="Например: MATH101" required>
</div>
<div class="form-group">
<label for="new-subject-department">Идентификатор кафедры</label>
<input type="number" id="new-subject-department" placeholder="ID кафедры" required>
<label for="new-subject-department">Кафедра</label>
<select id="new-subject-department" required>
<option value="">Загрузка...</option>
</select>
</div>
<button type="submit" class="btn-primary">Добавить</button>
</div>
@@ -21,28 +23,6 @@
</form>
</div>
<div class="card create-card">
<h2>Привязка преподавателя к дисциплине</h2>
<form id="assign-teacher-form">
<div class="form-row">
<div class="form-group">
<label for="assign-teacher-select">Преподаватель</label>
<select id="assign-teacher-select">
<option value="">Загрузка...</option>
</select>
</div>
<div class="form-group">
<label for="assign-subject-select">Дисциплина</label>
<select id="assign-subject-select">
<option value="">Загрузка...</option>
</select>
</div>
<button type="submit" class="btn-primary">Привязать</button>
</div>
<div class="form-alert" id="assign-teacher-alert" role="alert"></div>
</form>
</div>
<div class="card">
<h2>Все дисциплины</h2>
<div class="table-wrap">
@@ -52,35 +32,64 @@
<th>ID</th>
<th>Название</th>
<th>Код предмета</th>
<th>Кафедра (ID)</th>
<th>Действия</th>
<th>Кафедра</th>
<th>Преподаватели</th>
<th style="text-align: right;">Действия</th>
</tr>
</thead>
<tbody id="subjects-tbody">
<tr>
<td colspan="5" class="loading-row">Загрузка...</td>
<td colspan="6" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card">
<h2>Привязки преподавателей</h2>
<div class="table-wrap">
<table id="teacher-subjects-table">
<thead>
<tr>
<th>Преподаватель</th>
<th>Дисциплина</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="teacher-subjects-tbody">
<tr>
<td colspan="3" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
<!-- Модальное окно привязки Преподавателей -->
<div class="modal-overlay" id="modal-manage-teachers">
<div class="modal-content card" style="max-width: 600px; width: 90%;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;">
<div>
<h2>Преподаватели дисциплины</h2>
<div id="subject-teachers-context" style="color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.25rem;"></div>
</div>
<button class="modal-close" id="modal-manage-teachers-close" style="position: static; font-size: 2rem; background: none; border: none; cursor: pointer; color: var(--text-secondary);">&times;</button>
</div>
<!-- Форма -->
<div class="card create-card" style="margin-bottom: 1.5rem; background: var(--bg-secondary);">
<h3 style="margin-top: 0;">Добавить привязку</h3>
<form id="manage-teacher-subject-form">
<input type="hidden" id="manage-ts-subject-id">
<div class="form-row" style="align-items: flex-end;">
<div class="form-group" style="margin-bottom: 0;">
<label for="manage-ts-teacher-select">Преподаватель</label>
<select id="manage-ts-teacher-select" required>
<option value="">Загрузка...</option>
</select>
</div>
<button type="submit" class="btn-primary" style="height: fit-content; margin-bottom: 0;">Привязать</button>
</div>
<div class="form-alert" id="manage-ts-alert" role="alert"></div>
</form>
</div>
<!-- Таблица -->
<div class="table-wrap">
<table id="manage-ts-table">
<thead>
<tr>
<th>Преподаватель</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="manage-ts-tbody">
<tr>
<td colspan="2" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@@ -0,0 +1,197 @@
<!-- ===== University Structure Tab (Departments, Specialties & Profiles) ===== -->
<div class="tab-container">
<div class="tabs-header-buttons" style="display: flex; gap: 1rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem;">
<button class="btn-tab active" id="btn-tab-departments" style="background: none; border: none; border-bottom: 2px solid var(--primary); color: var(--text-main); font-weight: 600; padding: 0.5rem 1rem; cursor: pointer;">Кафедры</button>
<button class="btn-tab" id="btn-tab-specialties" style="background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-secondary); font-weight: 500; padding: 0.5rem 1rem; cursor: pointer;">Специальности</button>
</div>
<!-- Раздел Кафедр -->
<div id="tab-content-departments" class="tab-content-section">
<div class="card create-card">
<h2>Создание кафедры</h2>
<form id="create-department-form">
<div class="form-row">
<div class="form-group">
<label for="dept-name">Название кафедры</label>
<input type="text" id="dept-name" placeholder="Например: Кафедра ИБ" required>
</div>
<div class="form-group">
<label for="dept-code">Код кафедры</label>
<input type="number" id="dept-code" placeholder="Например: 1" required>
</div>
<button type="submit" class="btn-primary">Создать</button>
</div>
<div class="form-alert" id="create-dept-alert" role="alert"></div>
</form>
</div>
<div class="card">
<div class="card-header-row">
<h2>Кафедры</h2>
</div>
<div class="table-wrap">
<table id="departments-table">
<thead>
<tr>
<th>ID</th>
<th>Название</th>
<th>Код</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="departments-tbody">
<tr>
<td colspan="4" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Раздел Специальностей -->
<div id="tab-content-specialties" class="tab-content-section" style="display: none;">
<div class="card create-card">
<h2>Создание специальности</h2>
<form id="create-specialty-form">
<div class="form-row">
<div class="form-group">
<label for="spec-name">Название специальности</label>
<input type="text" id="spec-name" placeholder="Например: Программная инженерия" required>
</div>
<div class="form-group">
<label for="spec-code">Код специальности</label>
<input type="text" id="spec-code" placeholder="Например: 09.03.04" required>
</div>
<button type="submit" class="btn-primary">Создать</button>
</div>
<div class="form-alert" id="create-spec-alert" role="alert"></div>
</form>
</div>
<div class="card">
<div class="card-header-row">
<h2>Специальности</h2>
</div>
<div class="table-wrap">
<table id="specialties-table">
<thead>
<tr>
<th>ID</th>
<th>Название</th>
<th>Код специальности</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="specialties-tbody">
<tr>
<td colspan="4" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Модальное окно редактирования кафедры -->
<div class="modal-overlay" id="modal-edit-department">
<div class="modal-content card">
<h2>Редактирование кафедры</h2>
<button class="modal-close" id="modal-edit-department-close">&times;</button>
<form id="edit-department-form">
<input type="hidden" id="edit-dept-id">
<div class="form-row">
<div class="form-group">
<label for="edit-dept-name">Название кафедры</label>
<input type="text" id="edit-dept-name" required>
</div>
<div class="form-group">
<label for="edit-dept-code">Код кафедры</label>
<input type="number" id="edit-dept-code" required>
</div>
<button type="submit" class="btn-primary">Сохранить</button>
</div>
<div class="form-alert" id="edit-dept-alert" role="alert"></div>
</form>
</div>
</div>
<!-- Модальное окно редактирования специальности -->
<div class="modal-overlay" id="modal-edit-specialty">
<div class="modal-content card">
<h2>Редактирование специальности</h2>
<button class="modal-close" id="modal-edit-specialty-close">&times;</button>
<form id="edit-specialty-form">
<input type="hidden" id="edit-spec-id">
<div class="form-row">
<div class="form-group">
<label for="edit-spec-name">Название специальности</label>
<input type="text" id="edit-spec-name" required>
</div>
<div class="form-group">
<label for="edit-spec-code">Код специальности</label>
<input type="text" id="edit-spec-code" required>
</div>
<button type="submit" class="btn-primary">Сохранить</button>
</div>
<div class="form-alert" id="edit-spec-alert" role="alert"></div>
</form>
</div>
</div>
<!-- Модальное окно управления Профилями специальности -->
<div class="modal-overlay" id="modal-manage-profiles">
<div class="modal-content card" style="max-width: 800px; width: 90%;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;">
<div>
<h2>Профили обучения</h2>
<div id="profiles-spec-context" style="color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.25rem;"></div>
</div>
<button class="modal-close" id="modal-manage-profiles-close" style="position: static; font-size: 2rem; background: none; border: none; cursor: pointer; color: var(--text-secondary);">&times;</button>
</div>
<!-- Форма создания/редактирования профиля -->
<div class="card create-card" style="margin-bottom: 1.5rem; background: var(--bg-secondary);">
<h3 id="profile-form-title">Создание профиля</h3>
<form id="manage-profile-form">
<input type="hidden" id="manage-profile-id">
<input type="hidden" id="manage-profile-spec-id">
<div class="form-row">
<div class="form-group">
<label for="manage-profile-name">Название профиля</label>
<input type="text" id="manage-profile-name" placeholder="Например: Искусственный интеллект" required>
</div>
<div class="form-group">
<label for="manage-profile-description">Описание</label>
<input type="text" id="manage-profile-description" placeholder="Необязательно">
</div>
<div style="display: flex; gap: 0.5rem; align-items: flex-end;">
<button type="submit" class="btn-primary" id="btn-save-profile">Создать</button>
<button type="button" class="btn-secondary" id="btn-cancel-profile-edit" style="display: none;">Отмена</button>
</div>
</div>
<div class="form-alert" id="manage-profile-alert" role="alert"></div>
</form>
</div>
<!-- Таблица профилей -->
<div class="table-wrap">
<table id="manage-profiles-table">
<thead>
<tr>
<th>ID</th>
<th>Название</th>
<th>Описание</th>
<th>Действия</th>
</tr>
</thead>
<tbody id="manage-profiles-tbody">
<tr>
<td colspan="4" class="loading-row">Загрузка...</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>