From 185e7a08749b858158e3fccd901554fb27eb896a Mon Sep 17 00:00:00 2001 From: Artem Babak Date: Tue, 13 Apr 2021 12:53:39 +0300 Subject: [PATCH] Entities table config: fixed addEnabled, detailsReadonly for edge_customer_user --- .../modules/home/pages/asset/assets-table-config.resolver.ts | 4 ++-- .../home/pages/dashboard/dashboards-table-config.resolver.ts | 4 ++-- .../home/pages/device/devices-table-config.resolver.ts | 4 ++-- .../pages/entity-view/entity-views-table-config.resolver.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ui-ngx/src/app/modules/home/pages/asset/assets-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/asset/assets-table-config.resolver.ts index 57f4a18205..4ea3a459cd 100644 --- a/ui-ngx/src/app/modules/home/pages/asset/assets-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/asset/assets-table-config.resolver.ts @@ -104,7 +104,7 @@ export class AssetsTableConfigResolver implements Resolve this.onAssetAction(action); - this.config.detailsReadonly = () => this.config.componentsData.assetScope === 'customer_user'; + this.config.detailsReadonly = () => (this.config.componentsData.assetScope === 'customer_user' || this.config.componentsData.assetScope === 'edge_customer_user'); this.config.headerComponent = AssetTableHeaderComponent; @@ -151,7 +151,7 @@ export class AssetsTableConfigResolver implements Resolve this.config.componentsData.assetScope === 'tenant'; return this.config; diff --git a/ui-ngx/src/app/modules/home/pages/dashboard/dashboards-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/dashboard/dashboards-table-config.resolver.ts index 61422f1fa3..0a85c81375 100644 --- a/ui-ngx/src/app/modules/home/pages/dashboard/dashboards-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/dashboard/dashboards-table-config.resolver.ts @@ -103,7 +103,7 @@ export class DashboardsTableConfigResolver implements Resolve this.onDashboardAction(action); - this.config.detailsReadonly = () => this.config.componentsData.dashboardScope === 'customer_user'; + this.config.detailsReadonly = () => (this.config.componentsData.dashboardScope === 'customer_user' || this.config.componentsData.dashboardScope === 'edge_customer_user'); } resolve(route: ActivatedRouteSnapshot): Observable> { @@ -147,7 +147,7 @@ export class DashboardsTableConfigResolver implements Resolve this.config.componentsData.dashboardScope === 'tenant'; return this.config; diff --git a/ui-ngx/src/app/modules/home/pages/device/devices-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/device/devices-table-config.resolver.ts index 1349ffae1e..36b93fa697 100644 --- a/ui-ngx/src/app/modules/home/pages/device/devices-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/device/devices-table-config.resolver.ts @@ -112,7 +112,7 @@ export class DevicesTableConfigResolver implements Resolve this.onDeviceAction(action); - this.config.detailsReadonly = () => this.config.componentsData.deviceScope === 'customer_user'; + this.config.detailsReadonly = () => (this.config.componentsData.deviceScope === 'customer_user' || this.config.componentsData.deviceScope === 'edge_customer_user'); this.config.headerComponent = DeviceTableHeaderComponent; @@ -161,7 +161,7 @@ export class DevicesTableConfigResolver implements Resolve this.config.componentsData.deviceScope === 'tenant'; return this.config; diff --git a/ui-ngx/src/app/modules/home/pages/entity-view/entity-views-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/entity-view/entity-views-table-config.resolver.ts index 5243a55a83..04c7469f71 100644 --- a/ui-ngx/src/app/modules/home/pages/entity-view/entity-views-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/entity-view/entity-views-table-config.resolver.ts @@ -104,7 +104,7 @@ export class EntityViewsTableConfigResolver implements Resolve this.onEntityViewAction(action); - this.config.detailsReadonly = () => this.config.componentsData.entityViewScope === 'customer_user'; + this.config.detailsReadonly = () => (this.config.componentsData.entityViewScope === 'customer_user' || this.config.componentsData.entityViewScope === 'edge_customer_user'); this.config.headerComponent = EntityViewTableHeaderComponent; @@ -152,7 +152,7 @@ export class EntityViewsTableConfigResolver implements Resolve this.config.componentsData.entityViewScope === 'tenant'; return this.config;