Showing
3 changed files
with
5 additions
and
1 deletions
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | |
17 | 17 | --> |
18 | 18 | <tb-details-panel fxFlex |
19 | - [headerTitle]="entity?.name" | |
19 | + [headerTitle]="entitiesTableConfig.entityTitle(entity)" | |
20 | 20 | headerSubtitle="{{ translations.details | translate }}" |
21 | 21 | [isReadOnly]="entitiesTableConfig.detailsReadonly(entity)" |
22 | 22 | [isEdit]="isEditValue" | ... | ... |
... | ... | @@ -163,6 +163,7 @@ export class EntityTableConfig<T extends BaseData<HasId>, P extends PageLink = P |
163 | 163 | deleteEntity: EntityIdOneWayOperation = () => of(); |
164 | 164 | entitiesFetchFunction: EntitiesFetchFunction<T, P> = () => of(emptyPageData<T>()); |
165 | 165 | onEntityAction: EntityActionFunction<T> = () => false; |
166 | + entityTitle: EntityStringFunction<T> = (entity) => entity?.name; | |
166 | 167 | } |
167 | 168 | |
168 | 169 | export function checkBoxCell(value: boolean): string { | ... | ... |
... | ... | @@ -56,6 +56,9 @@ export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableCon |
56 | 56 | this.config.entityTranslations = entityTypeTranslations.get(EntityType.WIDGETS_BUNDLE); |
57 | 57 | this.config.entityResources = entityTypeResources.get(EntityType.WIDGETS_BUNDLE); |
58 | 58 | |
59 | + this.config.entityTitle = (widgetsBundle) => widgetsBundle ? | |
60 | + widgetsBundle.title : ''; | |
61 | + | |
59 | 62 | this.config.columns.push( |
60 | 63 | new DateEntityTableColumn<WidgetsBundle>('createdTime', 'common.created-time', this.datePipe, '150px'), |
61 | 64 | new EntityTableColumn<WidgetsBundle>('title', 'widgets-bundle.title', '100%'), | ... | ... |