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 { useEffect, useMemo, useRef, useState } from 'react';
import { CustomSelect } from '../../shared/ui/CustomSelect.jsx';
import { createPortal } from 'react-dom';
import { confirmAbandonDirtyChanges, createDirtyScope } from '../../../admin/js/dirty-state.js';
@@ -237,17 +238,17 @@ function CalendarDayDialog({
</div>
<div className="form-group">
<label htmlFor="calendar-day-dialog-activity">Код активности</label>
<select id="calendar-day-dialog-activity" value={common} onChange={onActivityChange}>
<CustomSelect id="calendar-day-dialog-activity" value={common} onChange={onActivityChange}>
<option value="">Выберите</option>
{activityTypes.map(type => (
<option key={type.id} value={type.id}>{`${type.code} - ${type.name}`}</option>
))}
</select>
</CustomSelect>
</div>
<div className="calendar-day-dialog-time-grid">
<div className="form-group">
<label htmlFor="calendar-day-dialog-time-scope">Временная сетка даты</label>
<select
<CustomSelect
id="calendar-day-dialog-time-scope"
value={scopeValue}
disabled={!isSingle}
@@ -263,7 +264,7 @@ function CalendarDayDialog({
) : (
<option value="">Для выделения доступен только код дня</option>
)}
</select>
</CustomSelect>
</div>
<div className="calendar-day-dialog-actions">
<button
@@ -1447,7 +1448,7 @@ export function AcademicCalendarTab() {
<div className="form-row">
<div className="form-group">
<label htmlFor="academic-calendar-year">Учебный год</label>
<select
<CustomSelect
id="academic-calendar-year"
required
value={calendarForm.yearId}
@@ -1466,11 +1467,11 @@ export function AcademicCalendarTab() {
) : (
<option value="">Загрузка...</option>
)}
</select>
</CustomSelect>
</div>
<div className="form-group">
<label htmlFor="academic-calendar-specialty">Специальность</label>
<select
<CustomSelect
id="academic-calendar-specialty"
required
value={calendarForm.specialtyId}
@@ -1492,11 +1493,11 @@ export function AcademicCalendarTab() {
) : (
<option value="">Загрузка...</option>
)}
</select>
</CustomSelect>
</div>
<div className="form-group">
<label htmlFor="academic-calendar-profile">Профиль</label>
<select
<CustomSelect
id="academic-calendar-profile"
required
value={calendarForm.profileId}
@@ -1515,11 +1516,11 @@ export function AcademicCalendarTab() {
) : (
<option value="">{profileEmptyLabel}</option>
)}
</select>
</CustomSelect>
</div>
<div className="form-group">
<label htmlFor="academic-calendar-study-form">Форма обучения</label>
<select
<CustomSelect
id="academic-calendar-study-form"
required
value={calendarForm.studyFormId}
@@ -1538,7 +1539,7 @@ export function AcademicCalendarTab() {
) : (
<option value="">Загрузка...</option>
)}
</select>
</CustomSelect>
</div>
<div className="form-group">
<label htmlFor="academic-calendar-course-count">Курсов</label>
@@ -1590,7 +1591,7 @@ export function AcademicCalendarTab() {
</div>
<div className="form-group">
<label htmlFor="academic-calendars-year-filter">Учебный год</label>
<select
<CustomSelect
id="academic-calendars-year-filter"
value={calendarYearFilter}
onChange={event => {
@@ -1604,7 +1605,7 @@ export function AcademicCalendarTab() {
{academicYears.map(year => (
<option key={year.id} value={year.id}>{year.title}</option>
))}
</select>
</CustomSelect>
</div>
</div>
<div className="table-wrap">
@@ -1899,7 +1900,7 @@ export function AcademicCalendarTab() {
<div className="calendar-fill-panel">
<div className="form-group">
<label htmlFor="calendar-fill-course">Курс</label>
<select
<CustomSelect
id="calendar-fill-course"
value={fillForm.course}
onChange={event => setFillForm(current => ({
@@ -1911,7 +1912,7 @@ export function AcademicCalendarTab() {
{fillCourseOptions.map(course => (
<option key={course} value={course}>{course} курс</option>
))}
</select>
</CustomSelect>
</div>
<div className="form-group">
<label htmlFor="calendar-fill-start">С даты</label>
@@ -1931,7 +1932,7 @@ export function AcademicCalendarTab() {
</div>
<div className="form-group">
<label htmlFor="calendar-fill-activity">Код</label>
<select
<CustomSelect
id="calendar-fill-activity"
value={fillForm.activityId}
onChange={event => setFillForm(current => ({
@@ -1951,7 +1952,7 @@ export function AcademicCalendarTab() {
) : (
<option value="">Загрузка...</option>
)}
</select>
</CustomSelect>
</div>
<button
type="button"
@@ -2053,7 +2054,7 @@ export function AcademicCalendarTab() {
</div>
<div className="form-group">
<label htmlFor="calendar-subject-semester">Семестр</label>
<select
<CustomSelect
id="calendar-subject-semester"
value={subjectSemester}
onChange={event => setSubjectSemester(event.target.value)}
@@ -2070,11 +2071,11 @@ export function AcademicCalendarTab() {
) : (
<option value="">Выберите график</option>
)}
</select>
</CustomSelect>
</div>
<div className="form-group">
<label htmlFor="calendar-subject-id">Дисциплина</label>
<select
<CustomSelect
id="calendar-subject-id"
value={sortedSubjects.some(item => String(item.id) === subjectIdValue)
? subjectIdValue
@@ -2097,7 +2098,7 @@ export function AcademicCalendarTab() {
) : (
<option value="">Загрузка...</option>
)}
</select>
</CustomSelect>
</div>
<button
type="button"