Commit 1c3b956e5635305e7b22903eec878c796dfa2f64

Authored by Serhii Mikhnytskyi
Committed by Andrew Shvayka
1 parent 3963b561

modified parent method prepareFormValue in dashboard-form, deleted unused code in rulechain-page

@@ -95,6 +95,12 @@ export class DashboardFormComponent extends EntityComponent<Dashboard> { @@ -95,6 +95,12 @@ export class DashboardFormComponent extends EntityComponent<Dashboard> {
95 this.entityForm.patchValue({configuration: {description: entity.configuration ? entity.configuration.description : ''}}); 95 this.entityForm.patchValue({configuration: {description: entity.configuration ? entity.configuration.description : ''}});
96 } 96 }
97 97
  98 + prepareFormValue(formValue: any): any {
  99 + const preparedValue = super.prepareFormValue(formValue);
  100 + preparedValue.configuration = {...(this.entity.configuration || {}), ...(preparedValue.configuration || {})};
  101 + return preparedValue;
  102 + }
  103 +
98 onPublicLinkCopied($event) { 104 onPublicLinkCopied($event) {
99 this.store.dispatch(new ActionNotificationShow( 105 this.store.dispatch(new ActionNotificationShow(
100 { 106 {
@@ -1551,10 +1551,6 @@ export class AddRuleNodeDialogComponent extends DialogComponent<AddRuleNodeDialo @@ -1551,10 +1551,6 @@ export class AddRuleNodeDialogComponent extends DialogComponent<AddRuleNodeDialo
1551 add(): void { 1551 add(): void {
1552 this.submitted = true; 1552 this.submitted = true;
1553 1553
1554 - const formValue = this.ruleNodeDetailsComponent.ruleNodeFormGroup.value;  
1555 -  
1556 - formValue.name = formValue.name.trim();  
1557 -  
1558 this.ruleNodeDetailsComponent.validate(); 1554 this.ruleNodeDetailsComponent.validate();
1559 if (this.ruleNodeDetailsComponent.ruleNodeFormGroup.valid) { 1555 if (this.ruleNodeDetailsComponent.ruleNodeFormGroup.valid) {
1560 this.dialogRef.close(this.ruleNode); 1556 this.dialogRef.close(this.ruleNode);