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
No related branches found
No related tags found
3 merge requests!68Recette,!67Dev,!57Fix/logout
......@@ -25,7 +25,7 @@
right: 0;
width: 100%;
height: 100%;
z-index: $modal-menu-phone-z-index;
z-index: $menu-phone-z-index;
animation: slideMenu 0.5s;
.contentMenu {
background-color: $white;
......
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { DateTime } from 'luxon';
import { BehaviorSubject, Observable } from 'rxjs';
import { map } from 'rxjs/operators';
......@@ -12,7 +13,7 @@ export class AuthService {
private userSubject: BehaviorSubject<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.user = this.userSubject.asObservable();
}
......@@ -31,6 +32,7 @@ export class AuthService {
public logout(): void {
localStorage.removeItem('user');
this.userSubject.next(null);
window.location.replace('/home');
}
public isLoggedIn(): boolean {
......
......@@ -5,7 +5,7 @@
@import '../../../../assets/scss/hyperlink';
.cModal {
position: fixed;
z-index: $modal-add-structure-z-index;
z-index: $modal-z-index;
top: 0;
right: 0;
bottom: 0;
......
......@@ -5,7 +5,7 @@
@import '../../../../assets/scss/hyperlink';
.cModal {
position: fixed;
z-index: $modal-add-structure-z-index;
z-index: $modal-z-index;
top: 0;
right: 0;
bottom: 0;
......
......@@ -5,7 +5,7 @@
@import '../../../../assets/scss/hyperlink';
.cModal {
position: fixed;
z-index: $modal-add-structure-z-index;
z-index: $modal-z-index;
top: 0;
right: 0;
bottom: 0;
......
......@@ -22,7 +22,7 @@
.modal {
max-width: 754px;
width: 94%;
z-index: $modal-filter-structure-z-index !important;
z-index: $modal-z-index !important;
position: fixed;
border-radius: 6px;
margin-top: 3.5px;
......
$structure-details-z-index: 1002;
$modal-add-structure-z-index: 1002;
$modal-filter-structure-z-index: 1002;
$modal-menu-phone-z-index: 1002;
$btn-phone-switch-map-list-z-index: 1001;
// Phone view
$btn-phone-switch-map-list-z-index: 1002;
$menu-phone-z-index: 1003;
// 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.
Finish editing this message first!
Please register or to comment