[Explore | Trunk]: Fix boolean variables for entities

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@60903 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2021-04-18 11:36:41 +00:00
parent f35a72360b
commit 3135d44180
1 changed files with 8 additions and 10 deletions

View File

@ -3,14 +3,13 @@ import {Subscription} from 'rxjs';
import {ActivatedRoute, Router} from '@angular/router';
import {Location} from '@angular/common';
import "rxjs/add/observable/zip";
import {Title, Meta} from '@angular/platform-browser';
import {Meta, Title} from '@angular/platform-browser';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import {SearchDataprovidersService} from '../openaireLibrary/services/searchDataproviders.service';
import {SearchProjectsService} from '../openaireLibrary/services/searchProjects.service';
import {SearchOrganizationsService} from '../openaireLibrary/services/searchOrganizations.service';
import {RefineFieldResultsService} from '../openaireLibrary/services/refineFieldResults.service';
import {SearchFields} from '../openaireLibrary/utils/properties/searchFields';
import {NumberUtils} from '../openaireLibrary/utils/number-utils.class';
import {RouterHelper} from '../openaireLibrary/utils/routerHelper.class';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
@ -208,13 +207,13 @@ export class HomeComponent {
for (var i = 0; i < data['entities'].length; i++) {
showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"];
}
this.showPublications = showEntity["publication"];
this.showDatasets = showEntity["dataset"];
this.showSoftware = showEntity["software"];
this.showOrp = showEntity["orp"];
this.showProjects = showEntity["project"];
this.showDataProviders = showEntity["datasource"];
this.showOrganizations = showEntity["organization"];
this.showPublications = !!showEntity["publication"];
this.showDatasets = !!showEntity["dataset"];
this.showSoftware = !!showEntity["software"];
this.showOrp = !!showEntity["orp"];
this.showProjects = !!showEntity["project"];
this.showDataProviders = !!showEntity["datasource"];
this.showOrganizations = !!showEntity["organization"];
if (this.showPublications) {
this.resultTypes.values.push({name: "Publications", id: "publications", selected: true, number: 0});
}
@ -286,7 +285,6 @@ export class HomeComponent {
parameterNames.push("f0");
parameterValues.push("q");
}
console.log(this.routerHelper.createQueryParams(parameterNames, parameterValues))
this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)});
}
}