Revision 60868
Added by Konstantinos Triantafyllou about 3 years ago
entitiesSelection.component.ts | ||
---|---|---|
6 | 6 |
import {Router} from "@angular/router"; |
7 | 7 |
import {MatSelect} from "@angular/material"; |
8 | 8 |
import {Subscription} from "rxjs"; |
9 |
import {properties} from '../../../../environments/environment'; |
|
9 | 10 |
|
10 | 11 |
@Component({ |
11 | 12 |
selector: 'entities-selection', |
... | ... | |
79 | 80 |
showDataProviders: boolean = false; |
80 | 81 |
showOrganizations: boolean = false; |
81 | 82 |
showAll: boolean = true; |
82 |
@Input() properties: EnvProperties; |
|
83 |
@Input() allEnable = false; |
|
84 |
@Input() properties: EnvProperties = properties; |
|
83 | 85 |
@Input() customFilter: SearchCustomFilter = null; |
84 | 86 |
@Input() @Output() selectedEntity = "Research Outcomes"; |
85 | 87 |
@Input() currentEntity = "Research Outcomes"; |
... | ... | |
94 | 96 |
|
95 | 97 |
subs: Subscription[] = []; |
96 | 98 |
|
97 |
constructor(private _fb: FormBuilder, private config: ConfigurationService, private router: Router) { |
|
99 |
constructor(private _fb: FormBuilder, private config: ConfigurationService, private router: Router) {}
|
|
98 | 100 |
|
99 |
|
|
100 |
} |
|
101 |
|
|
102 |
|
|
103 | 101 |
ngOnInit() { |
104 | 102 |
this.show = 0; |
105 |
if (this.properties) {
|
|
106 |
if((this.customFilter && this.customFilter.queryFieldName == "communityId") || (this.properties.adminToolsCommunity !== "monitor" )) {
|
|
103 |
if(!this.allEnable) {
|
|
104 |
if((this.customFilter && this.customFilter.queryFieldName == "communityId") || (this.properties.adminToolsCommunity !== "monitor")) { |
|
107 | 105 |
//this.config.getCommunityInformation(this.properties, (this.customFilter && this.customFilter.queryFieldName == "communityId") ? this.customFilter.valueId : this.properties.adminToolsCommunity).subscribe(data => { |
108 | 106 |
this.subs.push(this.config.communityInformationState.subscribe(data => { |
109 | 107 |
if(data) { |
... | ... | |
192 | 190 |
this.showAll = false; |
193 | 191 |
this.show = 4; |
194 | 192 |
} |
193 |
} else { |
|
194 |
this.showResearchOutcomes = true; |
|
195 |
this.showPublications = true; |
|
196 |
this.showDatasets = true; |
|
197 |
this.showSoftware = true; |
|
198 |
this.showOther = true; |
|
199 |
this.showProjects = true; |
|
200 |
this.showOrganizations = true; |
|
201 |
this.showDataProviders = true; |
|
202 |
this.showAll = true; |
|
203 |
this.show = 5; |
|
195 | 204 |
} |
196 | 205 |
this.selectedEntity = this.currentEntity; |
197 | 206 |
this.selectionChange.emit({ |
Also available in: Unified diff
[Library | Trunk]: Entities selection add enable all parameter