UI: Refactoring entities-table-models
This commit is contained in:
parent
084d1eed37
commit
d60318a709
@ -165,7 +165,7 @@
|
|||||||
matTooltipPosition="above"
|
matTooltipPosition="above"
|
||||||
[ngStyle]="cellStyle(entity, column, row)">
|
[ngStyle]="cellStyle(entity, column, row)">
|
||||||
<span [innerHTML]="cellContent(entity, column, row)"></span>
|
<span [innerHTML]="cellContent(entity, column, row)"></span>
|
||||||
<ng-template [ngIf]="column.actionCell.name">
|
<ng-template [ngIf]="column.actionCell">
|
||||||
<ng-container [ngSwitch]="column.actionCell.type">
|
<ng-container [ngSwitch]="column.actionCell.type">
|
||||||
<ng-template [ngSwitchCase]="cellActionType.COPY_BUTTON">
|
<ng-template [ngSwitchCase]="cellActionType.COPY_BUTTON">
|
||||||
<tb-copy-button
|
<tb-copy-button
|
||||||
|
|||||||
@ -100,7 +100,7 @@ export class EntityTableColumn<T extends BaseData<HasId>> extends BaseEntityTabl
|
|||||||
public headerCellStyleFunction: HeaderCellStyleFunction<T> = () => ({}),
|
public headerCellStyleFunction: HeaderCellStyleFunction<T> = () => ({}),
|
||||||
public cellTooltipFunction: CellTooltipFunction<T> = () => undefined,
|
public cellTooltipFunction: CellTooltipFunction<T> = () => undefined,
|
||||||
public isNumberColumn: boolean = false,
|
public isNumberColumn: boolean = false,
|
||||||
public actionCell: CellActionDescriptor<T> = {isEnabled: () => false, name: null, onAction: () => ({})}) {
|
public actionCell: CellActionDescriptor<T> = null) {
|
||||||
super('content', key, title, width, sortable);
|
super('content', key, title, width, sortable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -192,7 +192,3 @@ export class EntityTableConfig<T extends BaseData<HasId>, P extends PageLink = P
|
|||||||
export function checkBoxCell(value: boolean): string {
|
export function checkBoxCell(value: boolean): string {
|
||||||
return `<mat-icon class="material-icons mat-icon">${value ? 'check_box' : 'check_box_outline_blank'}</mat-icon>`;
|
return `<mat-icon class="material-icons mat-icon">${value ? 'check_box' : 'check_box_outline_blank'}</mat-icon>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function copyCellContent(value: string): string {
|
|
||||||
return `<mat-icon class="material-icons mat-icon">${value ? 'check_box' : 'check_box_outline_blank'}</mat-icon>`;
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user