Browse Source
Merge pull request #5052 from abpframework/fix/feature-management
Fixed some bugs in Feature Management Module of Angular UI
pull/5058/head
Yasin Aydın
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
6 additions and
5 deletions
-
npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html
-
npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts
-
npm/ng-packs/packages/feature-management/src/lib/models/feature-management.ts
|
|
@ -10,11 +10,11 @@ |
|
|
*ngFor="let feature of features$ | async; let i = index" |
|
|
*ngFor="let feature of features$ | async; let i = index" |
|
|
[ngSwitch]="feature.valueType.name" |
|
|
[ngSwitch]="feature.valueType.name" |
|
|
> |
|
|
> |
|
|
<div class="col-4">{{ feature.name }}</div> |
|
|
<div class="mr-2">{{ feature.displayName }}</div> |
|
|
<div class="col-8" *ngSwitchCase="'ToggleStringValueType'"> |
|
|
<div *ngSwitchCase="'ToggleStringValueType'"> |
|
|
<input type="checkbox" name="feature.name" [formControlName]="i" /> |
|
|
<input type="checkbox" name="feature.name" [formControlName]="i" /> |
|
|
</div> |
|
|
</div> |
|
|
<div class="col-8" *ngSwitchCase="'FreeTextStringValueType'"> |
|
|
<div *ngSwitchCase="'FreeTextStringValueType'"> |
|
|
<input type="text" name="feature.name" [formControlName]="i" /> |
|
|
<input type="text" name="feature.name" [formControlName]="i" /> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
@ -87,8 +87,8 @@ export class FeatureManagementComponent |
|
|
let features = this.store.selectSnapshot(FeatureManagementState.getFeatures); |
|
|
let features = this.store.selectSnapshot(FeatureManagementState.getFeatures); |
|
|
|
|
|
|
|
|
features = features.map((feature, i) => ({ |
|
|
features = features.map((feature, i) => ({ |
|
|
name: feature.name, |
|
|
...feature, |
|
|
value: !this.form.value[i] || this.form.value[i] === 'false' ? null : this.form.value[i], |
|
|
value: this.form.value[i], |
|
|
})); |
|
|
})); |
|
|
|
|
|
|
|
|
this.store |
|
|
this.store |
|
|
|
|
|
@ -13,6 +13,7 @@ export namespace FeatureManagement { |
|
|
|
|
|
|
|
|
export interface Feature { |
|
|
export interface Feature { |
|
|
name: string; |
|
|
name: string; |
|
|
|
|
|
displayName: string; |
|
|
value: string; |
|
|
value: string; |
|
|
description?: string; |
|
|
description?: string; |
|
|
valueType?: ValueType; |
|
|
valueType?: ValueType; |
|
|
|