fix export indicators not in the current active subcategory
This commit is contained in:
parent
06959c7526
commit
35e4563144
|
@ -1324,12 +1324,12 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public exportIndicators() {
|
public exportIndicators(subcategoryIndex) {
|
||||||
this.editing = true;
|
this.editing = true;
|
||||||
let indicators = [];
|
let indicators = [];
|
||||||
let index: number = 0;
|
let index: number = 0;
|
||||||
let indexIndicator: 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 => {
|
section.indicators.forEach(indicator => {
|
||||||
indicator.indicatorPaths.forEach(indicatorPath => {
|
indicator.indicatorPaths.forEach(indicatorPath => {
|
||||||
indicators[indexIndicator] = {
|
indicators[indexIndicator] = {
|
||||||
|
@ -1347,7 +1347,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
|
||||||
index ++ ;
|
index ++ ;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.charts.forEach(section => {
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[subcategoryIndex].charts.forEach(section => {
|
||||||
section.indicators.forEach(indicator => {
|
section.indicators.forEach(indicator => {
|
||||||
indicator.indicatorPaths.forEach(indicatorPath => {
|
indicator.indicatorPaths.forEach(indicatorPath => {
|
||||||
indicators[indexIndicator] = {
|
indicators[indexIndicator] = {
|
||||||
|
|
|
@ -274,7 +274,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li class="uk-nav-divider"></li>
|
<li class="uk-nav-divider"></li>
|
||||||
<li *ngIf="indicators">
|
<li *ngIf="indicators">
|
||||||
<a (click)=" indicators.exportIndicators();hide(element)">
|
<a (click)=" indicators.exportIndicators(i);hide(element)">
|
||||||
<div class="uk-flex uk-flex-middle">
|
<div class="uk-flex uk-flex-middle">
|
||||||
<icon [flex]="true" name="download" ratio="0.6"></icon>
|
<icon [flex]="true" name="download" ratio="0.6"></icon>
|
||||||
<span class="uk-margin-small-left uk-width-expand">Export indicators</span>
|
<span class="uk-margin-small-left uk-width-expand">Export indicators</span>
|
||||||
|
|
Loading…
Reference in New Issue