From 735afc1d4af2ba7e811c07ea77a547b68fecc2f4 Mon Sep 17 00:00:00 2001 From: styve Lioumba Date: Wed, 3 Dec 2025 16:43:45 +0100 Subject: [PATCH] feat : bump 1.0.0 => 1.1.0 --- package.json | 2 +- src/app/app.component.spec.ts | 4 +- src/app/app.component.ts | 2 +- .../profiles/pb-profile.repository.ts | 4 +- .../components/footer/footer.component.html | 4 +- .../components/nav-bar/nav-bar.component.html | 191 +++++++++++------- .../features/filter/filter.component.ts | 15 ++ src/app/ui/authentification/auth.facade.ts | 1 + 8 files changed, 143 insertions(+), 80 deletions(-) diff --git a/package.json b/package.json index 75b732e..f81289e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "trouve-ton-profile", - "version": "1.0.0", + "version": "1.1.0", "scripts": { "ng": "ng", "start": "bash replace-prod-env.sh src/environments/environment.development.ts $ENV_URL && ng serve", diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 3440c00..1052520 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -55,9 +55,9 @@ describe('AppComponent', () => { expect(app).toBeTruthy(); }); - it(`should have the 'TrouveTonProfile' title`, () => { + it(`should have the 'TrouveTonProfil' title`, () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.componentInstance; - expect(app.title).toEqual('TrouveTonProfile'); + expect(app.title).toEqual('TrouveTonProfil'); }); }); diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 641ec5e..dd759c8 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -13,6 +13,6 @@ import { ThemeService } from '@app/core/services/theme/theme.service'; styleUrl: './app.component.scss', }) export class AppComponent { - title = 'TrouveTonProfile'; + title = 'TrouveTonProfil'; themeService = inject(ThemeService); } diff --git a/src/app/infrastructure/profiles/pb-profile.repository.ts b/src/app/infrastructure/profiles/pb-profile.repository.ts index 7d04ac8..925f89c 100644 --- a/src/app/infrastructure/profiles/pb-profile.repository.ts +++ b/src/app/infrastructure/profiles/pb-profile.repository.ts @@ -12,7 +12,7 @@ export class PbProfileRepository implements ProfileRepository { private pb = new PocketBase(environment.baseUrl); private defaultOptions = { - expand: 'utilisateur', + expand: 'utilisateur,secteur', }; list(params?: SearchFilters): Observable { @@ -53,7 +53,7 @@ export class PbProfileRepository implements ProfileRepository { if (params) { if (params.secteur) { - filters.push(`secteur ~ '${params.secteur}'`); + filters.push(`secteur.nom ~ '${params.secteur}'`); } if (params.profession) { diff --git a/src/app/shared/components/footer/footer.component.html b/src/app/shared/components/footer/footer.component.html index 91d2e40..32069a1 100644 --- a/src/app/shared/components/footer/footer.component.html +++ b/src/app/shared/components/footer/footer.component.html @@ -17,7 +17,7 @@ - TrouveTonProfile + TrouveTonProfil @@ -120,7 +120,7 @@

- © {{ currentYear }} TrouveTonProfile. Tous droits réservés. + © {{ currentYear }} TrouveTonProfil. Tous droits réservés.

diff --git a/src/app/shared/components/nav-bar/nav-bar.component.html b/src/app/shared/components/nav-bar/nav-bar.component.html index 65c720a..9671885 100644 --- a/src/app/shared/components/nav-bar/nav-bar.component.html +++ b/src/app/shared/components/nav-bar/nav-bar.component.html @@ -17,37 +17,7 @@ -
- - @if (isAuthenticated() && isEmailVerified() && user()) { - - @if (user()!.avatar) { - - } @else { - - } - - } - +
diff --git a/src/app/shared/features/filter/filter.component.ts b/src/app/shared/features/filter/filter.component.ts index 56ff9e0..44ba609 100644 --- a/src/app/shared/features/filter/filter.component.ts +++ b/src/app/shared/features/filter/filter.component.ts @@ -55,6 +55,7 @@ export class FilterComponent implements OnInit { ngOnInit() { this.sectorFacade.load(); this.profileFacade.load(); + this.initFormValues(); } // Vérifier si des filtres sont actifs pour afficher le bouton "Effacer" @@ -65,5 +66,19 @@ export class FilterComponent implements OnInit { clearAllFilters(): void { this.searchService.reset(); + this.onFilterChange.emit(this.activeFilters()); + this.initFormValues(); + } + + private initFormValues() { + const filters = this.searchService.getFilters(); + this.activeFilters.set(filters()); + + this.filterForm.setValue({ + verified: this.activeFilters().verified, + secteur: this.activeFilters().secteur, + profession: this.activeFilters().profession, + sort: this.activeFilters().sort || 'recent', + }); } } diff --git a/src/app/ui/authentification/auth.facade.ts b/src/app/ui/authentification/auth.facade.ts index acb10c7..1a06795 100644 --- a/src/app/ui/authentification/auth.facade.ts +++ b/src/app/ui/authentification/auth.facade.ts @@ -85,6 +85,7 @@ export class AuthFacade { logout() { this.logoutUseCase.execute(); + this.isAuthenticated.set(false); this.getCurrentUser(); }