This commit is contained in:
Zuev
2026-10-02 04:07:56 +03:00
parent 97bf3cc50a
commit fc5801d683
42 changed files with 1201 additions and 305 deletions

View File

@@ -1,4 +1,5 @@
import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
import { CustomSelect } from '../../shared/ui/CustomSelect.jsx';
import { getSession } from '../../../admin/js/api.js';
import {
@@ -710,7 +711,7 @@ export function ScheduleViewTab() {
<div className="schedule-view-control-grid">
<div className="form-group">
<label htmlFor="schedule-view-target">Что смотреть</label>
<select
<CustomSelect
id="schedule-view-target"
value={activeTargetValue}
disabled={isDepartment}
@@ -720,7 +721,7 @@ export function ScheduleViewTab() {
<option value={TARGET_TEACHERS}>Преподаватель</option>
<option value={TARGET_CLASSROOMS}>Аудитория</option>
<option value={TARGET_DEPARTMENTS}>Кафедра</option>
</select>
</CustomSelect>
</div>
<div
@@ -793,7 +794,7 @@ export function ScheduleViewTab() {
hidden={activeTargetValue !== TARGET_DEPARTMENTS}
>
<label htmlFor="schedule-view-department">Кафедра</label>
<select
<CustomSelect
id="schedule-view-department"
value={departmentId}
disabled={isDepartment}
@@ -801,7 +802,7 @@ export function ScheduleViewTab() {
>
<option value="">Все кафедры</option>
{departmentOptions}
</select>
</CustomSelect>
</div>
<input
@@ -818,7 +819,7 @@ export function ScheduleViewTab() {
<div className="schedule-view-extra-grid">
<div className="form-group">
<label htmlFor="schedule-view-year">Учебный год</label>
<select id="schedule-view-year" value={yearId} onChange={handleYearChange}>
<CustomSelect id="schedule-view-year" value={yearId} onChange={handleYearChange}>
{!baseLoaded ? (
<option value="">Загрузка годов…</option>
) : (
@@ -828,11 +829,11 @@ export function ScheduleViewTab() {
))
: <option value="">Учебные годы не настроены</option>
)}
</select>
</CustomSelect>
</div>
<div className="form-group">
<label htmlFor="schedule-view-semester">Семестр</label>
<select id="schedule-view-semester" value={semesterId} onChange={handleSemesterChange}>
<CustomSelect id="schedule-view-semester" value={semesterId} onChange={handleSemesterChange}>
{!baseLoaded ? (
<option value="">Сначала выберите год</option>
) : (
@@ -844,11 +845,11 @@ export function ScheduleViewTab() {
))
: <option value="">Семестры не настроены</option>
)}
</select>
</CustomSelect>
</div>
<div className="form-group">
<label htmlFor="schedule-view-subject">Дисциплина</label>
<select
<CustomSelect
id="schedule-view-subject"
value={subjectId}
onChange={handleSimpleFilterChange('subjectId', setSubjectId)}
@@ -857,11 +858,11 @@ export function ScheduleViewTab() {
{subjects.map(subject => (
<option key={String(subject.id)} value={String(subject.id)}>{subject.name}</option>
))}
</select>
</CustomSelect>
</div>
<div className="form-group">
<label htmlFor="schedule-view-lesson-type">Тип занятия</label>
<select
<CustomSelect
id="schedule-view-lesson-type"
value={lessonTypeId}
onChange={handleSimpleFilterChange('lessonTypeId', setLessonTypeId)}
@@ -872,11 +873,11 @@ export function ScheduleViewTab() {
{lessonType.name}
</option>
))}
</select>
</CustomSelect>
</div>
<div className="form-group">
<label htmlFor="schedule-view-parity">Неделя</label>
<select
<CustomSelect
id="schedule-view-parity"
value={parity}
onChange={handleSimpleFilterChange('parity', setParity)}
@@ -885,7 +886,7 @@ export function ScheduleViewTab() {
<option value="BOTH">Каждая</option>
<option value="ODD">Нечётная</option>
<option value="EVEN">Чётная</option>
</select>
</CustomSelect>
</div>
</div>
</details>
@@ -1635,7 +1636,7 @@ const OverrideDrawer = forwardRef(function OverrideDrawer({
<div className="schedule-override-fields">
<div className="form-group">
<label htmlFor="schedule-override-time">Время</label>
<select
<CustomSelect
id="schedule-override-time"
required
disabled={timeSlotsLoading}
@@ -1652,7 +1653,7 @@ const OverrideDrawer = forwardRef(function OverrideDrawer({
))}
</>
)}
</select>
</CustomSelect>
</div>
<div className="form-group">
<label htmlFor="schedule-override-teacher">Преподаватель</label>
@@ -1692,14 +1693,14 @@ const OverrideDrawer = forwardRef(function OverrideDrawer({
</div>
<div className="form-group">
<label htmlFor="schedule-override-format">Формат</label>
<select
<CustomSelect
id="schedule-override-format"
value={lessonFormat}
onChange={event => setLessonFormat(event.target.value)}
>
<option value="Очно">Очно</option>
<option value="Онлайн">Онлайн</option>
</select>
</CustomSelect>
</div>
</div>