Merge pull request #13156 from deaflynx/fix/external-id-delete-save-widget
Fix overwrite of externalId on save widget
This commit is contained in:
commit
0cf9e48199
@ -115,6 +115,7 @@ import { DataKeySettingsFunction } from '@home/components/widget/lib/settings/co
|
|||||||
import { UtilsService } from '@core/services/utils.service';
|
import { UtilsService } from '@core/services/utils.service';
|
||||||
import { CompiledTbFunction } from '@shared/models/js-function.models';
|
import { CompiledTbFunction } from '@shared/models/js-function.models';
|
||||||
import { FormProperty } from '@shared/models/dynamic-form.models';
|
import { FormProperty } from '@shared/models/dynamic-form.models';
|
||||||
|
import { ExportableEntity } from '@shared/models/base-data';
|
||||||
|
|
||||||
export interface IWidgetAction {
|
export interface IWidgetAction {
|
||||||
name: string;
|
name: string;
|
||||||
@ -573,7 +574,7 @@ export interface IDynamicWidgetComponent {
|
|||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WidgetInfo extends WidgetTypeDescriptor, WidgetControllerDescriptor {
|
export interface WidgetInfo extends WidgetTypeDescriptor, WidgetControllerDescriptor, ExportableEntity<WidgetTypeId> {
|
||||||
widgetName: string;
|
widgetName: string;
|
||||||
fullFqn: string;
|
fullFqn: string;
|
||||||
deprecated: boolean;
|
deprecated: boolean;
|
||||||
@ -681,6 +682,7 @@ export const toWidgetInfo = (widgetTypeEntity: WidgetType): WidgetInfo => ({
|
|||||||
fullFqn: fullWidgetTypeFqn(widgetTypeEntity),
|
fullFqn: fullWidgetTypeFqn(widgetTypeEntity),
|
||||||
deprecated: widgetTypeEntity.deprecated,
|
deprecated: widgetTypeEntity.deprecated,
|
||||||
scada: widgetTypeEntity.scada,
|
scada: widgetTypeEntity.scada,
|
||||||
|
externalId: widgetTypeEntity.externalId,
|
||||||
type: widgetTypeEntity.descriptor.type,
|
type: widgetTypeEntity.descriptor.type,
|
||||||
sizeX: widgetTypeEntity.descriptor.sizeX,
|
sizeX: widgetTypeEntity.descriptor.sizeX,
|
||||||
sizeY: widgetTypeEntity.descriptor.sizeY,
|
sizeY: widgetTypeEntity.descriptor.sizeY,
|
||||||
@ -736,6 +738,7 @@ export const toWidgetType = (widgetInfo: WidgetInfo, id: WidgetTypeId, tenantId:
|
|||||||
name: widgetInfo.widgetName,
|
name: widgetInfo.widgetName,
|
||||||
deprecated: widgetInfo.deprecated,
|
deprecated: widgetInfo.deprecated,
|
||||||
scada: widgetInfo.scada,
|
scada: widgetInfo.scada,
|
||||||
|
externalId: widgetInfo.externalId,
|
||||||
descriptor
|
descriptor
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -206,7 +206,7 @@ export interface WidgetControllerDescriptor {
|
|||||||
actionSources?: {[actionSourceId: string]: WidgetActionSource};
|
actionSources?: {[actionSourceId: string]: WidgetActionSource};
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BaseWidgetType extends BaseData<WidgetTypeId>, HasTenantId, HasVersion {
|
export interface BaseWidgetType extends BaseData<WidgetTypeId>, HasTenantId, HasVersion, ExportableEntity<WidgetTypeId> {
|
||||||
tenantId: TenantId;
|
tenantId: TenantId;
|
||||||
fqn: string;
|
fqn: string;
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user