From 5e364ac807dfa2e58c4530f27f43a1d9a398cfe1 Mon Sep 17 00:00:00 2001 From: Andrey Epifancev Date: Wed, 11 Nov 2026 17:05:09 +0400 Subject: [PATCH] =?UTF-8?q?fix(stages):=20=D0=BD=D0=B0=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2=20=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=BE=D0=BA=D0=B5=20=D1=8D=D1=82=D0=B0=D0=BF=D0=B0=20?= =?UTF-8?q?=D0=B8=20=D0=B2=20=D0=BF=D0=BE=D0=B4=D1=82=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=B6=D0=B4=D0=B5=D0=BD=D0=B8=D0=B8=20=D1=83=D0=B4=D0=B0=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F,=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=8D=D1=82=D0=B0=D0=BF=D0=B0=20=D1=84?= =?UTF-8?q?=D0=BE=D1=80=D0=BC=D1=8B=20=D0=B4=D0=BB=D1=8F=20=D0=B0=D0=B4?= =?UTF-8?q?=D0=BC=D0=B8=D0=BD=D0=B0=20(AURORA-1880)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- web/src/components/Stages/DeleteStageModal.jsx | 8 ++++++++ web/src/components/Stages/SettingModal.jsx | 4 ++-- web/src/components/Stages/StagesTable/StagesTable.jsx | 11 ++++++----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/web/src/components/Stages/DeleteStageModal.jsx b/web/src/components/Stages/DeleteStageModal.jsx index f345a8c..09de116 100644 --- a/web/src/components/Stages/DeleteStageModal.jsx +++ b/web/src/components/Stages/DeleteStageModal.jsx @@ -1,6 +1,7 @@ import styled from '@emotion/styled'; import DeleteOutlineOutlinedIcon from '@mui/icons-material/DeleteOutlineOutlined'; import { Button, Stack, Typography } from '@mui/material'; +import { DIRECTION_TRANSLATE, SHEET_NAME } from '../../constants/constants'; import { ModalContainer as BaseModalContainer, ModalBackdrop } from '../common/Modal/FormModalStyled'; const ModalContainer = styled(BaseModalContainer)` @@ -40,6 +41,13 @@ export const DeleteStageModal = ({ isOpen, onClose, onConfirm, stage }) => { Удалить этот элемент? + {stage && ( + + {SHEET_NAME[stage.sheet] ?? stage.sheet} + {stage.direction ? ` (${DIRECTION_TRANSLATE[stage.direction] ?? stage.direction})` : ''} — {stage.phase_code} + + )} + Он будет удалён без возможности восстановления. diff --git a/web/src/components/Stages/SettingModal.jsx b/web/src/components/Stages/SettingModal.jsx index 39578f8..ad213bd 100644 --- a/web/src/components/Stages/SettingModal.jsx +++ b/web/src/components/Stages/SettingModal.jsx @@ -122,7 +122,7 @@ export const SettingModal = ({ )} {isAdmin && ( @@ -141,7 +141,7 @@ export const SettingModal = ({ defaultSheet={mode === 'project' ? reportType : ''} /> )} - {!isTaskMode && ( + {isAdmin && ( { diff --git a/web/src/components/Stages/StagesTable/StagesTable.jsx b/web/src/components/Stages/StagesTable/StagesTable.jsx index bac0e40..04bd411 100644 --- a/web/src/components/Stages/StagesTable/StagesTable.jsx +++ b/web/src/components/Stages/StagesTable/StagesTable.jsx @@ -2,9 +2,10 @@ import MoreVertIcon from '@mui/icons-material/MoreVert'; import { Divider, IconButton, Menu, MenuItem, TableBody, TableCell, TableRow, Typography } from '@mui/material'; import { useState } from 'react'; import { useAuth } from '../../../app/context/AuthProvider'; -import { ROLES_NAME_ID, SHEET_NAME, STAGE_ROLE_RUSSIAN_NAME } from '../../../constants/constants'; +import { DIRECTION_TRANSLATE, ROLES_NAME_ID, SHEET_NAME, STAGE_ROLE_RUSSIAN_NAME } from '../../../constants/constants'; import { formatDate } from '../../../utils/formatDate'; import { StageStatusChip } from '../StageStatusChip'; +import { getStageKey } from '../utils'; import { StyledTable, StyledTableContainer, StyledTableHead, StyledTableHeadRow, StyledTableRow } from './StagesTable.style'; import { getStageStatus, getStatusColors } from './utils'; @@ -60,15 +61,15 @@ export const StagesTable = ({ stages, onEdit, onDelete }) => { ) : ( - stages.map((stage, index) => { + stages.map((stage) => { const status = getStageStatus(stage); const colors = getStatusColors(status); - const rowKey = `${stage.sheet}-${stage.phase_code}-${stage.role}-${index}`; return ( - + - {SHEET_NAME[stage.sheet]} - {stage.phase_code} + {SHEET_NAME[stage.sheet]} + {stage.direction ? ` (${DIRECTION_TRANSLATE[stage.direction] ?? stage.direction})` : ''} — {stage.phase_code} {isAdmin && (