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:
@@ -21,6 +21,7 @@ import {
|
||||
ApprovalHistory,
|
||||
StatusBadge,
|
||||
useMatrixEditor,
|
||||
canEditExecutors,
|
||||
getPlannedMatrix,
|
||||
notifyActiveStep,
|
||||
useRequestTypeId,
|
||||
@@ -241,7 +242,7 @@ const ReferralForm: React.FC<IRequestFormProps> = ({
|
||||
const executors = useMatrixEditor(
|
||||
loadExecutors,
|
||||
`${data.Referrer}-${editId ?? 'new'}`,
|
||||
false,
|
||||
canEditExecutors(context, readOnly),
|
||||
!!editId || (!!data.Referrer && !!requestTypeId),
|
||||
(login) => approval.getJobTitle(login),
|
||||
resolveApproverOrgInfo(context)
|
||||
@@ -470,12 +471,14 @@ const ReferralForm: React.FC<IRequestFormProps> = ({
|
||||
canRemoveRow={canRemoveApprover ? () => true : undefined}
|
||||
/>
|
||||
|
||||
{!executors.loading && executors.rows.length > 0 && (
|
||||
{!executors.loading && (executors.editable || executors.rows.length > 0) && (
|
||||
<ApprovalMatrix
|
||||
editor={executors}
|
||||
search={(q) => approval.searchUsers(q)}
|
||||
title={noApprovalPhase ? 'Исполнение' : 'Исполнение (после согласования)'}
|
||||
roleLabel="Исполнитель"
|
||||
canRemoveRow={executors.editable ? () => true : undefined}
|
||||
pickerPlaceholder="Добавить исполнителя: начните вводить ФИО…"
|
||||
emptyText="Исполнители не заданы по маршруту."
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user