diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html index f3037b4fc..3a552eb4e 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html @@ -62,10 +62,6 @@
-
- Score: - -
+
+ Score: + +
diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts index 0b7b7d793..d8f29ef5a 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts @@ -41,21 +41,20 @@ export class DocumentCardLargeComponent implements OnInit { @Output() clickMoreLike= new EventEmitter() - @Input() - searchScore: number - @ViewChild('popover') popover: NgbPopover mouseOnPreview = false popoverHidden = true get searchScoreClass() { - if (this.searchScore > 0.7) { - return "success" - } else if (this.searchScore > 0.3) { - return "warning" - } else { - return "danger" + if (this.document.__search_hit__) { + if (this.document.__search_hit__.score > 0.7) { + return "success" + } else if (this.document.__search_hit__.score > 0.3) { + return "warning" + } else { + return "danger" + } } }