Revision 57757
Added by Argiro Kokogiannaki over 4 years ago
monitor.component.ts | ||
---|---|---|
15 | 15 |
import {StatisticsService} from "../utils/services/statistics.service"; |
16 | 16 |
import {Item, Sidebar} from "../utils/entities/sidebar"; |
17 | 17 |
import {IndicatorUtils} from "../utils/indicator-utils"; |
18 |
import {StakeholderCreator} from "../utils/entities/stakeholderCreator"; |
|
18 | 19 |
import {LayoutService} from "../library/sharedComponents/sidebar/layout.service"; |
19 | 20 |
|
20 | 21 |
@Component({ |
... | ... | |
61 | 62 |
} |
62 | 63 |
|
63 | 64 |
public ngOnInit() { |
65 |
this.layoutService.setHasSidebar(false); |
|
66 |
this.layoutService.setHasHeader(false); |
|
64 | 67 |
this.route.data |
65 | 68 |
.subscribe((data: { envSpecific: EnvProperties }) => { |
66 | 69 |
this.route.params.subscribe(params => { |
... | ... | |
70 | 73 |
this.status = this.errorCodes.LOADING; |
71 | 74 |
this.numberResults = new Map<number, number>(); |
72 | 75 |
this.chartsActiveType = new Map<number, IndicatorPath>(); |
73 |
this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => { |
|
76 |
// this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => { |
|
77 |
let stakeholder:Stakeholder = null; |
|
78 |
if(params['stakeholder']=="fwf"){ |
|
79 |
stakeholder = StakeholderCreator.createFunderFromDefaultProfile("fwf","funder","fwf_________::FWF", |
|
80 |
"Austrian Science Fund (FWF)","FWF", |
|
81 |
false,"fwf",true,true, null); |
|
82 |
stakeholder.logoUrl = "./assets/fwf.png"; |
|
83 |
}else if(params['stakeholder']=="arc"){ |
|
84 |
stakeholder = StakeholderCreator.createFunderFromDefaultProfile("arc","funder","arc_________::ARC", |
|
85 |
"Australian Research Council (ARC)","ARC", |
|
86 |
false,"arc",true,true, null); |
|
87 |
stakeholder.logoUrl = "./assets/arc1.gif"; |
|
88 |
}else{ |
|
89 |
stakeholder = StakeholderCreator.createFunderFromDefaultProfile("ec","funder","ec__________::EC", |
|
90 |
"European Commission","EC", |
|
91 |
false,"ec",true,true, null); |
|
92 |
stakeholder.logoUrl = "./assets/ec.png"; |
|
93 |
} |
|
94 |
|
|
74 | 95 |
if(stakeholder) { |
75 | 96 |
this.stakeholder = stakeholder; |
76 | 97 |
this.seoService.createLinkForCanonicalURL(url, false); |
... | ... | |
89 | 110 |
this.status = this.errorCodes.DONE; |
90 | 111 |
this.setView(params); |
91 | 112 |
} |
92 |
}, error => { |
|
93 |
this.navigateToError(); |
|
94 |
}) |
|
113 |
// }, error => {
|
|
114 |
// this.navigateToError();
|
|
115 |
// })
|
|
95 | 116 |
} else { |
96 | 117 |
this.setView(params); |
97 | 118 |
} |
... | ... | |
179 | 200 |
category.subCategories.forEach(subCategory => { |
180 | 201 |
if (subCategory.alias != null && subCategory.isPublic && subCategory.isActive) { |
181 | 202 |
subItems.push(new Item(subCategory.name, ( |
182 |
this.stakeholder.alias + '/' + this.activeTopic.alias + '/' + category.alias + '/' + subCategory.alias), |
|
203 |
'/' + this.stakeholder.alias + '/' + this.activeTopic.alias + '/' + category.alias + '/' + subCategory.alias),
|
|
183 | 204 |
null, null, false)); |
184 | 205 |
} |
185 | 206 |
}); |
186 | 207 |
const open = this.activeCategory.alias === category.alias; |
187 | 208 |
items.push(new Item(category.name, ( |
188 |
this.stakeholder.alias + '/' + this.activeTopic.alias + '/' + category.alias), |
|
209 |
'/' + this.stakeholder.alias + '/' + this.activeTopic.alias + '/' + category.alias),
|
|
189 | 210 |
subItems, null, open)); |
190 | 211 |
} |
191 | 212 |
}); |
Also available in: Unified diff
Add logo files for demo fundersuse recommenderfor in order to indicators and subcategories to a stakeholder-make changes to monitor component according to the mocks
-StakeHolder model:
--add logoUrl
--add recommenderFor in subCategory and Indicator level (for demo)
-StakeHolderCreator(for demo):
--add h2020 & fp7 charts & categories
-
-monitor-css: add doubleheader custom css and stakeholderPage