Files
request-portal/src/webparts/requestPortal/shared/approval/index.ts
T
Тимур Городецкий 9cacb6b271 feat: письмо инициатору при отклонении и возврате заявки
Поток RequestsNotification умеет ветки «Отклонено» и «Возврат на доработку»,
но портал их не вызывал: notifyActiveStep ищет только активные строки, а после
такого решения их нет — инициатор узнавал о решении, только открыв заявку.

notifyInitiatorOfReturn шлёт в тот же поток RowID строки, по которой решил
текущий пользователь; подключён в onDecided всех форм, кроме «Изменения
условий ТД» (доработаем позже).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-28 16:50:31 +05:00

92 lines
3.8 KiB
TypeScript

// Единая точка импорта механизма согласования.
export {
REQUEST_STATUS,
REQUEST_STATUS_CHOICES,
APPROVAL_ROW_STATUS_CHOICES,
APPROVAL_PHASE,
APPROVAL_PHASE_CHOICES,
EDITABLE_STATUSES,
isEditableStatus,
initialSubmitStatus,
isSubmittedStatus,
isApprovedStatus,
} from './models/statuses';
export type { ISiteUser } from './models/ISiteUser';
export type { IMatrixRow } from './models/IMatrixRow';
export type { IApprovalRow } from './models/IApprovalRow';
export type {
ApprovalStatus,
IListPartition,
ICurrentListPartition,
IRequestType,
IRequestTypeListSeries,
IResolvedRoute,
IResolvedRouteStep,
IResolveFieldValue,
} from './models/IApprovalRouteApi';
export {
getRequestTypes,
getRequestTypesCached,
getRequestTypeIdByPageUrl,
getListPartitions,
getCurrentListPartition,
getRequestTypeAccessEmails,
resolveRoute
} from './approvalRoute.service';
export { hasRequestTypeAccess, accessibleAllRequestsTypes, emailsForType } from './requestTypeAccess';
export { useAccessibleAllRequestsFormKeys } from './useAccessibleAllRequestsFormKeys';
export {
initListPartitions,
listPartitionsLoaded,
partitionsForTypeId,
currentPartitionForTypeId,
currentPartitionForPageUrl,
partitionsForPageUrl,
partitionForPageUrlAndListId,
isConfirmedStaleListId,
registerCurrentPartition,
} from './listPartitions';
export { resolveWriteListId } from './writeListId';
export { locateApprovalLists, approvalListKey, forgetApprovalList, siteOrigin } from './approvalListLocator';
export type { IDataListRef, IApprovalListLocation, ApprovalListLookup } from './approvalListLocator';
export { currentUserIdFor, ensureUserIdFor } from './siteUser';
export { useRequestTypeId } from './useRequestTypeId';
export type { IRequestTypeIdState } from './useRequestTypeId';
export { ApprovalListService } from './approvalList.service';
export type { IApproverToWrite } from './approvalList.service';
export { approvalServiceFor } from './approvalServiceFactory';
export { ApproverService } from './approverDecision.service';
export type { ApproverDecision, IPendingRow } from './approverDecision.service';
export { getPlannedMatrix, writeApprovers, writeRoute } from './approvalSubmission.service';
export { notifyActiveStep, notifyInitiatorOfReturn, postToFlow } from './notify.service';
export type { INotifyTarget } from './notify.service';
export { useMatrixEditor, findUnassignedStep, unassignedStepMessage } from './useMatrixEditor';
export type { IUseMatrixEditor } from './useMatrixEditor';
export {
approvalPhaseRows,
executionPhaseRows,
executorsToWrite,
useFormExecutors,
useViewExecutors
} from './useRouteExecutors';
export { loadRoutePhase, isOpenedRouteReady } from './loadRoutePhase';
export type { RoutePhase } from './loadRoutePhase';
export { usePhasedRoute } from './usePhasedRoute';
export type { IPhasedRoute } from './usePhasedRoute';
export { resolveApproverOrgInfo } from './approverOrgInfo';
export type { IApproverOrgInfo } from './approverOrgInfo';
export { canEditRoute, canEditExecutors, composeRemoveRowRule } from './routeEditRights';
export { canEditAllFields } from './fullEditRights';
export { planQueuedStepMove, queuedStepMoveRule } from './queuedStepMove';
export type { StepMoveDirection, IStepMoveRow, IStepOrderChange } from './queuedStepMove';
export { useQueuedStepMove } from './useQueuedStepMove';
export { ApprovalMatrix } from './ui/ApprovalMatrix';
export { ExecutorsMatrix } from './ui/ExecutorsMatrix';
export { ApprovalHistory } from './history/ApprovalHistory';
export { ApprovalHistoryFeed } from './history/ApprovalHistoryFeed';
export { HISTORY_TEXT } from './history/historyTexts';
export { UserPicker } from './ui/UserPicker';
export { DecisionPanel } from './ui/DecisionPanel';
export { StatusBadge } from './ui/StatusBadge';