[Monitor]: Redirect to subcategory if no overview.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor@57393 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
05cd331124
commit
c709432365
|
@ -14,7 +14,6 @@ import {StakeholderService} from "../services/stakeholder.service";
|
|||
import {Category, IndicatorPath, Stakeholder, SubCategory, Topic} from "../utils/entities/stakeholder";
|
||||
import {MenuItem, RootMenuItem, SideMenuItem} from "../openaireLibrary/sharedComponents/menu";
|
||||
import {StatisticsService} from "../utils/services/statistics.service";
|
||||
import {response} from "express";
|
||||
|
||||
@Component({
|
||||
selector: 'monitor',
|
||||
|
@ -118,12 +117,17 @@ export class MonitorComponent {
|
|||
(subCategory.alias === params['subCategory'] && subCategory.isPublic && subCategory.isActive))[0];
|
||||
} else {
|
||||
this.activeSubCategory = this.activeCategory.subCategories.filter(subCategory =>
|
||||
subCategory.isPublic && subCategory.isActive)[0];
|
||||
!subCategory.alias && subCategory.isPublic && subCategory.isActive)[0];
|
||||
}
|
||||
if (this.activeSubCategory) {
|
||||
this.setSideBar();
|
||||
this.setIndicators();
|
||||
return;
|
||||
} else {
|
||||
let subCategory: SubCategory = this.activeCategory.subCategories.filter( subCategory =>
|
||||
subCategory.isPublic && subCategory.isActive)[0];
|
||||
this.navigateTo(this.stakeholder.alias, this.activeTopic.alias, this.activeCategory.alias, subCategory.alias);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue