Browse Source

Fixed profile saves triggers the saved device configuration without changes

pull/14569/head
Maksym Tsymbarov 10 months ago
parent
commit
d5b9e39f68
  1. 4
      ui-ngx/src/app/modules/home/models/entity/entities-table-config.models.ts
  2. 2
      ui-ngx/src/app/modules/home/models/entity/entity-table-component.models.ts
  3. 2
      ui-ngx/src/app/modules/home/pages/asset/asset.component.ts
  4. 2
      ui-ngx/src/app/modules/home/pages/device/device.component.ts
  5. 2
      ui-ngx/src/app/modules/home/pages/tenant/tenant.component.ts

4
ui-ngx/src/app/modules/home/models/entity/entities-table-config.models.ts

@ -236,9 +236,9 @@ export class EntityTableConfig<T extends BaseData<HasId>, P extends PageLink = P
this.table = null; this.table = null;
} }
updateData(closeDetails = false) { updateData(closeDetails = false, reloadEntity = true) {
if (this.table) { if (this.table) {
this.table.updateData(closeDetails); this.table.updateData(closeDetails, reloadEntity);
} else if (this.entityDetailsPage) { } else if (this.entityDetailsPage) {
this.entityDetailsPage.reload(); this.entityDetailsPage.reload();
} }

2
ui-ngx/src/app/modules/home/models/entity/entity-table-component.models.ts

@ -68,7 +68,7 @@ export interface IEntitiesTableComponent {
addEnabled(): boolean; addEnabled(): boolean;
clearSelection(): void; clearSelection(): void;
updateData(closeDetails?: boolean): void; updateData(closeDetails?: boolean, reloadEntity?: boolean): void;
onRowClick($event: Event, entity): void; onRowClick($event: Event, entity): void;
toggleEntityDetails($event: Event, entity); toggleEntityDetails($event: Event, entity);
addEntity($event: Event): void; addEntity($event: Event): void;

2
ui-ngx/src/app/modules/home/pages/asset/asset.component.ts

@ -100,6 +100,6 @@ export class AssetComponent extends EntityComponent<AssetInfo> {
} }
onAssetProfileUpdated() { onAssetProfileUpdated() {
this.entitiesTableConfig.updateData(false); this.entitiesTableConfig.updateData(false,false);
} }
} }

2
ui-ngx/src/app/modules/home/pages/device/device.component.ts

@ -142,7 +142,7 @@ export class DeviceComponent extends EntityComponent<DeviceInfo> {
} }
onDeviceProfileUpdated() { onDeviceProfileUpdated() {
this.entitiesTableConfig.updateData(false); this.entitiesTableConfig.updateData(false, false);
} }
onDeviceProfileChanged(deviceProfile: DeviceProfileInfo) { onDeviceProfileChanged(deviceProfile: DeviceProfileInfo) {

2
ui-ngx/src/app/modules/home/pages/tenant/tenant.component.ts

@ -101,6 +101,6 @@ export class TenantComponent extends ContactBasedComponent<TenantInfo> {
} }
onTenantProfileUpdated() { onTenantProfileUpdated() {
this.entitiesTableConfig.updateData(false); this.entitiesTableConfig.updateData(false, false);
} }
} }

Loading…
Cancel
Save