summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/workspace
diff options
context:
space:
mode:
authorstasys10 <stasys.jurgaitis@est.tech>2021-11-29 19:52:58 +0000
committerAndr� Schmid <andre.schmid@est.tech>2022-01-27 16:59:25 +0000
commit9bd18657d2048d3396d15a394b4493b283c47e4d (patch)
treee4bd0deef57d238fab57621a1b9382d9cbb5c031 /catalog-ui/src/app/view-models/workspace
parentc2fa1b7e8d43a236219d1f6ad2831de1af296cb4 (diff)
Add a display name for the category
Issue-ID: SDC-3858 Change-Id: Ic818b3b4bc4f4e91c9da0cdacb40549a3f071c68 Signed-off-by: stasys10 <stasys.jurgaitis@est.tech>
Diffstat (limited to 'catalog-ui/src/app/view-models/workspace')
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts4
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html2
2 files changed, 5 insertions, 1 deletions
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 @@
<option ng-if="component.isService()" data-ng-repeat="mainCategory in categories | orderBy:['name']"
data-ng-selected="component.selectedCategory===mainCategory.name"
value="{{mainCategory.name}}"
- data-tests-id="{{mainCategory.name}}">{{mainCategory.name}}</option>
+ data-tests-id="{{mainCategory.name}}">{{getCategoryDisplayNameOrName(mainCategory)}}</option>
</select>
<div class="input-error" data-ng-show="validateField(editForm.category)">