diff --git a/application/frontend/src/components/DocumentNode/DocumentNode.tsx b/application/frontend/src/components/DocumentNode/DocumentNode.tsx index ac2be82e6..c0c8f6ae6 100644 --- a/application/frontend/src/components/DocumentNode/DocumentNode.tsx +++ b/application/frontend/src/components/DocumentNode/DocumentNode.tsx @@ -133,7 +133,7 @@ export const DocumentNode: FunctionComponent = ({ return ( <> -
setExpanded(!expanded)}> +
setExpanded(!expanded)}> {getDocumentDisplayName(usedNode)}
@@ -141,6 +141,8 @@ export const DocumentNode: FunctionComponent = ({ {expanded && getTopicsToDisplayOrderdByLinkType().map(([type, links], idx) => { + const sortedResults = links.sort((a, b) => getDocumentDisplayName(a.document).localeCompare(getDocumentDisplayName(b.document))) + let lastDocumentName = sortedResults[0].document.name return (
{idx > 0 &&
} @@ -149,8 +151,9 @@ export const DocumentNode: FunctionComponent = ({
- {links.sort((a, b) => getDocumentDisplayName(a.document).localeCompare(getDocumentDisplayName(b.document))).map((link, i) => ( + {sortedResults.map((link, i) =>{const temp = (
+ {lastDocumentName !== (link.document.name) &&
} = ({ />
- ))} + ) + lastDocumentName = link.document.name + return temp; + })}
diff --git a/application/frontend/src/components/DocumentNode/documentNode.scss b/application/frontend/src/components/DocumentNode/documentNode.scss index 2fc8efe07..1148095c9 100644 --- a/application/frontend/src/components/DocumentNode/documentNode.scss +++ b/application/frontend/src/components/DocumentNode/documentNode.scss @@ -36,3 +36,24 @@ margin: 15px 0; } } + + +.document-node__link-type-container .accordion.ui.styled +{ + div>.title.external-link { + padding-top: 0; + padding-bottom: .25em; + } + div:first-child>.title.external-link { + padding-top: .75em; + padding-bottom: .25em; + } + + div>hr+.title.external-link { + border-top: none; + } + + div:last-child>.title.external-link { + padding-bottom: .75em; + } +} diff --git a/application/frontend/src/pages/Search/SearchName.tsx b/application/frontend/src/pages/Search/SearchName.tsx index 57bb8dfd5..c3f5ef078 100644 --- a/application/frontend/src/pages/Search/SearchName.tsx +++ b/application/frontend/src/pages/Search/SearchName.tsx @@ -65,7 +65,7 @@ export const SearchName = () => {

Matching sources

- {nodes && } + {nodes && }
)} diff --git a/application/frontend/src/pages/Search/components/SearchResults.tsx b/application/frontend/src/pages/Search/components/SearchResults.tsx index a17de00c5..7ed3d90b5 100644 --- a/application/frontend/src/pages/Search/components/SearchResults.tsx +++ b/application/frontend/src/pages/Search/components/SearchResults.tsx @@ -2,16 +2,17 @@ import React from 'react'; import { DocumentNode } from '../../../components/DocumentNode'; import { getDocumentDisplayName } from 'application/frontend/src/utils/document'; +import { DOCUMENT_TYPES } from 'application/frontend/src/const'; -export const SearchResults = ({ results, grouped=false }) => { +export const SearchResults = ({ results }) => { if (results && results.length != 0) { const sortedResults = results.sort((a, b) => getDocumentDisplayName(a).localeCompare(getDocumentDisplayName(b))) - let lastDocumentName = sortedResults[0].id ?? sortedResults[0].name + let lastDocumentName = sortedResults[0].name return ( <> {sortedResults.map((document, i) => {let temp = ( <> - {grouped && lastDocumentName !== (document.id ?? document.name) &&
} + {document.doctype != DOCUMENT_TYPES.TYPE_CRE && lastDocumentName !== document.name &&
}