From 011d06e2a7aaf6ce6d0df192fa74737d9a31df9b Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Fri, 18 Sep 2020 13:43:12 +0300 Subject: [PATCH] feat: get app config when host features are changed resolves #5481 --- .../feature-management.component.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 7eca21ecbd..c225060370 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 @@ -1,6 +1,7 @@ -import { TrackByService } from '@abp/ng.core'; +import { TrackByService, GetAppConfiguration } from '@abp/ng.core'; import { LocaleDirection } from '@abp/ng.theme.shared'; import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { Store } from '@ngxs/store'; import { finalize } from 'rxjs/operators'; import { FeatureManagement } from '../../models/feature-management'; import { FeaturesService } from '../../proxy/feature-management/features.service'; @@ -60,7 +61,11 @@ export class FeatureManagementComponent modalBusy = false; - constructor(public readonly track: TrackByService, private service: FeaturesService) {} + constructor( + public readonly track: TrackByService, + protected service: FeaturesService, + protected store: Store, + ) {} openModal() { if (!this.providerName) { @@ -107,6 +112,11 @@ export class FeatureManagementComponent .pipe(finalize(() => (this.modalBusy = false))) .subscribe(() => { this.visible = false; + + if (!this.providerKey) { + // to refresh host's features + this.store.dispatch(new GetAppConfiguration()); + } }); } }