[CST-7604] added hithighlight for person and orgunit

This commit is contained in:
Nikunj Sharma
2023-01-10 19:37:06 +05:30
parent fc2c7c5e69
commit b7b2803f6e
7 changed files with 63 additions and 5 deletions

View File

@@ -30,6 +30,9 @@ const mockItemWithMetadata: ItemSearchResult = new ItemSearchResult();
mockItemWithMetadata.hitHighlights = {};
const dcTitle = 'This is just another <em>title</em>';
mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
hitHighlights: {
'dc.title': [dcTitle],
},
bundles: createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), [])),
metadata: {
'dc.title': [

View File

@@ -42,7 +42,6 @@ export class ItemSearchResultGridElementComponent extends SearchResultGridElemen
ngOnInit(): void {
super.ngOnInit();
this.itemPageRoute = getItemPageRoute(this.dso);
this.dsoTitle = this.firstMetadataValue('dc.title') ??
(this.dso ? this.dsoNameService.getName(this.dso) : undefined);
this.dsoTitle = this.dsoNameService.getHitHighlights(this.object, this.dso);
}
}