diff --git a/src/components/TemplateManager/VisualLayoutEditor.tsx b/src/components/TemplateManager/VisualLayoutEditor.tsx index 03c9a05..40d3da8 100644 --- a/src/components/TemplateManager/VisualLayoutEditor.tsx +++ b/src/components/TemplateManager/VisualLayoutEditor.tsx @@ -4,6 +4,7 @@ import { Edit, Eye, EyeOff, + Grid, Move, Trash2 } from 'lucide-react'; @@ -181,12 +182,30 @@ const DraggableElement: React.FC = React.memo(({
-
- - {element.label || element.name || `${element.type} элемент`} - +
+
+ + {element.label || element.name || `${element.type} элемент`} + + {element.required && } +
+ {/* Индикатор ячеек */} + {element.targetCells && element.targetCells.length > 0 && ( +
+ +
+
Целевые ячейки:
+ {element.targetCells.map((cell, i) => ( +
+ {cell.sheet}!{cell.cell} + {cell.displayName && ({cell.displayName})} +
+ ))} +
+
+ )} {onEdit && (
diff --git a/src/pages/ProtocolCreation/ui/Page/Page.tsx b/src/pages/ProtocolCreation/ui/Page/Page.tsx index 82e6341..b7dff99 100644 --- a/src/pages/ProtocolCreation/ui/Page/Page.tsx +++ b/src/pages/ProtocolCreation/ui/Page/Page.tsx @@ -1,4 +1,4 @@ -import { ArrowLeft, Download, FileText, Plus, Save, Settings, Wrench } from 'lucide-react'; +import { ArrowLeft, Download, FileText, Grid, Plus, Save, Settings, Wrench } from 'lucide-react'; import { FC, useMemo, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { StandardsSelector } from '../../../../components/StandardsElement/StandardsSelector'; @@ -270,31 +270,30 @@ const FormElement: FC = ({ element, value, onChange }) => { return (
-
- - {element.required && ( - - ! - +
+
+ + {element.required && } +
+ {/* Индикатор ячеек */} + {element.targetCells && element.targetCells.length > 0 && ( +
+ +
+
Целевые ячейки:
+ {element.targetCells.map((cell, i) => ( +
+ {cell.sheet}!{cell.cell} + {cell.displayName && ({cell.displayName})} +
+ ))} +
+
)}
{renderInput()} - {element.targetCells && element.targetCells.length > 0 && ( -
- {element.targetCells.map((target, index) => ( - - {target.sheet}!{target.cell} - - ))} -
- )}
); };