всё по Созвону 14.10.2026
This commit is contained in:
1 parent
ac228ae0c3
commit
0bb2911353
54 files changed
+2837
-738
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import { GroupScheduleMatrix } from './GroupScheduleMatrix.jsx';
|
||||
import { confirmAbandonDirtyChanges } from '../../../admin/js/dirty-state.js';
|
||||
import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
||||
import { CustomSelect } from '../../shared/ui/CustomSelect.jsx';
|
||||
import { apiClient, clientWithSignal } from '../../shared/api-client.js';
|
||||
@@ -99,6 +101,14 @@ function restoredSelection(value) {
|
||||
// вкладка владеет реестром правок, а панель открывает занятие или реестр
|
||||
// через императивный handle и работает со справочниками через общий ref.
|
||||
export function ScheduleViewTab() {
|
||||
const [matrix, setMatrix] = useState(false);
|
||||
return <><div className="materials-actions schedule-view-modes" role="group" aria-label="Представление расписания">
|
||||
<button className={`btn btn-md ${matrix ? 'btn-secondary' : 'btn-primary'}`} aria-pressed={!matrix} onClick={async () => { if (await confirmAbandonDirtyChanges()) setMatrix(false); }}>Одна цель</button>
|
||||
<button className={`btn btn-md ${matrix ? 'btn-primary' : 'btn-secondary'}`} aria-pressed={matrix} onClick={async () => { if (await confirmAbandonDirtyChanges()) setMatrix(true); }}>Матрица групп</button>
|
||||
</div>{matrix ? <GroupScheduleMatrix /> : <SingleScheduleViewTab />}</>;
|
||||
}
|
||||
|
||||
function SingleScheduleViewTab() {
|
||||
const [session] = useState(() => getSession() || {});
|
||||
const role = session?.role;
|
||||
const userDepartmentId = normalizeId(session?.departmentId);
|
||||
|
||||
Reference in new issue
Block a user