gestion des messages , toast et chargement sur les informations complementaires

This commit is contained in:
styve Lioumba
2025-11-17 18:45:45 +01:00
parent 9669b2b5b4
commit e2aa88c434
3 changed files with 515 additions and 465 deletions

View File

@@ -11,12 +11,14 @@ import { CreateProfileUseCase } from '@app/usecase/profiles/create-profile.useca
import { UpdateProfileUseCase } from '@app/usecase/profiles/update-profile.usecase';
import { GetProfileUseCase } from '@app/usecase/profiles/get-profile.usecase';
import { ProfileDTO } from '@app/domain/profiles/dto/create-profile.dto';
import { AuthService } from '@app/core/services/authentication/auth.service';
@Injectable({
providedIn: 'root',
})
export class ProfileFacade {
private profileRepository = inject(PROFILE_REPOSITORY_TOKEN);
protected readonly authService = inject(AuthService);
private listUseCase = new ListProfilesUseCase(this.profileRepository);
private createUseCase = new CreateProfileUseCase(this.profileRepository);
@@ -80,6 +82,7 @@ export class ProfileFacade {
this.updateUseCase.execute(profileId, profile).subscribe({
next: (profile: Profile) => {
this.profile.set(ProfilePresenter.toViewModel(profile));
this.authService.updateUser();
this.handleError(ActionType.UPDATE, false, null, false);
},
error: (err) => {