This commit is contained in:
gorbenko.pavel
2026-08-07 13:46:06 +05:00
parent 359f92afda
commit 419aaac60a
3 changed files with 118 additions and 52 deletions
@@ -13,7 +13,6 @@ export interface IManageRequestsPhaseTableProps {
rows: ManagedApprovalRow[];
/** Заявка целиком только для просмотра (закрыта) — контролов нет вообще. */
readOnly: boolean;
busy: boolean;
statusVariant: (status: string) => BadgeVariant;
onReassign: (row: ManagedApprovalRow) => void;
onRemove: (row: ManagedApprovalRow) => void;
@@ -56,7 +55,6 @@ export const ManageRequestsPhaseTable: React.FC<IManageRequestsPhaseTableProps>
title,
rows,
readOnly,
busy,
statusVariant,
onReassign,
onRemove,
@@ -181,14 +179,14 @@ export const ManageRequestsPhaseTable: React.FC<IManageRequestsPhaseTableProps>
icon="chevron-down"
className={`${styles.iconBtnVisible} ${styles.flipY}`}
label={texts.manageRequests.moveUp}
disabled={busy || isGhost || !movable || blockIndex <= lastLockedBlockIndex + 1}
disabled={isGhost || !movable || blockIndex <= lastLockedBlockIndex + 1}
onClick={() => moveBlockUp(blockIndex)}
/>
<IconButton
icon="chevron-down"
className={styles.iconBtnVisible}
label={texts.manageRequests.moveDown}
disabled={busy || isGhost || !movable || blockIndex >= blocks.length - 1}
disabled={isGhost || !movable || blockIndex >= blocks.length - 1}
onClick={() => moveBlockDown(blockIndex)}
/>
</ActionsCell>
@@ -204,14 +202,13 @@ export const ManageRequestsPhaseTable: React.FC<IManageRequestsPhaseTableProps>
icon="people"
className={r.parallelWithPrev ? styles.iconBtnActive : styles.iconBtnVisible}
label={r.parallelWithPrev ? texts.manageRequests.splitFromPrev : texts.manageRequests.mergeWithPrev}
disabled={busy || !canToggle}
disabled={!canToggle}
onClick={() => toggleParallel(i)}
/>
<IconButton
icon="edit"
className={styles.iconBtnVisible}
label={texts.manageRequests.reassign}
disabled={busy}
onClick={() => onReassign(r)}
/>
<IconButton
@@ -219,7 +216,6 @@ export const ManageRequestsPhaseTable: React.FC<IManageRequestsPhaseTableProps>
className={styles.iconBtnVisible}
label={texts.manageRequests.remove}
danger
disabled={busy}
onClick={() => onRemove(r)}
/>
</ActionsCell>
@@ -254,7 +250,6 @@ export const ManageRequestsPhaseTable: React.FC<IManageRequestsPhaseTableProps>
options={employees.map(toEmployeeOption)}
value=""
loading={employeesLoading}
disabled={busy}
placeholder={addPlaceholder}
searchPlaceholder={texts.select.employeeSearchPlaceholder}
emptyMessage={texts.select.employeesEmpty}