Skip to content
Snippets Groups Projects
Commit 92b6673f authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

Merge branch 'fix/logout' into 'dev'

Fix/logout

See merge request web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client!57
parents 189e90f5 7f00e22f
Branches
Tags
3 merge requests!68Recette,!67Dev,!57Fix/logout
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
right: 0; right: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: $modal-menu-phone-z-index; z-index: $menu-phone-z-index;
animation: slideMenu 0.5s; animation: slideMenu 0.5s;
.contentMenu { .contentMenu {
background-color: $white; background-color: $white;
......
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { DateTime } from 'luxon'; import { DateTime } from 'luxon';
import { BehaviorSubject, Observable } from 'rxjs'; import { BehaviorSubject, Observable } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
...@@ -12,7 +13,7 @@ export class AuthService { ...@@ -12,7 +13,7 @@ export class AuthService {
private userSubject: BehaviorSubject<UserAuth>; private userSubject: BehaviorSubject<UserAuth>;
public user: Observable<UserAuth>; public user: Observable<UserAuth>;
constructor(private http: HttpClient) { constructor(private http: HttpClient, private router: Router) {
this.userSubject = new BehaviorSubject<UserAuth>(JSON.parse(localStorage.getItem('user'))); this.userSubject = new BehaviorSubject<UserAuth>(JSON.parse(localStorage.getItem('user')));
this.user = this.userSubject.asObservable(); this.user = this.userSubject.asObservable();
} }
...@@ -31,6 +32,7 @@ export class AuthService { ...@@ -31,6 +32,7 @@ export class AuthService {
public logout(): void { public logout(): void {
localStorage.removeItem('user'); localStorage.removeItem('user');
this.userSubject.next(null); this.userSubject.next(null);
window.location.replace('/home');
} }
public isLoggedIn(): boolean { public isLoggedIn(): boolean {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@import '../../../../assets/scss/hyperlink'; @import '../../../../assets/scss/hyperlink';
.cModal { .cModal {
position: fixed; position: fixed;
z-index: $modal-add-structure-z-index; z-index: $modal-z-index;
top: 0; top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@import '../../../../assets/scss/hyperlink'; @import '../../../../assets/scss/hyperlink';
.cModal { .cModal {
position: fixed; position: fixed;
z-index: $modal-add-structure-z-index; z-index: $modal-z-index;
top: 0; top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@import '../../../../assets/scss/hyperlink'; @import '../../../../assets/scss/hyperlink';
.cModal { .cModal {
position: fixed; position: fixed;
z-index: $modal-add-structure-z-index; z-index: $modal-z-index;
top: 0; top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
.modal { .modal {
max-width: 754px; max-width: 754px;
width: 94%; width: 94%;
z-index: $modal-filter-structure-z-index !important; z-index: $modal-z-index !important;
position: fixed; position: fixed;
border-radius: 6px; border-radius: 6px;
margin-top: 3.5px; margin-top: 3.5px;
......
$structure-details-z-index: 1002; // Phone view
$modal-add-structure-z-index: 1002; $btn-phone-switch-map-list-z-index: 1002;
$modal-filter-structure-z-index: 1002; $menu-phone-z-index: 1003;
$modal-menu-phone-z-index: 1002;
$btn-phone-switch-map-list-z-index: 1001; // Structure details
$structure-details-z-index: 1001;
// Modals (filters/confirmationPopup/authen/...)
$modal-z-index: 1002;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment