Revision 57381
Added by Konstantinos Triantafyllou over 4 years ago
modules/uoa-monitor-portal/trunk/monitor/src/app/monitor/monitor.component.ts | ||
---|---|---|
105 | 105 |
if (this.activeTopic) { |
106 | 106 |
if (params['category']) { |
107 | 107 |
this.activeCategory = this.activeTopic.categories.filter(category => |
108 |
category.alias === decodeURIComponent(params['category']))[0];
|
|
108 |
(category.alias === params['category']) && category.isPublic && category.isActive)[0];
|
|
109 | 109 |
} else { |
110 | 110 |
let category: Category = this.activeTopic.categories[0]; |
111 | 111 |
this.navigateTo(this.stakeholder.alias, this.activeTopic.alias, category.alias); |
... | ... | |
114 | 114 |
if (this.activeCategory) { |
115 | 115 |
if (params['subCategory']) { |
116 | 116 |
this.activeSubCategory = this.activeCategory.subCategories.filter(subCategory => |
117 |
subCategory.alias = decodeURIComponent(params['subCategory']))[0];
|
|
117 |
(subCategory.alias === params['subCategory'] && subCategory.isPublic && subCategory.isActive))[0];
|
|
118 | 118 |
} else { |
119 |
this.activeSubCategory = this.activeCategory.subCategories.filter(subCategory => !subCategory.alias)[0]; |
|
119 |
this.activeSubCategory = this.activeCategory.subCategories.filter(subCategory => |
|
120 |
subCategory.isPublic && subCategory.isActive)[0]; |
|
120 | 121 |
} |
121 | 122 |
if (this.activeSubCategory) { |
122 | 123 |
this.setSideBar(); |
Also available in: Unified diff
[Monitor]: Fix active and public for caterories and sub-categories.