diff --git a/projects/common/src/fm/components/app/app.component.ts b/projects/common/src/fm/components/app/app.component.ts index 94b32b2..c754312 100644 --- a/projects/common/src/fm/components/app/app.component.ts +++ b/projects/common/src/fm/components/app/app.component.ts @@ -115,18 +115,11 @@ export class AppComponent implements OnInit, OnDestroy { return action; } - async loadItemTypes() { - await this.itemTypeService$.load(this.appConfig$) - } - ngOnInit() { this.InstallRouteEventHandler(); this.InstallEventServiceEventHandler(); this.InstallAuthenticationEventHandler(); this.InstallHealthCheck(); - - //load item types - this.loadItemTypes(); } @HostListener('document:keyup', ['$event']) diff --git a/projects/common/src/fm/shared/app.config.factory.ts b/projects/common/src/fm/shared/app.config.factory.ts index b286418..7f44e7a 100644 --- a/projects/common/src/fm/shared/app.config.factory.ts +++ b/projects/common/src/fm/shared/app.config.factory.ts @@ -11,7 +11,8 @@ import { IAuthconfigFactory } from './authconfigFactory'; export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthService: OAuthService, authconfigFactory:IAuthconfigFactory,authStorage:OAuthStorage,itemtypeService:ItemTypeService): () => Promise { return (): Promise => { return new Promise((resolve,reject) => { - appConfig.load().then(() => { + appConfig.load().then(() => { + itemtypeService.load(appConfig); oauthService.configure(authconfigFactory.getAuthConfig(appConfig)); oauthService.setStorage(authStorage); oauthService.setupAutomaticSilentRefresh();