[Library | develop]: searchSorting.component.ts: Added sorting options (generalOptions), "citation_count,descending", "popularity,descending", "influence,descending", "impulse,descending" | searchResearchResults.component.ts: Added the new sorting options in the checks.

This commit is contained in:
Konstantina Galouni 2023-09-20 10:48:20 +03:00
parent bc514b62d1
commit 966dedde45
2 changed files with 7 additions and 1 deletions

View File

@ -160,7 +160,9 @@ export class SearchResearchResultsComponent {
this.searchUtils.validateSize(params['size']);
this.searchUtils.sortBy = (params['sortBy']) ? params['sortBy'] : '';
if (this.searchUtils.sortBy && this.searchUtils.sortBy != "resultdateofacceptance,descending" && this.searchUtils.sortBy != "resultdateofacceptance,ascending") {
if (this.searchUtils.sortBy && this.searchUtils.sortBy != "resultdateofacceptance,descending" && this.searchUtils.sortBy != "resultdateofacceptance,ascending"
&& this.searchUtils.sortBy != "citation_count,descending" && this.searchUtils.sortBy != "popularity,descending"
&& this.searchUtils.sortBy != "influence,descending" && this.searchUtils.sortBy != "impulse,descending") {
this.searchUtils.sortBy = "";
}
this.selectedFields = [];

View File

@ -23,6 +23,10 @@ export class SearchSortingComponent {
{value: '', label: 'Relevance'},
{value: 'resultdateofacceptance,descending', label: 'Date (most recent)'},
{value: 'resultdateofacceptance,ascending', label: 'Date (least recent)'},
{value: 'citation_count,descending', label: 'Citation Count'},
{value: 'popularity,descending', label: 'Popularity'},
{value: 'influence,descending', label: 'Influence'},
{value: 'impulse,descending', label: 'Impulse'}
];
private communityOptions = [
{value: '', label: 'Title'},