fix export indicators not in the current active subcategory

This commit is contained in:
argirok 2022-09-09 13:00:39 +03:00
parent 06959c7526
commit 35e4563144
2 changed files with 5 additions and 5 deletions

View File

@ -1324,12 +1324,12 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
}
}
public exportIndicators() {
public exportIndicators(subcategoryIndex) {
this.editing = true;
let indicators = [];
let index: number = 0;
let indexIndicator: number = 0;
this.numbers.forEach(section => {
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[subcategoryIndex].numbers.forEach(section => {
section.indicators.forEach(indicator => {
indicator.indicatorPaths.forEach(indicatorPath => {
indicators[indexIndicator] = {
@ -1346,8 +1346,8 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
});
index ++ ;
});
this.charts.forEach(section => {
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[subcategoryIndex].charts.forEach(section => {
section.indicators.forEach(indicator => {
indicator.indicatorPaths.forEach(indicatorPath => {
indicators[indexIndicator] = {

View File

@ -274,7 +274,7 @@
</li>
<li class="uk-nav-divider"></li>
<li *ngIf="indicators">
<a (click)=" indicators.exportIndicators();hide(element)">
<a (click)=" indicators.exportIndicators(i);hide(element)">
<div class="uk-flex uk-flex-middle">
<icon [flex]="true" name="download" ratio="0.6"></icon>
<span class="uk-margin-small-left uk-width-expand">Export indicators</span>