diff --git a/src/app/topic/indicators.component.ts b/src/app/topic/indicators.component.ts index 8a6a0c3..9650b2c 100644 --- a/src/app/topic/indicators.component.ts +++ b/src/app/topic/indicators.component.ts @@ -633,6 +633,11 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV }); this.addNumberIndicatorPath(); } + if(this.indicator.defaultId) { + setTimeout(() => { + this.numberIndicatorFb.get('additionalDescription').disable(); + }, 0); + } this.editNumberModal.cancelButtonText = 'Cancel'; this.editNumberModal.okButtonLeft = false; this.editNumberModal.alertMessage = false; @@ -686,6 +691,11 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV }); this.addChartIndicatorPath(); } + if(this.indicator.defaultId) { + setTimeout(() => { + this.chartIndicatorFb.get('additionalDescription').disable(); + }, 0); + } this.editChartModal.cancelButtonText = 'Cancel'; this.editChartModal.okButtonLeft = false; this.editChartModal.alertMessage = false; @@ -702,9 +712,11 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV saveIndicator() { this.editing = true; if (this.indicator.type === 'chart') { + this.chartIndicatorFb.get('additionalDescription').enable(); this.indicator = this.indicatorUtils.generateIndicatorByForm(this.chartIndicatorFb.value, this.indicator.indicatorPaths, this.indicator.type, true); this.section = this.charts.find(section => section._id === this.section._id); } else { + this.numberIndicatorFb.get('additionalDescription').enable(); this.indicator = this.indicatorUtils.generateIndicatorByForm(this.numberIndicatorFb.value, this.indicator.indicatorPaths, this.indicator.type, false); this.section = this.numbers.find(section => section._id === this.section._id); }