From eb1461a8a338059fad073755bb22a2053ae209fc Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Mon, 6 Apr 2020 16:58:23 +0300 Subject: [PATCH] Add entity title function --- .../home/components/entity/entity-details-panel.component.html | 2 +- .../modules/home/models/entity/entities-table-config.models.ts | 1 + .../home/pages/widget/widgets-bundles-table-config.resolver.ts | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/entity/entity-details-panel.component.html b/ui-ngx/src/app/modules/home/components/entity/entity-details-panel.component.html index 71332f61f0..2e209141aa 100644 --- a/ui-ngx/src/app/modules/home/components/entity/entity-details-panel.component.html +++ b/ui-ngx/src/app/modules/home/components/entity/entity-details-panel.component.html @@ -16,7 +16,7 @@ --> , P extends PageLink = P deleteEntity: EntityIdOneWayOperation = () => of(); entitiesFetchFunction: EntitiesFetchFunction = () => of(emptyPageData()); onEntityAction: EntityActionFunction = () => false; + entityTitle: EntityStringFunction = (entity) => entity?.name; } export function checkBoxCell(value: boolean): string { diff --git a/ui-ngx/src/app/modules/home/pages/widget/widgets-bundles-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/widget/widgets-bundles-table-config.resolver.ts index 7b6744fbae..5edd4c0825 100644 --- a/ui-ngx/src/app/modules/home/pages/widget/widgets-bundles-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/widget/widgets-bundles-table-config.resolver.ts @@ -56,6 +56,9 @@ export class WidgetsBundlesTableConfigResolver implements Resolve widgetsBundle ? + widgetsBundle.title : ''; + this.config.columns.push( new DateEntityTableColumn('createdTime', 'common.created-time', this.datePipe, '150px'), new EntityTableColumn('title', 'widgets-bundle.title', '100%'),