This commit is contained in:
Тимур Городецкий
2026-10-15 12:32:19 +05:00
27 changed files with 754 additions and 46 deletions
@@ -27,8 +27,10 @@ import {
IApproverToWrite,
IUseMatrixEditor,
unassignedStepMessage,
resolveWriteListId
resolveWriteListId,
composeRemoveRowRule
} from '../../shared/approval';
import { effectiveUserEmail } from '../../shared/impersonation';
import { IRequestFormProps } from '../../models/types';
import { friendlyErrorMessage } from '../../shared/diagnostics';
import {
@@ -244,7 +246,11 @@ const BusinessTripForm: React.FC<IRequestFormProps> = ({
<ObligationSection {...sectionProps} />
</FormModeProvider>
<ApprovalMatrix editor={matrix} search={(q) => approval.searchUsers(q)} />
<ApprovalMatrix
editor={matrix}
search={(q) => approval.searchUsers(q)}
canRemoveRow={composeRemoveRowRule(effectiveUserEmail(context))}
/>
{!executors.loading && executors.rows.length > 0 && (
<ApprovalMatrix
@@ -253,6 +259,7 @@ const BusinessTripForm: React.FC<IRequestFormProps> = ({
title="Исполнение (после согласования)"
roleLabel="Исполнитель"
emptyText="Исполнители не заданы по маршруту."
canRemoveRow={composeRemoveRowRule(effectiveUserEmail(context))}
/>
)}
@@ -342,6 +342,7 @@ const ClearanceForm: React.FC<IRequestFormProps> = ({
title="Исполнение (после согласования)"
roleLabel="Исполнитель"
emptyText="Исполнители не заданы по маршруту."
canRemoveRow={composeRemoveRowRule(effectiveUserEmail(context))}
/>
)}
@@ -30,7 +30,8 @@ import {
isEditableStatus,
IApproverToWrite,
unassignedStepMessage,
executorsToWrite
executorsToWrite,
composeRemoveRowRule
} from '../../shared/approval';
import {
uploadAttachments,
@@ -442,6 +443,7 @@ const Ticket1CForm: React.FC<IRequestFormProps> = ({
<ApprovalMatrix
editor={matrixEditor}
search={(q) => approval.searchUsers(q)}
canRemoveRow={composeRemoveRowRule(effectiveUserEmail(context))}
// Пустой маршрут — штатная ситуация: для части видов работ согласование
// не нужно, заявка сразу уходит в Planner. Сбой загрузки маршрута
// показывается отдельно (matrix.error) и блокирует отправку.
@@ -455,6 +457,7 @@ const Ticket1CForm: React.FC<IRequestFormProps> = ({
title="Исполнение"
roleLabel="Исполнитель"
emptyText="Исполнители не назначены."
canRemoveRow={composeRemoveRowRule(effectiveUserEmail(context))}
/>
)}