diff --git a/README.md b/README.md index 2eed6eaac7240d3bb0952602cce8a7598a3e3ffa..abea8359ec7fc902225cd734cdcd35405d317515 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,6 @@ -[](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client) -[](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client) -[](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client) -[](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client) -[](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client) -[](https://sonarqube.forge.grandlyon.com/dashboard?id=pamn_client) +# Res'In Client -# Pamn - -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.3. - -## Wikis +## [Wikis](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/-/wikis/home) Find [here](https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client/-/wikis/home) wikis about useful informations like installation and gitflow. @@ -29,10 +20,6 @@ Run `npm run build:dev` to build the project. The build artifacts will be stored Run `npm run test` to execute the unit tests via [Karma](https://karma-runner.github.io). -## Running end-to-end tests - -Run `npm run e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). - ## Contributing Use conventional commit format. For more info please read this article on [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 5f82d11aadeb911da708b5f9efa4dc419ce5a933..32636a1d17f19f229ea1e991ab297c556febc524 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -8,7 +8,6 @@ import { StructureListPrintComponent } from './form/orientation-form/component/s import { OrientationFormComponent } from './form/orientation-form/orientation-form.component'; import { AdminGuard } from './guards/admin.guard'; import { AuthGuard } from './guards/auth.guard'; -import { LoginGuard } from './guards/login.guard'; import { LegalNoticeComponent } from './legal-notice/legal-notice.component'; import { LoginComponent } from './login/login.component'; import { NewsletterSubscriptionComponent } from './newsletter-subscription/newsletter-subscription.component'; @@ -167,7 +166,7 @@ const routes: Routes = [ children: [ { path: '', - canActivate: [LoginGuard], + canActivate: [AuthGuard], component: StructureExcludeComponent, }, footerOutletRoute, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 0e71f948fc1f0128db718a7f52479464f27d8fcc..0a57db88a01552663c1510717aadb717489b7533 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -22,7 +22,6 @@ import { LegalNoticeComponent } from './legal-notice/legal-notice.component'; import { PageComponent } from './page/page.component'; import { ContactComponent } from './contact/contact.component'; import { AuthGuard } from './guards/auth.guard'; -import { LoginGuard } from './guards/login.guard'; import { CustomHttpInterceptor } from './config/http-interceptor'; import { ResetEmailComponent } from './reset-email/reset-email.component'; import { ResetPasswordComponent } from './reset-password/reset-password.component'; @@ -102,7 +101,6 @@ import { FilterModalComponent } from './annuaire/filter-modal/filter-modal.compo AuthGuard, AdminGuard, RoleGuard, - LoginGuard, DeactivateGuard, TempUserResolver, StructureResolver, diff --git a/src/app/form/form-view/form-view.component.scss b/src/app/form/form-view/form-view.component.scss index c9d10754fcabc00d5ccd2edddeba7033ba9dc1a7..f8a2759d487fd7e2eab38a0f55e8fed87bfebb44 100644 --- a/src/app/form/form-view/form-view.component.scss +++ b/src/app/form/form-view/form-view.component.scss @@ -14,14 +14,13 @@ max-width: 980px; width: 100%; height: 100%; - margin: auto; + margin: 1rem auto; overflow-y: auto; color: $grey-1; background: $white; border-radius: 8px; border: 1px solid $grey-6; padding: 32px 48px; - @media #{$tablet} { margin: 0px 4px; width: auto; @@ -31,6 +30,7 @@ } .no-max-width { max-width: none; + height: 100%; } .missing-information { display: flex; diff --git a/src/app/form/form-view/global-components/information-step/information-step.component.scss b/src/app/form/form-view/global-components/information-step/information-step.component.scss index 81646409c50ac50b6cd027bb48fb4b9fb86fd525..b52cb828072975cc4192f851741955fae9206990 100644 --- a/src/app/form/form-view/global-components/information-step/information-step.component.scss +++ b/src/app/form/form-view/global-components/information-step/information-step.component.scss @@ -18,7 +18,7 @@ text-align: center; } &.profile-skip { - height: unset; + height: 100%; max-width: unset; p { diff --git a/src/app/guards/auth.guard.ts b/src/app/guards/auth.guard.ts index d77c855f4e47f0521278d9784d572cc34b47d580..456ada45acc756f56f2fbbcf26bfc400d87ac5fa 100644 --- a/src/app/guards/auth.guard.ts +++ b/src/app/guards/auth.guard.ts @@ -12,7 +12,7 @@ export class AuthGuard implements CanActivate { if (this.authService.isLoggedIn()) { return true; } - this.router.navigate(['/home'], { queryParams: { returnUrl: state.url } }); + this.router.navigate(['/login'], { queryParams: { returnUrl: state.url } }); return false; } } diff --git a/src/app/guards/login.guard.ts b/src/app/guards/login.guard.ts deleted file mode 100644 index b2d8e5b7f7ef49917feab39e237f9ef49968c5cb..0000000000000000000000000000000000000000 --- a/src/app/guards/login.guard.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router'; -import { Injectable } from '@angular/core'; -import { AuthService } from '../services/auth.service'; -/** - * Guard to assert that we are logged in. Otherwise redirect to home - */ -@Injectable() -export class LoginGuard implements CanActivate { - constructor(private authService: AuthService, private router: Router) {} - - canActivate(_next: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean { - if (this.authService.isLoggedIn()) { - return true; - } - this.router.navigate(['/login'], { queryParams: { returnUrl: state.url } }); - return false; - } -}