From 80c88075b9e14930b44698a524d400a4c090ded2 Mon Sep 17 00:00:00 2001 From: Konstantinos Triantafyllou Date: Thu, 5 Nov 2020 08:20:18 +0000 Subject: [PATCH] [Monitor Dashboard | Trunk]: Disable additional description if is not default profile git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@59776 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/topic/indicators.component.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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); }