Refactoring
This commit is contained in:
parent
1f5a8ef70f
commit
bcfa6e7f54
@ -29,8 +29,7 @@ import {
|
|||||||
Validators
|
Validators
|
||||||
} from '@angular/forms';
|
} from '@angular/forms';
|
||||||
import {
|
import {
|
||||||
WidgetConfigComponentData,
|
WidgetConfigComponentData
|
||||||
WidgetInfo
|
|
||||||
} from '@home/models/widget-component.models';
|
} from '@home/models/widget-component.models';
|
||||||
import { Observable, of } from 'rxjs';
|
import { Observable, of } from 'rxjs';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
@ -73,10 +72,8 @@ export class WidgetActionDialogComponent extends DialogComponent<WidgetActionDia
|
|||||||
|
|
||||||
@ViewChild('mobileActionEditor', {static: false}) mobileActionEditor: MobileActionEditorComponent;
|
@ViewChild('mobileActionEditor', {static: false}) mobileActionEditor: MobileActionEditorComponent;
|
||||||
|
|
||||||
|
|
||||||
widgetActionFormGroup: FormGroup;
|
widgetActionFormGroup: FormGroup;
|
||||||
actionTypeFormGroup: FormGroup;
|
actionTypeFormGroup: FormGroup;
|
||||||
widgetInfo: WidgetInfo;
|
|
||||||
|
|
||||||
isAdd: boolean;
|
isAdd: boolean;
|
||||||
action: WidgetActionDescriptorInfo;
|
action: WidgetActionDescriptorInfo;
|
||||||
@ -148,7 +145,6 @@ export class WidgetActionDialogComponent extends DialogComponent<WidgetActionDia
|
|||||||
this.fb.control(action ? action.targetDashboardStateId : null,
|
this.fb.control(action ? action.targetDashboardStateId : null,
|
||||||
type === WidgetActionType.openDashboardState ? [Validators.required] : [])
|
type === WidgetActionType.openDashboardState ? [Validators.required] : [])
|
||||||
);
|
);
|
||||||
|
|
||||||
this.actionTypeFormGroup.addControl(
|
this.actionTypeFormGroup.addControl(
|
||||||
'setEntityId',
|
'setEntityId',
|
||||||
this.fb.control(action ? action.setEntityId : this.data.modelValue.widgetType === widgetType.static ? false : true , [])
|
this.fb.control(action ? action.setEntityId : this.data.modelValue.widgetType === widgetType.static ? false : true , [])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user