From 9bd18657d2048d3396d15a394b4493b283c47e4d Mon Sep 17 00:00:00 2001 From: stasys10 Date: Mon, 29 Nov 2021 19:52:58 +0000 Subject: Add a display name for the category Issue-ID: SDC-3858 Change-Id: Ic818b3b4bc4f4e91c9da0cdacb40549a3f071c68 Signed-off-by: stasys10 --- .../src/app/view-models/workspace/tabs/general/general-view-model.ts | 4 ++++ .../src/app/view-models/workspace/tabs/general/general-view.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'catalog-ui/src/app/view-models') diff --git a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts index a707e563af..043f4dd859 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts @@ -767,6 +767,10 @@ export class GeneralViewModel { } }; + this.$scope.getCategoryDisplayNameOrName = (mainCategory: any): string => { + return mainCategory.displayName ? mainCategory.displayName : mainCategory.name ; + } + this.$scope.onBaseTypeChange = (): void => { if (!this.$scope.component.derivedFromGenericType) { this.$scope.component.derivedFromGenericVersion = undefined; diff --git a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html index bb0cceb173..1fb8d5f10f 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html +++ b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html @@ -119,7 +119,7 @@ + data-tests-id="{{mainCategory.name}}">{{getCategoryDisplayNameOrName(mainCategory)}}
-- cgit 1.2.3-korg