[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
This commit is contained in:
parent
f6319eac64
commit
80c88075b9
|
@ -633,6 +633,11 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
|
||||||
});
|
});
|
||||||
this.addNumberIndicatorPath();
|
this.addNumberIndicatorPath();
|
||||||
}
|
}
|
||||||
|
if(this.indicator.defaultId) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.numberIndicatorFb.get('additionalDescription').disable();
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
this.editNumberModal.cancelButtonText = 'Cancel';
|
this.editNumberModal.cancelButtonText = 'Cancel';
|
||||||
this.editNumberModal.okButtonLeft = false;
|
this.editNumberModal.okButtonLeft = false;
|
||||||
this.editNumberModal.alertMessage = false;
|
this.editNumberModal.alertMessage = false;
|
||||||
|
@ -686,6 +691,11 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
|
||||||
});
|
});
|
||||||
this.addChartIndicatorPath();
|
this.addChartIndicatorPath();
|
||||||
}
|
}
|
||||||
|
if(this.indicator.defaultId) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.chartIndicatorFb.get('additionalDescription').disable();
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
this.editChartModal.cancelButtonText = 'Cancel';
|
this.editChartModal.cancelButtonText = 'Cancel';
|
||||||
this.editChartModal.okButtonLeft = false;
|
this.editChartModal.okButtonLeft = false;
|
||||||
this.editChartModal.alertMessage = false;
|
this.editChartModal.alertMessage = false;
|
||||||
|
@ -702,9 +712,11 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
|
||||||
saveIndicator() {
|
saveIndicator() {
|
||||||
this.editing = true;
|
this.editing = true;
|
||||||
if (this.indicator.type === 'chart') {
|
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.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);
|
this.section = this.charts.find(section => section._id === this.section._id);
|
||||||
} else {
|
} else {
|
||||||
|
this.numberIndicatorFb.get('additionalDescription').enable();
|
||||||
this.indicator = this.indicatorUtils.generateIndicatorByForm(this.numberIndicatorFb.value, this.indicator.indicatorPaths, this.indicator.type, false);
|
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);
|
this.section = this.numbers.find(section => section._id === this.section._id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue