diff --git a/ui-ngx/src/app/modules/home/components/widget/action/manage-widget-actions.component.ts b/ui-ngx/src/app/modules/home/components/widget/action/manage-widget-actions.component.ts index 2a68251c3d..d3fdd47bba 100644 --- a/ui-ngx/src/app/modules/home/components/widget/action/manage-widget-actions.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/action/manage-widget-actions.component.ts @@ -42,7 +42,7 @@ import { WidgetActionDialogData } from '@home/components/widget/action/widget-action-dialog.component'; import { deepClone } from '@core/utils'; -import { WidgetConfigComponentData } from '@home/models/widget-component.models'; +import { widgetType } from '@shared/models/widget.models'; @Component({ selector: 'tb-manage-widget-actions', @@ -60,7 +60,7 @@ export class ManageWidgetActionsComponent extends PageComponent implements OnIni @Input() disabled: boolean; - @Input() modelValue: WidgetConfigComponentData; + @Input() widgetType: widgetType; @Input() callbacks: WidgetActionCallbacks; @@ -184,7 +184,7 @@ export class ManageWidgetActionsComponent extends PageComponent implements OnIni callbacks: this.callbacks, actionsData, action: deepClone(action), - modelValue: this.modelValue + widgetType: this.widgetType } }).afterClosed().subscribe( (res) => { diff --git a/ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.html b/ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.html index 36234da531..2c7b826200 100644 --- a/ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.html @@ -120,7 +120,7 @@ widgetActionFormGroup.get('type').value === widgetActionType.updateDashboardState || widgetActionFormGroup.get('type').value === widgetActionType.openDashboard ? widgetActionFormGroup.get('type').value : ''"> - + {{ 'widget-action.set-entity-from-widget' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/widget/widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/widget.component.ts index 4caf5f3edd..d010ea24a0 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/widget.component.ts @@ -1015,7 +1015,7 @@ export class WidgetComponent extends PageComponent implements OnInit, AfterViewI const type = descriptor.type; const targetEntityParamName = descriptor.stateEntityParamName; let targetEntityId: EntityId; - if (descriptor.setEntityId && validateEntityId(entityId)) { + if (this.widgetInfo.type !== 'static' && descriptor.setEntityId && validateEntityId(entityId)) { targetEntityId = entityId; } switch (type) {