[Explore|Trunk]
Home component: updates after changing quick-selection component git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@59633 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
37813a6519
commit
fdcd508a21
|
@ -41,8 +41,7 @@
|
||||||
<div class=" quickSelectionsBox uk-width-xlarge@l uk-width-large@m uk-width-medium">
|
<div class=" quickSelectionsBox uk-width-xlarge@l uk-width-large@m uk-width-medium">
|
||||||
<quick-selections *ngIf="selectedEntity == 'result'" [resultTypes]="resultTypes"
|
<quick-selections *ngIf="selectedEntity == 'result'" [resultTypes]="resultTypes"
|
||||||
[quickFilter]="resultsQuickFilter"
|
[quickFilter]="resultsQuickFilter"
|
||||||
[QFselected]="(resultsQuickFilter)?resultsQuickFilter.selected:null"
|
[properties]="properties" >
|
||||||
[properties]="properties" [delayTime]="0">
|
|
||||||
</quick-selections>
|
</quick-selections>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -576,8 +575,7 @@
|
||||||
<div class=" quickSelectionsBox uk-width-xlarge@l uk-width-large@m uk-width-medium">
|
<div class=" quickSelectionsBox uk-width-xlarge@l uk-width-large@m uk-width-medium">
|
||||||
<quick-selections *ngIf="selectedEntity == 'result'" [resultTypes]="resultTypes"
|
<quick-selections *ngIf="selectedEntity == 'result'" [resultTypes]="resultTypes"
|
||||||
[quickFilter]="resultsQuickFilter"
|
[quickFilter]="resultsQuickFilter"
|
||||||
[QFselected]="(resultsQuickFilter)?resultsQuickFilter.selected:null"
|
[properties]="properties">
|
||||||
[properties]="properties" [delayTime]="0">
|
|
||||||
</quick-selections>
|
</quick-selections>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {Subscription} from 'rxjs';
|
import {Subscription} from 'rxjs';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
import {Location} from '@angular/common';
|
import {Location} from '@angular/common';
|
||||||
|
@ -149,7 +149,7 @@ export class HomeComponent {
|
||||||
selectedEntity = "all";
|
selectedEntity = "all";
|
||||||
selectedEntitySimpleUrl;
|
selectedEntitySimpleUrl;
|
||||||
selectedEntityAdvancedUrl;
|
selectedEntityAdvancedUrl;
|
||||||
resultTypes = {publication:true, dataset:true, software:true, other:true};
|
resultTypes:Filter = {values:[],filterId:"type", countSelectedValues: 0, filterType: 'checkbox', originalFilterId: "", valueIsExact: true, title: "Result Types",filterOperator:"or"};
|
||||||
public pageContents = null;
|
public pageContents = null;
|
||||||
useHelpText: boolean = true;
|
useHelpText: boolean = true;
|
||||||
|
|
||||||
|
@ -229,6 +229,18 @@ export class HomeComponent {
|
||||||
this.showProjects = showEntity["project"];
|
this.showProjects = showEntity["project"];
|
||||||
this.showDataProviders = showEntity["datasource"];
|
this.showDataProviders = showEntity["datasource"];
|
||||||
this.showOrganizations = showEntity["organization"];
|
this.showOrganizations = showEntity["organization"];
|
||||||
|
if(this.showPublications){
|
||||||
|
this.resultTypes.values.push({name: "Publications" , id:"publications",selected:true, number:0});
|
||||||
|
}
|
||||||
|
if(this.showDatasets){
|
||||||
|
this.resultTypes.values.push({name: "Research data" , id:"datasets",selected:true, number:0});
|
||||||
|
}
|
||||||
|
if(this.showSoftware){
|
||||||
|
this.resultTypes.values.push({name: "Software" , id:"software",selected:true, number:0});
|
||||||
|
}
|
||||||
|
if(this.showOrp){
|
||||||
|
this.resultTypes.values.push({name: "Other research products" , id:"other",selected:true, number:0});
|
||||||
|
}
|
||||||
this.getNumbers();
|
this.getNumbers();
|
||||||
// if(this.showDataProviders) {
|
// if(this.showDataProviders) {
|
||||||
// this.fetchDataproviders.getResultsForHome(this.numResults, this.properties);
|
// this.fetchDataproviders.getResultsForHome(this.numResults, this.properties);
|
||||||
|
@ -376,22 +388,18 @@ export class HomeComponent {
|
||||||
if (this.selectedEntity == "result") {
|
if (this.selectedEntity == "result") {
|
||||||
if (this.resultTypes) {
|
if (this.resultTypes) {
|
||||||
let values = [];
|
let values = [];
|
||||||
if (this.resultTypes.publication) {
|
console.log(this.resultTypes.values)
|
||||||
values.push("publications");
|
for(let value of this.resultTypes.values){
|
||||||
}
|
if (value.selected) {
|
||||||
if (this.resultTypes.dataset) {
|
values.push(value.id);
|
||||||
values.push("datasets");
|
}
|
||||||
}
|
|
||||||
if (this.resultTypes.software) {
|
|
||||||
values.push("software");
|
|
||||||
}
|
|
||||||
if (this.resultTypes.other) {
|
|
||||||
values.push("other");
|
|
||||||
}
|
}
|
||||||
if (values.length > 0 && values.length !=4) {
|
if (values.length > 0 && values.length !=4) {
|
||||||
parameterNames.push("type");
|
parameterNames.push("type");
|
||||||
parameterValues.push(values.join(","));
|
parameterValues.push(values.join(","));
|
||||||
}
|
}
|
||||||
|
console.log(parameterNames)
|
||||||
|
console.log(parameterValues)
|
||||||
if (this.resultsQuickFilter) {
|
if (this.resultsQuickFilter) {
|
||||||
parameterNames.push("qf");
|
parameterNames.push("qf");
|
||||||
parameterValues.push("" + this.resultsQuickFilter.selected);
|
parameterValues.push("" + this.resultsQuickFilter.selected);
|
||||||
|
@ -404,6 +412,7 @@ export class HomeComponent {
|
||||||
parameterNames.push("op");
|
parameterNames.push("op");
|
||||||
parameterValues.push("and");
|
parameterValues.push("and");
|
||||||
}
|
}
|
||||||
|
console.log( this.routerHelper.createQueryParams(parameterNames, parameterValues))
|
||||||
this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)});
|
this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue