Browse Source

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

pull/3551/head
Serhii Mikhnytskyi 6 years ago
committed by Andrew Shvayka
parent
commit
1c3b956e56
  1. 6
      ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.ts
  2. 4
      ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.ts

6
ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.ts

@ -95,6 +95,12 @@ export class DashboardFormComponent extends EntityComponent<Dashboard> {
this.entityForm.patchValue({configuration: {description: entity.configuration ? entity.configuration.description : ''}});
}
prepareFormValue(formValue: any): any {
const preparedValue = super.prepareFormValue(formValue);
preparedValue.configuration = {...(this.entity.configuration || {}), ...(preparedValue.configuration || {})};
return preparedValue;
}
onPublicLinkCopied($event) {
this.store.dispatch(new ActionNotificationShow(
{

4
ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.ts

@ -1551,10 +1551,6 @@ export class AddRuleNodeDialogComponent extends DialogComponent<AddRuleNodeDialo
add(): void {
this.submitted = true;
const formValue = this.ruleNodeDetailsComponent.ruleNodeFormGroup.value;
formValue.name = formValue.name.trim();
this.ruleNodeDetailsComponent.validate();
if (this.ruleNodeDetailsComponent.ruleNodeFormGroup.valid) {
this.dialogRef.close(this.ruleNode);

Loading…
Cancel
Save