From ca80593e4ee4bfc3b629c343a3b011d390dfd828 Mon Sep 17 00:00:00 2001 From: Argiro Kokogiannaki Date: Fri, 20 Nov 2020 10:52:17 +0000 Subject: [PATCH] [Dashboard|Trunk] Indicators description: update the logic for the 2 descriptions show and enable description based on the type of the profile and if it is inherited or not git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@59926 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/topic/indicators.component.html | 18 ++++++++++-------- src/app/topic/indicators.component.ts | 8 ++++---- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/app/topic/indicators.component.html b/src/app/topic/indicators.component.html index c85ea3c..213bba9 100644 --- a/src/app/topic/indicators.component.html +++ b/src/app/topic/indicators.component.html @@ -237,13 +237,14 @@
-
+ label="Profile description" type="textarea">
-
+ label="Description" type="textarea">
-
+ label="Default Description" type="textarea">
-
+ label="Description" type="textarea">
diff --git a/src/app/topic/indicators.component.ts b/src/app/topic/indicators.component.ts index 5393e0b..4458989 100644 --- a/src/app/topic/indicators.component.ts +++ b/src/app/topic/indicators.component.ts @@ -682,7 +682,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV } if (this.indicator.defaultId) { setTimeout(() => { - this.numberIndicatorFb.get('additionalDescription').disable(); + this.numberIndicatorFb.get('description').disable(); }, 0); } this.editNumberModal.cancelButtonText = 'Cancel'; @@ -741,7 +741,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV } if (this.indicator.defaultId) { setTimeout(() => { - this.chartIndicatorFb.get('additionalDescription').disable(); + this.chartIndicatorFb.get('description').disable(); }, 0); } this.editChartModal.cancelButtonText = 'Cancel'; @@ -760,11 +760,11 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV saveIndicator() { this.editing = true; if (this.indicator.type === 'chart') { - this.chartIndicatorFb.get('additionalDescription').enable(); + this.chartIndicatorFb.get('description').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.numberIndicatorFb.get('description').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); }