diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index f6bbc70..1543f6f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -5,7 +5,7 @@ import { Routes } from '@angular/router'; import { HomeComponent } from './home/'; -import { AuthGuard } from './auth/auth.guard'; +import { AuthGuard } from '@shared/auth/auth.guard'; import { paths_collaborateurs, paths_demandes_delegation, paths_demandes_formation, paths_ep, paths_saisie_ep, paths_formation, paths_home, paths_referents } from '@shared/utils/paths'; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 71b1ef1..565f6bb 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -22,7 +22,7 @@ import { DemandesFormationModule } from './demandes-formation'; import { DemandesDelegationModule } from './demandes-delegation'; import { EpSaisieModule } from "./ep-saisie"; import { EpModule } from "./ep" -import { AuthModule } from './auth/auth.module'; +import { AuthModule } from '@shared/auth/auth.module'; diff --git a/src/app/collaborateurs/collaborateurs.routing.module.ts b/src/app/collaborateurs/collaborateurs.routing.module.ts index 6296c3b..f6cca60 100644 --- a/src/app/collaborateurs/collaborateurs.routing.module.ts +++ b/src/app/collaborateurs/collaborateurs.routing.module.ts @@ -9,7 +9,7 @@ import { EditEvaluationComponent } from './formations-collaborateur/edit-evaluat import { paths_collaborateurs } from '@shared/utils/paths'; -import { AuthGuard } from 'app/auth/auth.guard'; +import { AuthGuard } from '@shared/auth/auth.guard'; /** * Routes du module collaborateur */ diff --git a/src/app/demandes-delegation/demandes-delegation.routing.module.ts b/src/app/demandes-delegation/demandes-delegation.routing.module.ts index d1009bb..41b0340 100644 --- a/src/app/demandes-delegation/demandes-delegation.routing.module.ts +++ b/src/app/demandes-delegation/demandes-delegation.routing.module.ts @@ -5,7 +5,7 @@ import { Routes, RouterModule } from '@angular/router'; import { DemandesDelegationComponent } from "./demandes-delegation.component"; import { DemandeDelegationComponent } from "./details-demande-delegation/demande-delegation.component"; -import { AuthGuard } from 'app/auth/auth.guard'; +import { AuthGuard } from '@shared/auth/auth.guard'; import { paths_demandes_delegation } from "@shared/utils/paths"; diff --git a/src/app/demandes-formation/demandes-formation.routing.module.ts b/src/app/demandes-formation/demandes-formation.routing.module.ts index 801f8a2..d422b58 100644 --- a/src/app/demandes-formation/demandes-formation.routing.module.ts +++ b/src/app/demandes-formation/demandes-formation.routing.module.ts @@ -6,7 +6,7 @@ import { DemandesFormationComponent } from "./demandes-formation.component"; import { DemandeFormationComponent } from "./details-demande-formation/demande-formation.component"; import { NewDemandeFormationComponent } from "./new-demande-formation/new-demande-formation.component"; -import { AuthGuard } from 'app/auth/auth.guard'; +import { AuthGuard } from '@shared/auth/auth.guard'; import { paths_demandes_formation } from "@shared/utils/paths"; diff --git a/src/app/ep-saisie/ep-saisie.routing.module.ts b/src/app/ep-saisie/ep-saisie.routing.module.ts index f509262..c8bd5c3 100644 --- a/src/app/ep-saisie/ep-saisie.routing.module.ts +++ b/src/app/ep-saisie/ep-saisie.routing.module.ts @@ -7,7 +7,7 @@ import { EpsSaisieComponent } from "./eps-saisie/eps-saisie.component"; import { EpaSaisieComponent } from "./epa-saisie/epa-saisie.component"; import { EpaSixAnsSaisieComponent } from "./epa-six-ans-saisie/epa-six-ans-saisie.component"; -import { AuthGuard } from 'app/auth/auth.guard'; +import { AuthGuard } from '@shared/auth/auth.guard'; import { paths_saisie_ep } from "@shared/utils/paths"; diff --git a/src/app/ep/ep.routing.module.ts b/src/app/ep/ep.routing.module.ts index 80b51bd..df80f4e 100644 --- a/src/app/ep/ep.routing.module.ts +++ b/src/app/ep/ep.routing.module.ts @@ -18,7 +18,7 @@ import { EpCommentaireAssistantComponent } from "./ep-commentaire-assistant/ep-c import { EpCommentaireReferentComponent } from "./ep-commentaire-referent/ep-commentaire-referent.component"; import { NewParticipantComponent } from "./ep-participants/new-participant/new-participant.component"; -import { AuthGuard } from 'app/auth/auth.guard'; +import { AuthGuard } from '@shared/auth/auth.guard'; import { paths_ep } from "@shared/utils/paths"; /** diff --git a/src/app/formations/formations.routing.module.ts b/src/app/formations/formations.routing.module.ts index 7bd2c64..9ba3e8e 100644 --- a/src/app/formations/formations.routing.module.ts +++ b/src/app/formations/formations.routing.module.ts @@ -7,7 +7,7 @@ import { FormationComponent } from "./details-formation/formation.component"; import { NewFormationComponent } from "./new-formation/new-formation.component"; import { EditFormationComponent } from "./edit-formation/edit-formation.component"; -import { AuthGuard } from 'app/auth/auth.guard'; +import { AuthGuard } from '@shared/auth/auth.guard'; import { paths_formation } from "@shared/utils/paths"; /** diff --git a/src/app/home/home-assistante/home-assistante.component.ts b/src/app/home/home-assistante/home-assistante.component.ts index c2c57b2..6e4dd14 100644 --- a/src/app/home/home-assistante/home-assistante.component.ts +++ b/src/app/home/home-assistante/home-assistante.component.ts @@ -8,7 +8,7 @@ import {MatSort} from '@angular/material/sort'; import { EpInformationDTO, CollaborateurDTO } from "@shared/api-swagger/model/models"; import { EpService } from "@shared/api-swagger/api/api"; -import { AuthService } from 'app/auth/auth.service'; +import { AuthService } from '@shared/auth/auth.service'; /** @@ -96,7 +96,7 @@ export class HomeAssistanteComponent implements OnInit, AfterViewInit { */ chargement = true; - constructor(public authService : AuthService, private service:EpService) { + constructor(private service:EpService) { } /** diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index 8f46a16..c8274e1 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; -import { AuthService } from 'app/auth/auth.service'; +import { AuthService } from '@shared/auth/auth.service'; import { Role } from '@shared/utils/roles'; diff --git a/src/app/referents/referents.routing.module.ts b/src/app/referents/referents.routing.module.ts index 3f59cc7..35af0e6 100644 --- a/src/app/referents/referents.routing.module.ts +++ b/src/app/referents/referents.routing.module.ts @@ -7,7 +7,7 @@ import { DetailsReferentComponent } from "./details-referent/details-referent.co import { paths_referents } from "@shared/utils/paths"; -import { AuthGuard } from 'app/auth/auth.guard'; +import { AuthGuard } from '@shared/auth/auth.guard'; /** * Routes du module référents diff --git a/src/app/auth/auth-config.ts b/src/app/shared/auth/auth-config.ts similarity index 100% rename from src/app/auth/auth-config.ts rename to src/app/shared/auth/auth-config.ts diff --git a/src/app/auth/auth-module-config.ts b/src/app/shared/auth/auth-module-config.ts similarity index 100% rename from src/app/auth/auth-module-config.ts rename to src/app/shared/auth/auth-module-config.ts diff --git a/src/app/auth/auth.guard.ts b/src/app/shared/auth/auth.guard.ts similarity index 100% rename from src/app/auth/auth.guard.ts rename to src/app/shared/auth/auth.guard.ts diff --git a/src/app/auth/auth.module.ts b/src/app/shared/auth/auth.module.ts similarity index 100% rename from src/app/auth/auth.module.ts rename to src/app/shared/auth/auth.module.ts diff --git a/src/app/auth/auth.service.spec.ts b/src/app/shared/auth/auth.service.spec.ts similarity index 100% rename from src/app/auth/auth.service.spec.ts rename to src/app/shared/auth/auth.service.spec.ts diff --git a/src/app/auth/auth.service.ts b/src/app/shared/auth/auth.service.ts similarity index 95% rename from src/app/auth/auth.service.ts rename to src/app/shared/auth/auth.service.ts index f32ee00..a864866 100644 --- a/src/app/auth/auth.service.ts +++ b/src/app/shared/auth/auth.service.ts @@ -70,7 +70,7 @@ export class AuthService { return; } - console.warn("Changements remarqués dans l'access_token (très probablement depuis un autre onglet). Mise à jour de l'observable isAuthenticated.") ; + //console.warn("Changements remarqués dans l'access_token (très probablement depuis un autre onglet). Mise à jour de l'observable isAuthenticated.") ; this.isAuthenticatedSubject$.next(this.oauthService.hasValidAccessToken()); // Si l'acces_token n'est pas valide, on redirige l'utilisateur vers la page de connexion @@ -104,8 +104,8 @@ export class AuthService { */ public runInitialLoginSequence(): Promise { if (location.hash) { - console.log("Fragment de hachage rencontré, tracé sous forme de tableau...") ; - console.table(location.hash.substr(1).split('&').map(kvp => kvp.split('='))); + //console.log("Fragment de hachage rencontré, tracé sous forme de tableau...") ; + //console.table(location.hash.substr(1).split('&').map(kvp => kvp.split('='))); } // 0. CONFIGURATION DU CHARGEMENT: @@ -170,7 +170,7 @@ export class AuthService { if (stateUrl.startsWith('/') === false) { stateUrl = decodeURIComponent(stateUrl); } - console.log(`Il y a eu l'état de ${this.oauthService.state}, donc nous vous envoyons à ${stateUrl}`) ; + //console.log(`Il y a eu l'état de ${this.oauthService.state}, donc nous vous envoyons à ${stateUrl}`) ; this.router.navigateByUrl(stateUrl); } }) diff --git a/src/app/shared/nav-menu/nav-menu.component.ts b/src/app/shared/nav-menu/nav-menu.component.ts index e412255..09a1a0a 100644 --- a/src/app/shared/nav-menu/nav-menu.component.ts +++ b/src/app/shared/nav-menu/nav-menu.component.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { AuthService } from 'app/auth/auth.service'; +import { AuthService } from '@shared/auth/auth.service'; import { Role } from '@shared/utils/roles'; diff --git a/src/silent-refresh.html b/src/silent-refresh.html index 6adbc4e..4a78daa 100644 --- a/src/silent-refresh.html +++ b/src/silent-refresh.html @@ -22,7 +22,7 @@ let message = isResponse(location.hash) ? location.hash : '#' + location.search; - console.log("Rafraîchissement silencieux de l'iframe affichée dans l'application parente, message: ", message); + //console.log("Rafraîchissement silencieux de l'iframe affichée dans l'application parente, message: ", message); (window.opener || window.parent).postMessage(message, location.origin);