Commit d60318a7094880b8fa6b1db8afd0e685431ed01c

Authored by Vladyslav_Prykhodko
1 parent 084d1eed

UI: Refactoring entities-table-models

@@ -165,7 +165,7 @@ @@ -165,7 +165,7 @@
165 matTooltipPosition="above" 165 matTooltipPosition="above"
166 [ngStyle]="cellStyle(entity, column, row)"> 166 [ngStyle]="cellStyle(entity, column, row)">
167 <span [innerHTML]="cellContent(entity, column, row)"></span> 167 <span [innerHTML]="cellContent(entity, column, row)"></span>
168 - <ng-template [ngIf]="column.actionCell.name"> 168 + <ng-template [ngIf]="column.actionCell">
169 <ng-container [ngSwitch]="column.actionCell.type"> 169 <ng-container [ngSwitch]="column.actionCell.type">
170 <ng-template [ngSwitchCase]="cellActionType.COPY_BUTTON"> 170 <ng-template [ngSwitchCase]="cellActionType.COPY_BUTTON">
171 <tb-copy-button 171 <tb-copy-button
@@ -100,7 +100,7 @@ export class EntityTableColumn<T extends BaseData<HasId>> extends BaseEntityTabl @@ -100,7 +100,7 @@ export class EntityTableColumn<T extends BaseData<HasId>> extends BaseEntityTabl
100 public headerCellStyleFunction: HeaderCellStyleFunction<T> = () => ({}), 100 public headerCellStyleFunction: HeaderCellStyleFunction<T> = () => ({}),
101 public cellTooltipFunction: CellTooltipFunction<T> = () => undefined, 101 public cellTooltipFunction: CellTooltipFunction<T> = () => undefined,
102 public isNumberColumn: boolean = false, 102 public isNumberColumn: boolean = false,
103 - public actionCell: CellActionDescriptor<T> = {isEnabled: () => false, name: null, onAction: () => ({})}) { 103 + public actionCell: CellActionDescriptor<T> = null) {
104 super('content', key, title, width, sortable); 104 super('content', key, title, width, sortable);
105 } 105 }
106 } 106 }
@@ -192,7 +192,3 @@ export class EntityTableConfig<T extends BaseData<HasId>, P extends PageLink = P @@ -192,7 +192,3 @@ export class EntityTableConfig<T extends BaseData<HasId>, P extends PageLink = P
192 export function checkBoxCell(value: boolean): string { 192 export function checkBoxCell(value: boolean): string {
193 return `<mat-icon class="material-icons mat-icon">${value ? 'check_box' : 'check_box_outline_blank'}</mat-icon>`; 193 return `<mat-icon class="material-icons mat-icon">${value ? 'check_box' : 'check_box_outline_blank'}</mat-icon>`;
194 } 194 }
195 -  
196 -export function copyCellContent(value: string): string {  
197 - return `<mat-icon class="material-icons mat-icon">${value ? 'check_box' : 'check_box_outline_blank'}</mat-icon>`;  
198 -}