From 8b15001f0254a023a35045a4fca6b57e806bc39a Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Thu, 13 Aug 2020 17:05:20 +0300 Subject: [PATCH] fix(feature-management): resolve some bugs --- .../feature-management/feature-management.component.html | 6 +++--- .../feature-management/feature-management.component.ts | 4 ++-- .../feature-management/src/lib/models/feature-management.ts | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html index 087a69a75c7..6ee1766db77 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html +++ b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html @@ -10,11 +10,11 @@

{{ 'AbpFeatureManagement::Features' | abpLocalization }}

*ngFor="let feature of features$ | async; let i = index" [ngSwitch]="feature.valueType.name" > -
{{ feature.name }}
-
+
{{ feature.displayName }}
+
-
+
diff --git a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts index b8aba035bd2..cd4d00491bb 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts +++ b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts @@ -87,8 +87,8 @@ export class FeatureManagementComponent let features = this.store.selectSnapshot(FeatureManagementState.getFeatures); features = features.map((feature, i) => ({ - name: feature.name, - value: !this.form.value[i] || this.form.value[i] === 'false' ? null : this.form.value[i], + ...feature, + value: this.form.value[i], })); this.store diff --git a/npm/ng-packs/packages/feature-management/src/lib/models/feature-management.ts b/npm/ng-packs/packages/feature-management/src/lib/models/feature-management.ts index fa0165ae2e0..02f6f687e20 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/models/feature-management.ts +++ b/npm/ng-packs/packages/feature-management/src/lib/models/feature-management.ts @@ -13,6 +13,7 @@ export namespace FeatureManagement { export interface Feature { name: string; + displayName: string; value: string; description?: string; valueType?: ValueType;