[Library | Trunk]: Entities selection add enable all parameter
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60868 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
dc9d1f3455
commit
01a6d0a22b
|
@ -6,6 +6,7 @@ import {ConfigurationService} from "../../utils/configuration/configuration.serv
|
|||
import {Router} from "@angular/router";
|
||||
import {MatSelect} from "@angular/material";
|
||||
import {Subscription} from "rxjs";
|
||||
import {properties} from '../../../../environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'entities-selection',
|
||||
|
@ -79,7 +80,8 @@ export class EntitiesSelectionComponent {
|
|||
showDataProviders: boolean = false;
|
||||
showOrganizations: boolean = false;
|
||||
showAll: boolean = true;
|
||||
@Input() properties: EnvProperties;
|
||||
@Input() allEnable = false;
|
||||
@Input() properties: EnvProperties = properties;
|
||||
@Input() customFilter: SearchCustomFilter = null;
|
||||
@Input() @Output() selectedEntity = "Research Outcomes";
|
||||
@Input() currentEntity = "Research Outcomes";
|
||||
|
@ -94,16 +96,12 @@ export class EntitiesSelectionComponent {
|
|||
|
||||
subs: Subscription[] = [];
|
||||
|
||||
constructor(private _fb: FormBuilder, private config: ConfigurationService, private router: Router) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
constructor(private _fb: FormBuilder, private config: ConfigurationService, private router: Router) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.show = 0;
|
||||
if (this.properties) {
|
||||
if((this.customFilter && this.customFilter.queryFieldName == "communityId") || (this.properties.adminToolsCommunity !== "monitor" )) {
|
||||
if(!this.allEnable) {
|
||||
if((this.customFilter && this.customFilter.queryFieldName == "communityId") || (this.properties.adminToolsCommunity !== "monitor")) {
|
||||
//this.config.getCommunityInformation(this.properties, (this.customFilter && this.customFilter.queryFieldName == "communityId") ? this.customFilter.valueId : this.properties.adminToolsCommunity).subscribe(data => {
|
||||
this.subs.push(this.config.communityInformationState.subscribe(data => {
|
||||
if(data) {
|
||||
|
@ -192,6 +190,17 @@ export class EntitiesSelectionComponent {
|
|||
this.showAll = false;
|
||||
this.show = 4;
|
||||
}
|
||||
} else {
|
||||
this.showResearchOutcomes = true;
|
||||
this.showPublications = true;
|
||||
this.showDatasets = true;
|
||||
this.showSoftware = true;
|
||||
this.showOther = true;
|
||||
this.showProjects = true;
|
||||
this.showOrganizations = true;
|
||||
this.showDataProviders = true;
|
||||
this.showAll = true;
|
||||
this.show = 5;
|
||||
}
|
||||
this.selectedEntity = this.currentEntity;
|
||||
this.selectionChange.emit({
|
||||
|
|
Loading…
Reference in New Issue