Comment logging
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
@@ -69,7 +69,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
|
||||
getActionFromEvent(event: IEventMessage): Action {
|
||||
let action: Action = null;
|
||||
console.debug(`${event.eventType} Event received`);
|
||||
//console.debug(`${event.eventType} Event received`);
|
||||
switch (event.eventType) {
|
||||
case "ItemChanged": {
|
||||
action = new commonActions.ItemChangedEvent(event.itemCode, event.attributes);
|
||||
@@ -146,12 +146,12 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
private InstallAuthenticationEventHandler() {
|
||||
// auth event handler
|
||||
this.oauthService$.events.subscribe((event) => {
|
||||
console.debug(event.type);
|
||||
//console.debug(event.type);
|
||||
if (event.type == 'token_error' || event.type == 'silent_refresh_timeout' || event.type == 'logout') {
|
||||
const e = event as OAuthErrorEvent;
|
||||
const p = e.params as any;
|
||||
if (event.type == 'silent_refresh_timeout' || event.type == 'logout' || (p.error && p.error == 'login_required')) {
|
||||
console.debug("Session expired");
|
||||
//console.debug("Session expired");
|
||||
this.router.navigate(['loggedout'], { queryParams: { redirectTo: this.router.url } });
|
||||
}
|
||||
}
|
||||
|
@@ -182,18 +182,18 @@ export class AppCommonEffects {
|
||||
ofType(appCommonActions.FAIL),
|
||||
map((action) => {
|
||||
const failAction = action as appCommonActions.Fail;
|
||||
console.debug(failAction.payload)
|
||||
//console.debug(failAction.payload)
|
||||
return null;
|
||||
})),{dispatch:false});
|
||||
|
||||
online$ = createEffect(() => this.actions$.pipe(
|
||||
ofType(appCommonActions.ONLINE),
|
||||
switchMap((action) => {
|
||||
console.debug("Online: Check token");
|
||||
//console.debug("Online: Check token");
|
||||
if(!this.oauthService$.hasValidAccessToken()) {
|
||||
console.debug("No valid token, try to refresh");
|
||||
//console.debug("No valid token, try to refresh");
|
||||
if(this.oauthService$.getRefreshToken() != null ) {
|
||||
console.debug("We have a refresh token");
|
||||
//console.debug("We have a refresh token");
|
||||
this.oauthService$.refreshToken();
|
||||
}
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ export class PackagePreloadStrategy extends PreloadingStrategy {
|
||||
}
|
||||
if(route.data && route.data.package) {
|
||||
if(this.packageService$.hasPackage(route.data.package)) {
|
||||
console.debug(`Load module for package ${route.data.package}`)
|
||||
//console.debug(`Load module for package ${route.data.package}`)
|
||||
this.loading.add(route);
|
||||
return load()
|
||||
}
|
||||
|
Reference in New Issue
Block a user