From 5c52e2a6f845c2c4f7e0795ada3b09ec048201f6 Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Sat, 6 Apr 2024 23:09:25 +0300 Subject: [PATCH] Add function to select concept kernel --- rsconcept/frontend/src/components/Icons.tsx | 1 + .../src/components/info/InfoConstituenta.tsx | 10 ++++++---- .../select/ConstituentaMultiPicker.tsx | 4 +++- .../components/select/SelectGraphToolbar.tsx | 9 ++++++++- .../RSFormPage/EditorTermGraph/GraphToolbar.tsx | 17 +++++++++++------ 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/rsconcept/frontend/src/components/Icons.tsx b/rsconcept/frontend/src/components/Icons.tsx index b11a5271..38ca3b44 100644 --- a/rsconcept/frontend/src/components/Icons.tsx +++ b/rsconcept/frontend/src/components/Icons.tsx @@ -33,6 +33,7 @@ export { BiExpand as IconGraphExpand } from 'react-icons/bi'; export { LuMaximize as IconGraphMaximize } from 'react-icons/lu'; export { BiGitBranch as IconGraphInputs } from 'react-icons/bi'; export { BiGitMerge as IconGraphOutputs } from 'react-icons/bi'; +export { LuAtom as IconGraphCore } from 'react-icons/lu'; export { BiCheckShield as IconImmutable } from 'react-icons/bi'; export { RiOpenSourceLine as IconPublic } from 'react-icons/ri'; diff --git a/rsconcept/frontend/src/components/info/InfoConstituenta.tsx b/rsconcept/frontend/src/components/info/InfoConstituenta.tsx index c2559a56..50996a7e 100644 --- a/rsconcept/frontend/src/components/info/InfoConstituenta.tsx +++ b/rsconcept/frontend/src/components/info/InfoConstituenta.tsx @@ -14,10 +14,12 @@ function InfoConstituenta({ data, className, ...restProps }: InfoConstituentaPro return (
- Термин: - {data.term_resolved || data.term_raw} -
+ {data.term_resolved ? ( ++ Термин: + {data.term_resolved || data.term_raw} +
+ ) : null}
Типизация:
{labelCstTypification(data)}
diff --git a/rsconcept/frontend/src/components/select/ConstituentaMultiPicker.tsx b/rsconcept/frontend/src/components/select/ConstituentaMultiPicker.tsx
index ecc1ff3d..e382a56e 100644
--- a/rsconcept/frontend/src/components/select/ConstituentaMultiPicker.tsx
+++ b/rsconcept/frontend/src/components/select/ConstituentaMultiPicker.tsx
@@ -6,6 +6,7 @@ import { useLayoutEffect, useMemo, useState } from 'react';
import DataTable, { createColumnHelper, RowSelectionState } from '@/components/ui/DataTable';
import { useConceptOptions } from '@/context/OptionsContext';
import { ConstituentaID, IConstituenta, IRSForm } from '@/models/rsform';
+import { isBasicConcept } from '@/models/rsformAPI';
import { describeConstituenta } from '@/utils/labels';
import ConstituentaBadge from '../info/ConstituentaBadge';
@@ -80,7 +81,8 @@ function ConstituentaMultiPicker({ id, schema, prefixID, rows, selected, setSele
{schema ? (