[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
This commit is contained in:
parent
178a17cbbf
commit
ca80593e4e
|
@ -237,13 +237,14 @@
|
||||||
<div *ngIf="numberIndicatorFb" class="uk-padding-small" [formGroup]="numberIndicatorFb">
|
<div *ngIf="numberIndicatorFb" class="uk-padding-small" [formGroup]="numberIndicatorFb">
|
||||||
<div class="uk-grid" uk-grid>
|
<div class="uk-grid" uk-grid>
|
||||||
<div dashboard-input class="uk-width-1-1" [formInput]="numberIndicatorFb.get('name')" label="Title"></div>
|
<div dashboard-input class="uk-width-1-1" [formInput]="numberIndicatorFb.get('name')" label="Title"></div>
|
||||||
<div dashboard-input class="uk-width-1-1"
|
<div dashboard-input class="uk-width-1-1" *ngIf="stakeholder.defaultId !=-1 && ( (indicator.description &&
|
||||||
|
indicator.description.length > 0) || !stakeholder.defaultId)"
|
||||||
[formInput]="numberIndicatorFb.get('description')"
|
[formInput]="numberIndicatorFb.get('description')"
|
||||||
label="Description" type="textarea">
|
label="Profile description" type="textarea">
|
||||||
</div>
|
</div>
|
||||||
<div dashboard-input *ngIf="isCurator || indicator.defaultId" class="uk-width-1-1"
|
<div dashboard-input class="uk-width-1-1" *ngIf="stakeholder.defaultId"
|
||||||
[formInput]="numberIndicatorFb.get('additionalDescription')"
|
[formInput]="numberIndicatorFb.get('additionalDescription')"
|
||||||
label="Additional information" type="textarea">
|
label="Description" type="textarea">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div dashboard-input class="uk-width-1-2@m" [formInput]="numberIndicatorFb.get('visibility')"
|
<div dashboard-input class="uk-width-1-2@m" [formInput]="numberIndicatorFb.get('visibility')"
|
||||||
|
@ -340,13 +341,14 @@
|
||||||
<div *ngIf="chartIndicatorFb" class="uk-padding-small" [formGroup]="chartIndicatorFb">
|
<div *ngIf="chartIndicatorFb" class="uk-padding-small" [formGroup]="chartIndicatorFb">
|
||||||
<div class="uk-grid" uk-grid>
|
<div class="uk-grid" uk-grid>
|
||||||
<div dashboard-input class="uk-width-1-1" [formInput]="chartIndicatorFb.get('name')" label="Title"></div>
|
<div dashboard-input class="uk-width-1-1" [formInput]="chartIndicatorFb.get('name')" label="Title"></div>
|
||||||
<div dashboard-input class="uk-width-1-1"
|
<div dashboard-input class="uk-width-1-1" *ngIf="stakeholder.defaultId !=-1 && ( (indicator.description &&
|
||||||
|
indicator.description.length > 0) || !stakeholder.defaultId)"
|
||||||
[formInput]="chartIndicatorFb.get('description')"
|
[formInput]="chartIndicatorFb.get('description')"
|
||||||
label="Description" type="textarea">
|
label="Default Description" type="textarea">
|
||||||
</div>
|
</div>
|
||||||
<div dashboard-input *ngIf="isCurator || indicator.defaultId" class="uk-width-1-1"
|
<div dashboard-input *ngIf="stakeholder.defaultId" class="uk-width-1-1"
|
||||||
[formInput]="chartIndicatorFb.get('additionalDescription')"
|
[formInput]="chartIndicatorFb.get('additionalDescription')"
|
||||||
label="Additional information" type="textarea">
|
label="Description" type="textarea">
|
||||||
</div>
|
</div>
|
||||||
<div dashboard-input class="uk-width-1-2@m" [formInput]="chartIndicatorFb.get('visibility')"
|
<div dashboard-input class="uk-width-1-2@m" [formInput]="chartIndicatorFb.get('visibility')"
|
||||||
label="Status" [options]="stakeholderUtils.visibility" type="select">
|
label="Status" [options]="stakeholderUtils.visibility" type="select">
|
||||||
|
|
|
@ -682,7 +682,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
|
||||||
}
|
}
|
||||||
if (this.indicator.defaultId) {
|
if (this.indicator.defaultId) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.numberIndicatorFb.get('additionalDescription').disable();
|
this.numberIndicatorFb.get('description').disable();
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
this.editNumberModal.cancelButtonText = 'Cancel';
|
this.editNumberModal.cancelButtonText = 'Cancel';
|
||||||
|
@ -741,7 +741,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
|
||||||
}
|
}
|
||||||
if (this.indicator.defaultId) {
|
if (this.indicator.defaultId) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.chartIndicatorFb.get('additionalDescription').disable();
|
this.chartIndicatorFb.get('description').disable();
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
this.editChartModal.cancelButtonText = 'Cancel';
|
this.editChartModal.cancelButtonText = 'Cancel';
|
||||||
|
@ -760,11 +760,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.chartIndicatorFb.get('description').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.numberIndicatorFb.get('description').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