diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a4d9de6c0..769eba328 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -292,6 +292,10 @@ const routes = [ { path: 'popup-question', loadChildren: () => import('./modals/popup-question/popup-question.module').then( m => m.PopupQuestionPageModule) + }, + { + path: 'swiper', + loadChildren: () => import('./shared/swiper/swiper.module').then( m => m.SwiperPageModule) } diff --git a/src/app/interceptors/token.interceptors.ts b/src/app/interceptors/token.interceptors.ts index cd2ff4bfa..4e7327679 100644 --- a/src/app/interceptors/token.interceptors.ts +++ b/src/app/interceptors/token.interceptors.ts @@ -8,11 +8,11 @@ import { HTTP_INTERCEPTORS, HttpClient, } from "@angular/common/http"; -import { AuthService } from '../services/auth.service'; import { Observable, throwError, BehaviorSubject, of } from "rxjs"; import { catchError, filter, take, switchMap, tap } from "rxjs/operators"; import { SessionStore } from '../store/session.service'; import { environment } from "src/environments/environment"; +import { Router } from "@angular/router"; @Injectable() export class TokenInterceptor implements HttpInterceptor { @@ -21,7 +21,7 @@ export class TokenInterceptor implements HttpInterceptor { null ); - constructor(private http: HttpClient) { } + constructor(private http: HttpClient, private router: Router,) { } intercept( @@ -74,10 +74,10 @@ export class TokenInterceptor implements HttpInterceptor { } } - + //this method refresh token is declared here temporary beacouse a circular error refreshToken() { - + return this.http .put(environment.apiURL + "UserAuthentication/RefreshToken", { refreshToken: SessionStore.user.RefreshToken, @@ -90,7 +90,18 @@ export class TokenInterceptor implements HttpInterceptor { }), catchError((error) => { - /* this.logoutUser(); */ + SessionStore.user.Authorization = ""; + SessionStore.user.RefreshToken = ""; + SessionStore.setInativity(false) + /* SessionStore.setUrlBeforeInactivity(this.router.url); */ + + if (environment.production) { + window.location.pathname = '/auth' + } else { + /* const pathBeforeGoOut = window.location.pathname */ + this.router.navigateByUrl('/auth', { replaceUrl: true }); + + } return of(false); }) ); @@ -102,4 +113,4 @@ export const tokenInterceptor = { provide: HTTP_INTERCEPTORS, useClass: TokenInterceptor, multi: true -}; \ No newline at end of file +}; diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index 6da2c31de..000e78fbe 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -258,9 +258,9 @@
-

{{event.event.Subject}}

+

-
{{event.event.Location}}
+
{{SessionStore.user.FullName}}
{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}
diff --git a/src/app/pages/publications/view-publications/view-publications.module.ts b/src/app/pages/publications/view-publications/view-publications.module.ts index 9ab90f3b6..846b3662b 100644 --- a/src/app/pages/publications/view-publications/view-publications.module.ts +++ b/src/app/pages/publications/view-publications/view-publications.module.ts @@ -10,6 +10,7 @@ import { ViewPublicationsPage } from './view-publications.page'; import { Attributes, IntersectionObserverHooks, LazyLoadImageModule, LAZYLOAD_IMAGE_HOOKS } from 'ng-lazyload-image'; import { ShowMorePageModule } from 'src/app/shared/publication/view-publications/show-more/show-more.module' +import { VisibilityDirective } from 'src/app/services/directives/visibility1.directive'; export class LazyLoadImageHooks extends IntersectionObserverHooks { setup(attributes: Attributes) { attributes.offset = 10; @@ -31,7 +32,7 @@ setup(attributes: Attributes) { ShowMorePageModule, ], exports: [ViewPublicationsPage], - declarations: [ViewPublicationsPage], + declarations: [ViewPublicationsPage, VisibilityDirective], providers: [{provide: LAZYLOAD_IMAGE_HOOKS, useClass: LazyLoadImageHooks}] }) export class ViewPublicationsPageModule {} diff --git a/src/app/pages/publications/view-publications/view-publications.page.html b/src/app/pages/publications/view-publications/view-publications.page.html index 84914ded5..197d575dc 100644 --- a/src/app/pages/publications/view-publications/view-publications.page.html +++ b/src/app/pages/publications/view-publications/view-publications.page.html @@ -51,13 +51,30 @@ - + +
+
arrow-left
+
+
+
arrow-rights
+