[Monitor Dashboard | Trunk]: Indicators: Build sections on an entity changed.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@60246 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Konstantinos Triantafyllou 2021-01-14 18:56:12 +00:00
parent 957934730c
commit a1968a2899
1 changed files with 5 additions and 6 deletions

View File

@ -111,15 +111,13 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
}));
this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
this.stakeholder = stakeholder;
if (this.stakeholder) {
if (this.stakeholder && this.firstLoad) {
this.buildFilters();
this.buildSections();
if(this.firstLoad) {
this.filterCharts();
this.filterNumbers();
this.firstLoad = false;
}
this.filterCharts();
this.filterNumbers();
this.setPreview();
this.firstLoad = false;
}
}));
}
@ -146,6 +144,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
ngOnChanges(changes: SimpleChanges): void {
if (this.canEdit) {
if (changes.topicIndex || changes.categoryIndex || changes.subcategoryIndex) {
this.buildSections();
this.buildFilters();
this.initReorder();
}