Commit a7d1b54bb4407f9c899dcae7a45690a01c8a6cab

Authored by Vladyslav
Committed by GitHub
2 parents a703dead 80d8ebfd

Merge pull request #4563 from vvlladd28/bug/entity-view/add

UI: Fixed didn't add enabled created entity view after refactoring Edge
@@ -104,7 +104,8 @@ export class EntityViewsTableConfigResolver implements Resolve<EntityTableConfig @@ -104,7 +104,8 @@ export class EntityViewsTableConfigResolver implements Resolve<EntityTableConfig
104 )); 104 ));
105 }; 105 };
106 this.config.onEntityAction = action => this.onEntityViewAction(action); 106 this.config.onEntityAction = action => this.onEntityViewAction(action);
107 - this.config.detailsReadonly = () => (this.config.componentsData.entityViewScope === 'customer_user' || this.config.componentsData.entityViewScope === 'edge_customer_user'); 107 + this.config.detailsReadonly = () => (this.config.componentsData.entityViewScope === 'customer_user' ||
  108 + this.config.componentsData.entityViewScope === 'edge_customer_user');
108 109
109 this.config.headerComponent = EntityViewTableHeaderComponent; 110 this.config.headerComponent = EntityViewTableHeaderComponent;
110 111
@@ -151,7 +152,8 @@ export class EntityViewsTableConfigResolver implements Resolve<EntityTableConfig @@ -151,7 +152,8 @@ export class EntityViewsTableConfigResolver implements Resolve<EntityTableConfig
151 this.config.cellActionDescriptors = this.configureCellActions(this.config.componentsData.entityViewScope); 152 this.config.cellActionDescriptors = this.configureCellActions(this.config.componentsData.entityViewScope);
152 this.config.groupActionDescriptors = this.configureGroupActions(this.config.componentsData.entityViewScope); 153 this.config.groupActionDescriptors = this.configureGroupActions(this.config.componentsData.entityViewScope);
153 this.config.addActionDescriptors = this.configureAddActions(this.config.componentsData.entityViewScope); 154 this.config.addActionDescriptors = this.configureAddActions(this.config.componentsData.entityViewScope);
154 - this.config.addEnabled = !(this.config.componentsData.entityViewScope === 'customer_user' || this.config.componentsData.entityViewScope !== 'edge_customer_user'); 155 + this.config.addEnabled = !(this.config.componentsData.entityViewScope === 'customer_user' ||
  156 + this.config.componentsData.entityViewScope === 'edge_customer_user');
155 this.config.entitiesDeleteEnabled = this.config.componentsData.entityViewScope === 'tenant'; 157 this.config.entitiesDeleteEnabled = this.config.componentsData.entityViewScope === 'tenant';
156 this.config.deleteEnabled = () => this.config.componentsData.entityViewScope === 'tenant'; 158 this.config.deleteEnabled = () => this.config.componentsData.entityViewScope === 'tenant';
157 return this.config; 159 return this.config;
@@ -243,7 +245,7 @@ export class EntityViewsTableConfigResolver implements Resolve<EntityTableConfig @@ -243,7 +245,7 @@ export class EntityViewsTableConfigResolver implements Resolve<EntityTableConfig
243 { 245 {
244 name: this.translate.instant('edge.unassign-from-edge'), 246 name: this.translate.instant('edge.unassign-from-edge'),
245 icon: 'assignment_return', 247 icon: 'assignment_return',
246 - isEnabled: (entity) => true, 248 + isEnabled: () => true,
247 onAction: ($event, entity) => this.unassignFromEdge($event, entity) 249 onAction: ($event, entity) => this.unassignFromEdge($event, entity)
248 } 250 }
249 ); 251 );