From 6e8801628d64d8bf9b934fa52df21e131cc19157 Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Sat, 6 Apr 2024 22:36:37 +0300 Subject: [PATCH] Small UI fixes --- .../src/components/info/InfoConstituenta.tsx | 35 ++++++++++--------- .../src/pages/RSFormPage/RSTabsMenu.tsx | 2 +- rsconcept/frontend/src/utils/codemirror.ts | 19 +++++++++- 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/rsconcept/frontend/src/components/info/InfoConstituenta.tsx b/rsconcept/frontend/src/components/info/InfoConstituenta.tsx index a6c5d14c..c2559a56 100644 --- a/rsconcept/frontend/src/components/info/InfoConstituenta.tsx +++ b/rsconcept/frontend/src/components/info/InfoConstituenta.tsx @@ -1,6 +1,7 @@ import clsx from 'clsx'; import { IConstituenta } from '@/models/rsform'; +import { isBasicConcept } from '@/models/rsformAPI'; import { labelCstTypification } from '@/utils/labels'; import { CProps } from '../props'; @@ -13,26 +14,14 @@ function InfoConstituenta({ data, className, ...restProps }: InfoConstituentaPro return (
- Основание: - {data.derived_from_alias} -
- ) : null} - {data.derived_children_alias.length > 0 ? ( -- Порождает: - {data.derived_children_alias.join(', ')} -
- ) : null} -- Типизация: - {labelCstTypification(data)} -
Термин: {data.term_resolved || data.term_raw}
++ Типизация: + {labelCstTypification(data)} +
{data.definition_formal ? (Выражение: @@ -45,9 +34,21 @@ function InfoConstituenta({ data, className, ...restProps }: InfoConstituentaPro {data.definition_resolved}
) : null} + {data.derived_from_alias ? ( ++ Основание: + {data.derived_from_alias} +
+ ) : null} + {data.derived_children_alias.length > 0 ? ( ++ Порождает: + {data.derived_children_alias.join(', ')} +
+ ) : null} {data.convention ? (- Конвенция: + {isBasicConcept(data.cst_type) ? 'Конвенция' : 'Комментарий'}: {data.convention}
) : null} diff --git a/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx b/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx index 37a1c2d4..a4dfcf8a 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx @@ -249,7 +249,7 @@ function RSTabsMenu({ onDestroy }: RSTabsMenuProps) { tabIndex={-1} titleHtml='Архив: Редактирование запрещено