|
|
|
@ -5,11 +5,11 @@ import { GetFeatures, UpdateFeatures } from '../../actions';
|
|
|
|
|
import { FeatureManagement } from '../../models/feature-management';
|
|
|
|
|
import { FeatureManagementState } from '../../states';
|
|
|
|
|
import { FormGroup, FormControl } from '@angular/forms';
|
|
|
|
|
import { pluck, tap } from 'rxjs/operators';
|
|
|
|
|
import { pluck, finalize } from 'rxjs/operators';
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'abp-feature-management',
|
|
|
|
|
templateUrl: './feature-management.component.html'
|
|
|
|
|
templateUrl: './feature-management.component.html',
|
|
|
|
|
})
|
|
|
|
|
export class FeatureManagementComponent {
|
|
|
|
|
@Input()
|
|
|
|
@ -56,8 +56,8 @@ export class FeatureManagementComponent {
|
|
|
|
|
.dispatch(
|
|
|
|
|
new GetFeatures({
|
|
|
|
|
providerKey: this.providerKey,
|
|
|
|
|
providerName: this.providerName
|
|
|
|
|
})
|
|
|
|
|
providerName: this.providerName,
|
|
|
|
|
}),
|
|
|
|
|
)
|
|
|
|
|
.pipe(pluck('FeatureManagementState', 'features'))
|
|
|
|
|
.subscribe(features => {
|
|
|
|
@ -82,7 +82,7 @@ export class FeatureManagementComponent {
|
|
|
|
|
|
|
|
|
|
features = features.map((feature, i) => ({
|
|
|
|
|
name: feature.name,
|
|
|
|
|
value: !this.form.value[i] || this.form.value[i] === 'false' ? null : this.form.value[i]
|
|
|
|
|
value: !this.form.value[i] || this.form.value[i] === 'false' ? null : this.form.value[i],
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
this.store
|
|
|
|
@ -90,11 +90,11 @@ export class FeatureManagementComponent {
|
|
|
|
|
new UpdateFeatures({
|
|
|
|
|
providerKey: this.providerKey,
|
|
|
|
|
providerName: this.providerName,
|
|
|
|
|
features
|
|
|
|
|
})
|
|
|
|
|
features,
|
|
|
|
|
}),
|
|
|
|
|
)
|
|
|
|
|
.pipe(finalize(() => (this.modalBusy = false)))
|
|
|
|
|
.subscribe(() => {
|
|
|
|
|
this.modalBusy = false;
|
|
|
|
|
this.visible = false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|