diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 332450b..b37f76b 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -15,16 +15,15 @@ import { PageAccountComponent } from './pages/page-account/page-account.componen const routes: Routes = [ { path: '', redirectTo: 'home', pathMatch: 'full' }, {path: 'signin', component: SigninComponent}, - {path: 'signup', component: SignupComponent}, - { path: 'home', component: HomePageComponent }, - { path: 'categories', component: ListCategoriesComponent }, - { path: 'favoris', component: FavorisUserComponent }, - { path: 'filtres', component: FiltersPageComponent }, - { path: 'profil', component: PageAccountComponent }, + { path: 'home',canActivate: [AuthGuard], component: HomePageComponent }, + { path: 'categories',canActivate: [AuthGuard], component: ListCategoriesComponent }, + { path: 'favoris',canActivate: [AuthGuard], component: FavorisUserComponent }, + { path: 'filtres',canActivate: [AuthGuard], component: FiltersPageComponent }, + { path: 'profil',canActivate: [AuthGuard], component: PageAccountComponent }, { path: 'Deconnexion', redirectTo: 'home'}, {path: 'restaurants', canActivate: [AuthGuard], /*data : {ROLE : "ROLE_ADMIN"},*/ component: RestoPageComponent}, {path: 'page-not-found',component: PageNotFoundComponent}, - {path: 'admin', component: AdminPageComponent}, + {path: 'admin',canActivate: [AuthGuard], component: AdminPageComponent}, {path: '**', redirectTo: 'page-not-found' } ]; diff --git a/src/app/card-resto/card-resto.component.scss b/src/app/card-resto/card-resto.component.scss index 0c641f9..6eadc29 100644 --- a/src/app/card-resto/card-resto.component.scss +++ b/src/app/card-resto/card-resto.component.scss @@ -34,8 +34,6 @@ } .accordion-button.collapsed { background: #CE0000; - - } .accordion-button.collapsed::after { diff --git a/src/app/pages/filters-page/filters-page.component.html b/src/app/pages/filters-page/filters-page.component.html index b07ef48..6da1e41 100644 --- a/src/app/pages/filters-page/filters-page.component.html +++ b/src/app/pages/filters-page/filters-page.component.html @@ -46,7 +46,9 @@
- Veuillez sélectionner le prix souhaité + Veuillez sélectionner la gamme de prix souhaitée +
+ 1(1 à 10) 2(11 à 20) 3(21 à 30) 4(31 à 20)
diff --git a/src/app/pages/page-account/page-account.component.html b/src/app/pages/page-account/page-account.component.html index 0e13e4c..9c7ecee 100644 --- a/src/app/pages/page-account/page-account.component.html +++ b/src/app/pages/page-account/page-account.component.html @@ -1,4 +1,5 @@
+

Vos informations personnelles

diff --git a/src/app/services/auth.guard.ts b/src/app/services/auth.guard.ts index 6001ce1..77c9e97 100644 --- a/src/app/services/auth.guard.ts +++ b/src/app/services/auth.guard.ts @@ -26,7 +26,7 @@ export class AuthGuard implements CanActivate { const decodedToken = jwt_decode(token); // TODO boucle sur le ['auth'] pour controler le role et en fonction de ca renvoyer true ou false ac redirection page403 - + console.log('decodedToken : ', decodedToken); @@ -37,6 +37,7 @@ export class AuthGuard implements CanActivate { // le token a expiré, je n'autorise pas l'accès this.tokenService.destroyToken(this.tokenKey); this.router.navigate(['signin']); + return false; } }