diff --git a/src/app/components/animaux/animaux-list/animaux-list.component.html b/src/app/components/animaux/animaux-list/animaux-list.component.html index 6c9a0df..e5515b6 100644 --- a/src/app/components/animaux/animaux-list/animaux-list.component.html +++ b/src/app/components/animaux/animaux-list/animaux-list.component.html @@ -54,7 +54,7 @@
- {{chat.association.nom}} - {{formatDate(chat.createdAt)}}
diff --git a/src/app/components/animaux/animaux-list/animaux-list.component.ts b/src/app/components/animaux/animaux-list/animaux-list.component.ts index 735a61c..556457a 100644 --- a/src/app/components/animaux/animaux-list/animaux-list.component.ts +++ b/src/app/components/animaux/animaux-list/animaux-list.component.ts @@ -20,6 +20,7 @@ import { FormBuilder, FormGroup } from '@angular/forms'; }) export class AnimauxListComponent { @Input() profileContext: boolean = false; + @Input() associationId: number | undefined = undefined; isLoaded: boolean = false; faMars = faMars; faVenus = faVenus; @@ -65,7 +66,7 @@ export class AnimauxListComponent { async ngOnInit() { this.isAuthenticated = await firstValueFrom(this.auth.isAuthenticated$); - if (this.profileContext && this.isAuthenticated) { + if (this.profileContext && this.isAuthenticated && !this.associationId) { this.getCatByFavoris(); } else { this.getCats(); @@ -103,7 +104,7 @@ export class AnimauxListComponent { const filters = { ville: this.form.value.ville, race: this.form.value.race, - association: this.form.value.association + association: this.associationId ? this.associationId : this.form.value.association }; console.log('🚀 ~ AnimauxListComponent ~ catSubscription ~ filters:', filters); diff --git a/src/app/components/associations/associations-details/associations-details.component.html b/src/app/components/associations/associations-details/associations-details.component.html index e8c7f04..b5e1935 100644 --- a/src/app/components/associations/associations-details/associations-details.component.html +++ b/src/app/components/associations/associations-details/associations-details.component.html @@ -147,6 +147,17 @@