Browse Source

Refactoring

pull/4592/head
Kalutka Zhenya 5 years ago
parent
commit
bcfa6e7f54
  1. 6
      ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.ts

6
ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.ts

@ -29,8 +29,7 @@ import {
Validators
} from '@angular/forms';
import {
WidgetConfigComponentData,
WidgetInfo
WidgetConfigComponentData
} from '@home/models/widget-component.models';
import { Observable, of } from 'rxjs';
import { Router } from '@angular/router';
@ -73,10 +72,8 @@ export class WidgetActionDialogComponent extends DialogComponent<WidgetActionDia
@ViewChild('mobileActionEditor', {static: false}) mobileActionEditor: MobileActionEditorComponent;
widgetActionFormGroup: FormGroup;
actionTypeFormGroup: FormGroup;
widgetInfo: WidgetInfo;
isAdd: boolean;
action: WidgetActionDescriptorInfo;
@ -148,7 +145,6 @@ export class WidgetActionDialogComponent extends DialogComponent<WidgetActionDia
this.fb.control(action ? action.targetDashboardStateId : null,
type === WidgetActionType.openDashboardState ? [Validators.required] : [])
);
this.actionTypeFormGroup.addControl(
'setEntityId',
this.fb.control(action ? action.setEntityId : this.data.modelValue.widgetType === widgetType.static ? false : true , [])

Loading…
Cancel
Save