diff --git a/rsconcept/frontend/src/features/rsform/pages/RSFormPage/EditorConstituenta/EditorConstituenta.tsx b/rsconcept/frontend/src/features/rsform/pages/RSFormPage/EditorConstituenta/EditorConstituenta.tsx
index 1a46f16f..eb7ec2ac 100644
--- a/rsconcept/frontend/src/features/rsform/pages/RSFormPage/EditorConstituenta/EditorConstituenta.tsx
+++ b/rsconcept/frontend/src/features/rsform/pages/RSFormPage/EditorConstituenta/EditorConstituenta.tsx
@@ -74,7 +74,7 @@ export function EditorConstituenta() {
setToggleReset(prev => !prev)}
/>
+
{activeCst ? (
) : null}
-
+
);
}
diff --git a/rsconcept/frontend/src/features/rsform/pages/RSFormPage/EditorConstituenta/EditorControls.tsx b/rsconcept/frontend/src/features/rsform/pages/RSFormPage/EditorConstituenta/EditorControls.tsx
deleted file mode 100644
index 6117adbc..00000000
--- a/rsconcept/frontend/src/features/rsform/pages/RSFormPage/EditorConstituenta/EditorControls.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import clsx from 'clsx';
-
-import { MiniButton } from '@/components/Control';
-import { IconEdit } from '@/components/Icons';
-import { useDialogsStore } from '@/stores/dialogs';
-import { useModificationStore } from '@/stores/modification';
-import { tooltipText } from '@/utils/labels';
-
-import { useMutatingRSForm } from '../../../backend/useMutatingRSForm';
-import { type IConstituenta } from '../../../models/rsform';
-import { useRSEdit } from '../RSEditContext';
-
-interface EditorControlsProps {
- constituenta: IConstituenta;
- disabled: boolean;
- onEditTerm: () => void;
-}
-
-export function EditorControls({ constituenta, disabled, onEditTerm }: EditorControlsProps) {
- const schema = useRSEdit().schema;
- const { isModified } = useModificationStore();
- const isProcessing = useMutatingRSForm();
-
- const showRenameCst = useDialogsStore(state => state.showRenameCst);
-
- function handleRenameCst() {
- showRenameCst({ schema: schema, target: constituenta });
- }
-
- return (
-
- {!disabled || isProcessing ? (
-
}
- disabled={isModified}
- />
- ) : null}
-
- Имя
- {constituenta?.alias ?? ''}
-
- {!disabled || isProcessing ? (
-
}
- disabled={isModified}
- />
- ) : null}
-
- );
-}
diff --git a/rsconcept/frontend/src/features/rsform/pages/RSFormPage/EditorConstituenta/FormConstituenta.tsx b/rsconcept/frontend/src/features/rsform/pages/RSFormPage/EditorConstituenta/FormConstituenta.tsx
index 58c752aa..5ea62b9b 100644
--- a/rsconcept/frontend/src/features/rsform/pages/RSFormPage/EditorConstituenta/FormConstituenta.tsx
+++ b/rsconcept/frontend/src/features/rsform/pages/RSFormPage/EditorConstituenta/FormConstituenta.tsx
@@ -6,13 +6,13 @@ import { Controller, useForm } from 'react-hook-form';
import { toast } from 'react-toastify';
import { zodResolver } from '@hookform/resolvers/zod';
-import { SubmitButton } from '@/components/Control';
-import { IconChild, IconPredecessor, IconSave } from '@/components/Icons';
+import { MiniButton, SubmitButton } from '@/components/Control';
+import { IconChild, IconEdit, IconPredecessor, IconSave } from '@/components/Icons';
import { TextArea } from '@/components/Input';
import { Indicator } from '@/components/View';
import { useDialogsStore } from '@/stores/dialogs';
import { useModificationStore } from '@/stores/modification';
-import { errorMsg } from '@/utils/labels';
+import { errorMsg, tooltipText } from '@/utils/labels';
import { promptUnsaved } from '@/utils/utils';
import {
@@ -30,8 +30,6 @@ import { type IConstituenta, type IRSForm } from '../../../models/rsform';
import { isBaseSet, isBasicConcept, isFunctional } from '../../../models/rsformAPI';
import { EditorRSExpression } from '../EditorRSExpression';
-import { EditorControls } from './EditorControls';
-
interface FormConstituentaProps {
id?: string;
disabled: boolean;
@@ -57,6 +55,7 @@ export function FormConstituenta({ disabled, id, toggleReset, schema, activeCst,
const { cstUpdate } = useCstUpdate();
const showTypification = useDialogsStore(state => state.showShowTypeGraph);
const showEditTerm = useDialogsStore(state => state.showEditWordForms);
+ const showRenameCst = useDialogsStore(state => state.showRenameCst);
const [localParse, setLocalParse] = useState
(null);
@@ -129,9 +128,38 @@ export function FormConstituenta({ disabled, id, toggleReset, schema, activeCst,
showEditTerm({ itemID: schema.id, target: activeCst });
}
+ function handleRenameCst() {
+ showRenameCst({ schema: schema, target: activeCst });
+ }
+
return (