Compare commits

..

No commits in common. "9e3f6010c3ba28f66ebf2ecde359acd21d6e5e97" and "ccf77805a03ff4750194dcf57c4acc70854d928e" have entirely different histories.

2 changed files with 8 additions and 2 deletions

View File

@ -115,11 +115,18 @@ export class AppComponent implements OnInit, OnDestroy {
return action; return action;
} }
async loadItemTypes() {
await this.itemTypeService$.load(this.appConfig$)
}
ngOnInit() { ngOnInit() {
this.InstallRouteEventHandler(); this.InstallRouteEventHandler();
this.InstallEventServiceEventHandler(); this.InstallEventServiceEventHandler();
this.InstallAuthenticationEventHandler(); this.InstallAuthenticationEventHandler();
this.InstallHealthCheck(); this.InstallHealthCheck();
//load item types
this.loadItemTypes();
} }
@HostListener('document:keyup', ['$event']) @HostListener('document:keyup', ['$event'])

View File

@ -11,8 +11,7 @@ import { IAuthconfigFactory } from './authconfigFactory';
export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthService: OAuthService, authconfigFactory:IAuthconfigFactory,authStorage:OAuthStorage,itemtypeService:ItemTypeService): () => Promise<any> { export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthService: OAuthService, authconfigFactory:IAuthconfigFactory,authStorage:OAuthStorage,itemtypeService:ItemTypeService): () => Promise<any> {
return (): Promise<any> => { return (): Promise<any> => {
return new Promise<void>((resolve,reject) => { return new Promise<void>((resolve,reject) => {
appConfig.load().then(() => { appConfig.load().then(() => {
itemtypeService.load(appConfig);
oauthService.configure(authconfigFactory.getAuthConfig(appConfig)); oauthService.configure(authconfigFactory.getAuthConfig(appConfig));
oauthService.setStorage(authStorage); oauthService.setStorage(authStorage);
oauthService.setupAutomaticSilentRefresh(); oauthService.setupAutomaticSilentRefresh();