Revision 57393
Added by Konstantinos Triantafyllou over 4 years ago
monitor.component.ts | ||
---|---|---|
14 | 14 |
import {Category, IndicatorPath, Stakeholder, SubCategory, Topic} from "../utils/entities/stakeholder"; |
15 | 15 |
import {MenuItem, RootMenuItem, SideMenuItem} from "../openaireLibrary/sharedComponents/menu"; |
16 | 16 |
import {StatisticsService} from "../utils/services/statistics.service"; |
17 |
import {response} from "express"; |
|
18 | 17 |
|
19 | 18 |
@Component({ |
20 | 19 |
selector: 'monitor', |
... | ... | |
118 | 117 |
(subCategory.alias === params['subCategory'] && subCategory.isPublic && subCategory.isActive))[0]; |
119 | 118 |
} else { |
120 | 119 |
this.activeSubCategory = this.activeCategory.subCategories.filter(subCategory => |
121 |
subCategory.isPublic && subCategory.isActive)[0]; |
|
120 |
!subCategory.alias && subCategory.isPublic && subCategory.isActive)[0];
|
|
122 | 121 |
} |
123 | 122 |
if (this.activeSubCategory) { |
124 | 123 |
this.setSideBar(); |
125 | 124 |
this.setIndicators(); |
126 | 125 |
return; |
126 |
} else { |
|
127 |
let subCategory: SubCategory = this.activeCategory.subCategories.filter( subCategory => |
|
128 |
subCategory.isPublic && subCategory.isActive)[0]; |
|
129 |
this.navigateTo(this.stakeholder.alias, this.activeTopic.alias, this.activeCategory.alias, subCategory.alias); |
|
130 |
return; |
|
127 | 131 |
} |
128 | 132 |
} |
129 | 133 |
} |
Also available in: Unified diff
[Monitor]: Redirect to subcategory if no overview.