From 35e45631446ec80aecd3bef747b467b20da9b657 Mon Sep 17 00:00:00 2001 From: argirok Date: Fri, 9 Sep 2022 13:00:39 +0300 Subject: [PATCH] fix export indicators not in the current active subcategory --- src/app/topic/indicators.component.ts | 8 ++++---- src/app/topic/topic.component.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/topic/indicators.component.ts b/src/app/topic/indicators.component.ts index a39651d..e53ac93 100644 --- a/src/app/topic/indicators.component.ts +++ b/src/app/topic/indicators.component.ts @@ -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] = { diff --git a/src/app/topic/topic.component.html b/src/app/topic/topic.component.html index ec8c8ed..2338c2e 100644 --- a/src/app/topic/topic.component.html +++ b/src/app/topic/topic.component.html @@ -274,7 +274,7 @@
  • - +
    Export indicators