Skip to content

Commit

Permalink
fix asso
Browse files Browse the repository at this point in the history
  • Loading branch information
FazCodeFR committed Jun 6, 2024
1 parent 2115e2d commit f32483c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
<ul role="list" class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
<li *ngFor="let association of associations" class="col-span-1 divide-y divide-gray-200 rounded-lg bg-white shadow">
<div class="flex w-full items-center justify-between space-x-6 p-6">
<div class="flex-1 truncate">
<div class="flex-1">
<div class="flex items-center space-x-3">
<a [routerLink]="['/associations', association.id]">
<h3 class="truncate text-sm font-medium text-gray-900">{{ association.nom }}</h3>
</a>
</div>
<p class="mt-1 truncate text-sm text-gray-500" [innerHTML]="sanitizeHtml(association?.description!)"></p>
<p class="mt-1 text-sm text-gray-500">
{{ association.shortDescription }}
</p>
</div>
<img class="h-20 w-20 flex-shrink-0 rounded-full bg-gray-300" [src]="association.Photos[0].url" alt="{{ association.nom }}">

<img class="h-20 w-20 flex-shrink-0 rounded-full bg-gray-300" [src]="association.photos[0].url" alt="{{ association.nom }}">
</div>
<div>
<div class="flex justify-center border-gray-200">
Expand All @@ -25,4 +26,4 @@ <h3 class="truncate text-sm font-medium text-gray-900">{{ association.nom }}</h3
</div>
</li>
</ul>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class AssociationsListComponent {
const associationSubscription = this.appService.getAllAssociations().subscribe({
next: (associations) => {
this.associations = associations;
console.log('🚀 ~ AssociationsListComponent ~ associationSubscription ~ this.associations:', this.associations);
this.isLoaded = true;
},
error: (error) => {
Expand Down
1 change: 1 addition & 0 deletions src/app/interfaces/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export interface Association {
url: string;
ville: string;
description?: string;
shortDescription?: string;
tel?: string;
chats: Chat[];
utilisateurs: Utilisateur[];
Expand Down

0 comments on commit f32483c

Please sign in to comment.