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 104 ));
105 105 };
106 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 110 this.config.headerComponent = EntityViewTableHeaderComponent;
110 111
... ... @@ -151,7 +152,8 @@ export class EntityViewsTableConfigResolver implements Resolve<EntityTableConfig
151 152 this.config.cellActionDescriptors = this.configureCellActions(this.config.componentsData.entityViewScope);
152 153 this.config.groupActionDescriptors = this.configureGroupActions(this.config.componentsData.entityViewScope);
153 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 157 this.config.entitiesDeleteEnabled = this.config.componentsData.entityViewScope === 'tenant';
156 158 this.config.deleteEnabled = () => this.config.componentsData.entityViewScope === 'tenant';
157 159 return this.config;
... ... @@ -243,7 +245,7 @@ export class EntityViewsTableConfigResolver implements Resolve<EntityTableConfig
243 245 {
244 246 name: this.translate.instant('edge.unassign-from-edge'),
245 247 icon: 'assignment_return',
246   - isEnabled: (entity) => true,
  248 + isEnabled: () => true,
247 249 onAction: ($event, entity) => this.unassignFromEdge($event, entity)
248 250 }
249 251 );
... ...