Co-authored-by: gorbenko.pavel <gorbenko.pavel@tansu.kz> Reviewed-on: http://git.tnsu.kz/timur.gorodetskiy/request-portal/pulls/23
This commit was merged in pull request #23.
This commit is contained in:
@@ -17,10 +17,12 @@ import {
|
||||
useRequestSubmit
|
||||
} from '../../shared/ui';
|
||||
import {
|
||||
composeRemoveRowRule,
|
||||
ApprovalMatrix,
|
||||
ApprovalHistory,
|
||||
StatusBadge,
|
||||
useMatrixEditor,
|
||||
canEditExecutors,
|
||||
getPlannedMatrix,
|
||||
notifyActiveStep,
|
||||
useRequestTypeId,
|
||||
@@ -327,7 +329,7 @@ const TmcTransferForm: React.FC<IRequestFormProps> = ({
|
||||
const executors = useMatrixEditor(
|
||||
loadExecutors,
|
||||
`${userEmail}-${editId ?? 'new'}-${projectId}-${targetProjectId}`,
|
||||
false,
|
||||
canEditExecutors(context, readOnly),
|
||||
executorsReady,
|
||||
(login) => approval.getJobTitle(login)
|
||||
);
|
||||
@@ -512,6 +514,7 @@ const TmcTransferForm: React.FC<IRequestFormProps> = ({
|
||||
|
||||
<ApprovalMatrix
|
||||
editor={matrix}
|
||||
canRemoveRow={composeRemoveRowRule(effectiveUserEmail(context))}
|
||||
search={(q) => approval.searchUsers(q)}
|
||||
waiting={!matrixReady}
|
||||
waitingText="Укажите заявителя и проект-источник («Откуда»), чтобы построить маршрут согласования."
|
||||
@@ -519,12 +522,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="Исполнители не заданы по маршруту."
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user