[Explore & Library | explore-redesign]: searchResult.component.ts & searchResearchResults.service.ts: Remove logs from search | resultLanding.component.html: [Bug fix] Add check if resultLandingInfo.measure | Remove from <result-preview> modal input that does not exist anymore.

This commit is contained in:
Konstantina Galouni 2023-02-18 10:41:34 +02:00
parent a4c9c63311
commit 79bcf402d6
3 changed files with 7 additions and 9 deletions

View File

@ -459,13 +459,13 @@
<li> <li>
<a href="#">Overview</a> <a href="#">Overview</a>
</li> </li>
<li *ngIf="resultLandingInfo.measure.citations || resultLandingInfo.measure.popularity || resultLandingInfo.measure.influence || resultLandingInfo.measure.impulse"> <li *ngIf="resultLandingInfo.measure && (resultLandingInfo.measure.citations || resultLandingInfo.measure.popularity || resultLandingInfo.measure.influence || resultLandingInfo.measure.impulse)">
<a href="#">Impact</a> <a href="#">Impact</a>
</li> </li>
<li *ngIf="hasAltMetrics"> <li *ngIf="hasAltMetrics">
<a href="#">Social</a> <a href="#">Social</a>
</li> </li>
<li *ngIf="resultLandingInfo.measure.downloads || resultLandingInfo.measure.views"> <li *ngIf="resultLandingInfo.measure && (resultLandingInfo.measure.downloads || resultLandingInfo.measure.views)">
<a href="#" (click)="clickedUsageMetrics()">Usage</a> <a href="#" (click)="clickedUsageMetrics()">Usage</a>
</li> </li>
</ul> </ul>
@ -473,7 +473,7 @@
<!-- overview --> <!-- overview -->
<li> <li>
<div class="uk-flex uk-flex-wrap landing-metrics-overview"> <div class="uk-flex uk-flex-wrap landing-metrics-overview">
<div *ngIf="resultLandingInfo.measure.citations || resultLandingInfo.measure.popularity || resultLandingInfo.measure.influence || resultLandingInfo.measure.impulse"> <div *ngIf="resultLandingInfo.measure && (resultLandingInfo.measure.citations || resultLandingInfo.measure.popularity || resultLandingInfo.measure.influence || resultLandingInfo.measure.impulse)">
<div class="uk-grid-divider" uk-grid> <div class="uk-grid-divider" uk-grid>
<div> <div>
<div class="uk-text-center uk-margin-small-bottom"> <div class="uk-text-center uk-margin-small-bottom">
@ -538,7 +538,7 @@
<div *ngIf="hasAltMetrics"> <div *ngIf="hasAltMetrics">
<altmetrics id="{{resultLandingInfo.identifiers?.get('doi')[0]}}" type="doi" size="donut"></altmetrics> <altmetrics id="{{resultLandingInfo.identifiers?.get('doi')[0]}}" type="doi" size="donut"></altmetrics>
</div> </div>
<div *ngIf="resultLandingInfo.measure.downloads || resultLandingInfo.measure.views"> <div *ngIf="resultLandingInfo.measure && (resultLandingInfo.measure.downloads || resultLandingInfo.measure.views)">
<div class="uk-grid-divider" uk-grid> <div class="uk-grid-divider" uk-grid>
<div> <div>
<div class="uk-text-center uk-margin-small-bottom"> <div class="uk-text-center uk-margin-small-bottom">
@ -584,7 +584,7 @@
</div> </div>
</li> </li>
<!-- impact --> <!-- impact -->
<li *ngIf="resultLandingInfo.measure.citations || resultLandingInfo.measure.popularity || resultLandingInfo.measure.influence || resultLandingInfo.measure.impulse"> <li *ngIf="resultLandingInfo.measure && (resultLandingInfo.measure.citations || resultLandingInfo.measure.popularity || resultLandingInfo.measure.influence || resultLandingInfo.measure.impulse)">
<div class="uk-flex uk-flex-center uk-flex-middle"> <div class="uk-flex uk-flex-center uk-flex-middle">
<div class="uk-card uk-card-default uk-padding-small"> <div class="uk-card uk-card-default uk-padding-small">
<table class="uk-table uk-table-small uk-margin-remove"> <table class="uk-table uk-table-small uk-margin-remove">
@ -653,7 +653,7 @@
<altmetrics id="{{resultLandingInfo.identifiers?.get('doi')[0]}}" type="doi" size="medium-donut"></altmetrics> <altmetrics id="{{resultLandingInfo.identifiers?.get('doi')[0]}}" type="doi" size="medium-donut"></altmetrics>
</li> </li>
<!-- usage --> <!-- usage -->
<li *ngIf="resultLandingInfo.measure.downloads || resultLandingInfo.measure.views"> <li *ngIf="resultLandingInfo.measure && (resultLandingInfo.measure.downloads || resultLandingInfo.measure.views)">
<div class="uk-flex uk-flex-center uk-flex-middle"> <div class="uk-flex uk-flex-center uk-flex-middle">
<div class="uk-margin-large-right"> <div class="uk-margin-large-right">
<div *ngIf="resultLandingInfo.measure.downloads" class="uk-text-center uk-margin-medium-bottom"> <div *ngIf="resultLandingInfo.measure.downloads" class="uk-text-center uk-margin-medium-bottom">
@ -1026,7 +1026,7 @@
</results-and-pages> </results-and-pages>
<ul class="uk-list uk-list-divider uk-margin"> <ul class="uk-list uk-list-divider uk-margin">
<li *ngFor="let item of researchResults.slice((relatedPage-1)*pageSize, relatedPage*pageSize)"> <li *ngFor="let item of researchResults.slice((relatedPage-1)*pageSize, relatedPage*pageSize)">
<result-preview [modal]="relationModal" [properties]="properties" <result-preview [properties]="properties"
[result]="getResultPreview(item)" [provenanceActionVocabulary]="provenanceActionVocabulary" [result]="getResultPreview(item)" [provenanceActionVocabulary]="provenanceActionVocabulary"
[relationsVocabulary]="relationsVocabulary" [relationsVocabulary]="relationsVocabulary"
[isCard]="false"></result-preview> [isCard]="false"></result-preview>

View File

@ -34,7 +34,6 @@ export class SearchResultComponent implements OnInit, OnChanges {
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => { this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
this.isMobile = isMobile; this.isMobile = isMobile;
})); }));
console.log(this.results);
} }
ngOnDestroy() { ngOnDestroy() {

View File

@ -240,7 +240,6 @@ export class SearchResearchResultsService {
result.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom( result.hostedBy_collectedFrom = this.parsingFunctions.addPublisherToHostedBy_collectedFrom(
result.hostedBy_collectedFrom, result.publisher, result.hostedBy_collectedFrom, result.publisher,
journal, result.identifiers); journal, result.identifiers);
console.log(result.hostedBy_collectedFrom);
result.hostedBy_collectedFrom.sort(this.parsingFunctions.compareHostedByCollectedFrom); result.hostedBy_collectedFrom.sort(this.parsingFunctions.compareHostedByCollectedFrom);
// Measure // Measure