From c9153a6c245cdc34efafcf641361b6753ee1b68b Mon Sep 17 00:00:00 2001 From: FazCodeFR <30906528+FazCodeFR@users.noreply.github.com> Date: Sun, 8 Sep 2024 16:07:30 +0200 Subject: [PATCH] Add chat in asso --- .../animaux/animaux-list/animaux-list.component.html | 2 +- .../animaux/animaux-list/animaux-list.component.ts | 5 +++-- .../associations-details.component.html | 11 +++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) 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 @@