Revision 60171
Added by Argiro Kokogiannaki over 3 years ago
searchOrganizations.component.ts | ||
---|---|---|
3 | 3 |
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service"; |
4 | 4 |
import {SearchCustomFilter} from "../../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; |
5 | 5 |
import {Subscriber} from "rxjs"; |
6 |
import {ConfigurationService} from "../../../openaireLibrary/utils/configuration/configuration.service"; |
|
6 | 7 |
|
7 | 8 |
@Component({ |
8 | 9 |
selector: 'monitor-advanced-search-organizations', |
9 | 10 |
template: ` |
10 | 11 |
<div id="page_content"> |
11 |
<search-organizations *ngIf="initialized" [simpleView]="false" [showSwitchSearchLink]="false" [customFilter]="customFilter"> |
|
12 |
<search-organizations *ngIf="initialized" [simpleView]="false" [showSwitchSearchLink]="false" [customFilter]="customFilter" |
|
13 |
[piwikSiteId]="piwikSiteId"> |
|
12 | 14 |
</search-organizations> |
13 | 15 |
</div> |
14 | 16 |
` |
... | ... | |
16 | 18 |
export class MonitorAdvancedSearchOrganizationsComponent { |
17 | 19 |
initialized: boolean = false; |
18 | 20 |
customFilter: SearchCustomFilter = null; |
19 |
|
|
21 |
piwikSiteId; |
|
20 | 22 |
constructor(private route: ActivatedRoute, |
21 | 23 |
private router: Router, |
22 |
private stakeholderService: StakeholderService) { |
|
24 |
private stakeholderService: StakeholderService, private configurationService: ConfigurationService) {
|
|
23 | 25 |
} |
24 | 26 |
subscriptions = []; |
25 | 27 |
ngOnDestroy() { |
... | ... | |
48 | 50 |
this.customFilter = new SearchCustomFilter("Community", "community", value, stakeholder.name); |
49 | 51 |
this.customFilter.isHiddenFilter = false; |
50 | 52 |
} |
53 |
this.subscriptions.push(this.configurationService.communityInformationState.subscribe(portal => { |
|
54 |
if (portal) { |
|
55 |
this.piwikSiteId = portal.piwik; |
|
56 |
} |
|
57 |
})); |
|
51 | 58 |
this.initialized = true; |
52 | 59 |
} |
53 | 60 |
})); |
Also available in: Unified diff
[Monitor dashboard | Trunk]
Admin tools:
- move amdin tool components underadmin-tool folder
- create admin tool routing module
- remove guard from each module and put it in admin tool routing module
Piwik:
- add piwik from configuration service and pass it in search, landing, monitor
App component:
- when stakeholder changes: update or reset properties adminToolsCommunity, adminToolsPortalType and init community information