From 9de19450f83a1215621651d467445aa57f73b9e0 Mon Sep 17 00:00:00 2001 From: VarunReddy1111 Date: Wed, 3 Jul 2024 12:13:58 -0500 Subject: [PATCH 1/2] Change to use stringlist template for synonyms in controlled vocabulary --- .../ControlledVocabularyTable.js | 30 ++----------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/src/main/cliapp/src/containers/controlledVocabularyPage/ControlledVocabularyTable.js b/src/main/cliapp/src/containers/controlledVocabularyPage/ControlledVocabularyTable.js index 4a8cbb65f..6ce57cdf0 100644 --- a/src/main/cliapp/src/containers/controlledVocabularyPage/ControlledVocabularyTable.js +++ b/src/main/cliapp/src/containers/controlledVocabularyPage/ControlledVocabularyTable.js @@ -21,6 +21,7 @@ import { useGetTableData } from '../../service/useGetTableData'; import { useGetUserSettings } from '../../service/useGetUserSettings'; import { SearchService } from '../../service/SearchService'; import { setNewEntity } from '../../utils/utils'; +import { StringListTemplate } from '../../components/Templates/StringListTemplate'; export const ControlledVocabularyTable = () => { const newTermReducer = (state, action) => { @@ -216,33 +217,6 @@ export const ControlledVocabularyTable = () => { } }; - const synonymsBodyTemplate = (rowData) => { - if (rowData?.synonyms && rowData.synonyms.length > 0) { - const sortedSynonyms = rowData.synonyms.sort(); - const listTemplate = (synonym) => { - return ( - -
- - ); - }; - return ( - <> -
- -
- - - - - ); - } - }; - const columns = [ { field: 'id', @@ -270,7 +244,7 @@ export const ControlledVocabularyTable = () => { header: 'Synonyms', sortable: true, filterConfig: FILTER_CONFIGS.synonymsFilterConfig, - body: synonymsBodyTemplate, + body: (rowData) => , }, { field: 'vocabulary.name', From 46a686060e517e8e0b61c99f9e162d0e1749de85 Mon Sep 17 00:00:00 2001 From: VarunReddy1111 Date: Wed, 3 Jul 2024 12:16:21 -0500 Subject: [PATCH 2/2] Removed unused import --- .../controlledVocabularyPage/ControlledVocabularyTable.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/cliapp/src/containers/controlledVocabularyPage/ControlledVocabularyTable.js b/src/main/cliapp/src/containers/controlledVocabularyPage/ControlledVocabularyTable.js index 6ce57cdf0..aa5955cf2 100644 --- a/src/main/cliapp/src/containers/controlledVocabularyPage/ControlledVocabularyTable.js +++ b/src/main/cliapp/src/containers/controlledVocabularyPage/ControlledVocabularyTable.js @@ -3,9 +3,6 @@ import { GenericDataTable } from '../../components/GenericDataTable/GenericDataT import { useMutation, useQuery } from '@tanstack/react-query'; import { Toast } from 'primereact/toast'; -import { Tooltip } from 'primereact/tooltip'; -import { EllipsisTableCell } from '../../components/EllipsisTableCell'; -import { ListTableCell } from '../../components/ListTableCell'; import { useControlledVocabularyService } from '../../service/useControlledVocabularyService'; import { VocabularyService } from '../../service/VocabularyService'; import { TrueFalseDropdown } from '../../components/TrueFalseDropDownSelector';