diff --git a/src/app/form/form.component.html b/src/app/form/form.component.html index a96763da08eb8a11a3d74a193aa0e3f450f363cb..635b6f601f9b9e91517da5602a095874dd718d90 100644 --- a/src/app/form/form.component.html +++ b/src/app/form/form.component.html @@ -121,7 +121,7 @@ <h3>Qui êtes-vous ?</h3> <p>Ces informations ne seront pas visibles sur la plateforme</p> </div> - <div class="title"> + <div *ngIf="!isClaimMode" class="title"> <h4>Vous possédez déja un compte ? Connectez-vous:</h4> <button class="btn-primary small next" *ngIf="!isLoggedIn" (click)="isPopUpOpen = !isPopUpOpen"> Se connecter diff --git a/src/app/form/form.component.ts b/src/app/form/form.component.ts index 7e19498b27bf06092466c8420f04b4fed8ad8405..ef3e816b176079be679ee0fa84784a0be64663f7 100644 --- a/src/app/form/form.component.ts +++ b/src/app/form/form.component.ts @@ -155,12 +155,12 @@ export class FormComponent implements OnInit { public updateFormOnLogin(): void { this.profileService.getProfile().then((user: User) => { this.profile = user; + this.router.navigateByUrl('create-structure'); + this.progressStatus += (100 / this.nbPagesForm) * 2; + this.pagesValidation[PageTypeEnum.accountInfo] = { valid: true }; + this.pagesValidation[PageTypeEnum.accountCredentials] = { valid: true }; + this.currentPage = PageTypeEnum.structureNameAndAddress; }); - this.router.navigateByUrl('create-structure'); - this.progressStatus += (100 / this.nbPagesForm) * 2; - this.pagesValidation[PageTypeEnum.accountInfo] = { valid: true }; - this.pagesValidation[PageTypeEnum.accountCredentials] = { valid: true }; - this.currentPage = PageTypeEnum.structureNameAndAddress; } public get isLoggedIn(): boolean { diff --git a/src/app/post/components/post-card/post-card.component.html b/src/app/post/components/post-card/post-card.component.html index e32709a75774afb37067909c529b351c8344577a..ff06f423aac5debc155bdf5c269e02d9500e6e45 100644 --- a/src/app/post/components/post-card/post-card.component.html +++ b/src/app/post/components/post-card/post-card.component.html @@ -27,7 +27,7 @@ </div> <div fxLayout="column" class="informations"> <div fxLayout="row"> - {{ post.published_at | date: 'shortDate' }} + {{ post.updated_at | date: 'shortDate' }} </div> <div fxLayout="row">par {{ post.author }}</div> </div> diff --git a/src/app/post/components/post-details/post-details.component.html b/src/app/post/components/post-details/post-details.component.html index 32e17b64f9049f2576a847be1c73b7d600265319..3de9a5c0406951f7630379e0f7d627b65dcd584b 100644 --- a/src/app/post/components/post-details/post-details.component.html +++ b/src/app/post/components/post-details/post-details.component.html @@ -24,7 +24,7 @@ <div fxLayout="column" class="informations" *ngIf="post.tags[0] && post.tags[0].slug != 'appels'"> <div fxLayout="row"> - {{ post.published_at | date: 'shortDate' }} + {{ post.updated_at | date: 'shortDate' }} </div> <div fxLayout="row">par {{ post.author }}</div> </div> diff --git a/src/app/post/models/post.model.ts b/src/app/post/models/post.model.ts index eb13ecef2069a06fbd5845c659539a4829c7d1b2..ea6fba08486011bd755747c19ac2828ed9479b2f 100644 --- a/src/app/post/models/post.model.ts +++ b/src/app/post/models/post.model.ts @@ -4,6 +4,7 @@ import { Tag } from './tag.model'; export class Post { id: number; published_at: Date; + updated_at: Date; title: string; excerpt: string; feature_image: string; diff --git a/src/app/structure-list/components/structure-details/structure-details.component.ts b/src/app/structure-list/components/structure-details/structure-details.component.ts index 39ecebdb8a63f3953588694db3f4ab6204c70af1..330d79cc04137a44f08737c4067991342fbf9e21 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.ts +++ b/src/app/structure-list/components/structure-details/structure-details.component.ts @@ -237,6 +237,8 @@ export class StructureDetailsComponent implements OnInit { return 'Tout public'; case PublicCategorie.under16Years: return 'Moins de 16 ans'; + case PublicCategorie.women: + return 'Uniquement femmes'; default: return null; } diff --git a/src/app/structure-list/components/structure-list-search/structure-list-search.component.ts b/src/app/structure-list/components/structure-list-search/structure-list-search.component.ts index b84aafe94e64286d9145c6538f94b31b3c246286..40309ecd2629adf932414b916dba95991e7ecbac 100644 --- a/src/app/structure-list/components/structure-list-search/structure-list-search.component.ts +++ b/src/app/structure-list/components/structure-list-search/structure-list-search.component.ts @@ -51,7 +51,9 @@ export class StructureListSearchComponent implements OnInit { private router: Router ) { this.searchForm = this.fb.group({ - searchTerm: '', + searchTerm: this.activatedRoute.snapshot.queryParamMap.get('search') + ? this.activatedRoute.snapshot.queryParamMap.get('search') + : '', }); } ngOnInit(): void { @@ -91,6 +93,10 @@ export class StructureListSearchComponent implements OnInit { }, queryParamsHandling: 'merge', }); + } else if (!term) { + this.router.navigate(['/acteurs'], { + relativeTo: this.route, + }); } const filters: Filter[] = []; if (term) { diff --git a/src/app/structure-list/enum/public.enum.ts b/src/app/structure-list/enum/public.enum.ts index 27256129767d536ed0b9b6974b408fbcedfae7e1..905f79748193cb9859118321b0bfd92efce23f37 100644 --- a/src/app/structure-list/enum/public.enum.ts +++ b/src/app/structure-list/enum/public.enum.ts @@ -4,4 +4,5 @@ export enum PublicCategorie { adult = 'adultes', elderly = 'seniorsPlusDe65Ans', all = 'toutPublic', + women = 'uniquementFemmes', } diff --git a/src/app/utils/CustomRegExp.ts b/src/app/utils/CustomRegExp.ts index 10624a7a56614b45885636ebb6589bb4d697a95e..116439c0e325bcab02f7ac19e1ac15d6b0438382 100644 --- a/src/app/utils/CustomRegExp.ts +++ b/src/app/utils/CustomRegExp.ts @@ -2,7 +2,7 @@ export class CustomRegExp { /** * Validate a password (at least 8 characters, 1 uppercase letter, 1 lowercase letter, 1 number, and 1 special character) */ - public static readonly PASSWORD: RegExp = /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[-!@#$%^&*])(?=.{8,})/; //NOSONAR + public static readonly PASSWORD: RegExp = /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[*.! @#$%^&(){}\[\]:;<>,?\/\\~_+\-=|])(?=.{8,})/; //NOSONAR /** * Validate an email */