Merge branch 'main' of http://git.tnsu.kz/timur.gorodetskiy/request-portal
Tests / frontend-test (push) Successful in 2m2s

This commit is contained in:
Тимур Городецкий
2026-10-06 17:23:25 +05:00
85 changed files with 2152 additions and 171 deletions
@@ -17,10 +17,12 @@ import {
useRequestSubmit
} from '../../shared/ui';
import {
composeRemoveRowRule,
ApprovalMatrix,
ApprovalHistory,
StatusBadge,
useMatrixEditor,
canEditExecutors,
getPlannedMatrix,
notifyActiveStep,
useRequestTypeId,
@@ -329,7 +331,7 @@ const TmcTransferForm: React.FC<IRequestFormProps> = ({
const executors = useMatrixEditor(
loadExecutors,
`${userEmail}-${editId ?? 'new'}-${projectId}-${targetProjectId}`,
false,
canEditExecutors(context, readOnly),
executorsReady,
(login) => approval.getJobTitle(login)
);
@@ -511,6 +513,7 @@ const TmcTransferForm: React.FC<IRequestFormProps> = ({
<ApprovalMatrix
editor={matrix}
canRemoveRow={composeRemoveRowRule(effectiveUserEmail(context))}
search={(q) => approval.searchUsers(q)}
waiting={!matrixReady}
waitingText="Укажите заявителя и проект-источник («Откуда»), чтобы построить маршрут согласования."
@@ -518,12 +521,14 @@ const TmcTransferForm: React.FC<IRequestFormProps> = ({
{/* Блок исполнителя показываем, только когда по маршруту реально есть
исполнители (грузится по проектам, см. executorsReady). */}
{executorsReady && !executors.loading && executors.rows.length > 0 && (
{executorsReady && !executors.loading && (executors.editable || executors.rows.length > 0) && (
<ApprovalMatrix
editor={executors}
search={(q) => approval.searchUsers(q)}
title="Исполнение (после согласования)"
roleLabel="Исполнитель"
canRemoveRow={executors.editable ? () => true : undefined}
pickerPlaceholder="Добавить исполнителя: начните вводить ФИО…"
emptyText="Исполнители не заданы по маршруту."
/>
)}