feat : #12 recherche et filtre
This commit is contained in:
@@ -11,6 +11,7 @@ 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 { SearchFilters } from '@app/domain/search/search-filters';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@@ -32,10 +33,10 @@ export class ProfileFacade {
|
||||
message: null,
|
||||
});
|
||||
|
||||
load(search?: string) {
|
||||
load(search?: SearchFilters) {
|
||||
this.handleError(ActionType.READ, false, null, true);
|
||||
|
||||
this.listUseCase.execute({ search }).subscribe({
|
||||
this.listUseCase.execute(search).subscribe({
|
||||
next: (profiles) => {
|
||||
this.profiles.set(ProfilePresenter.toViewModels(profiles));
|
||||
this.handleError(ActionType.READ, false, null, false);
|
||||
|
||||
@@ -45,7 +45,6 @@ export class ProjectFacade {
|
||||
error: (err) => {
|
||||
this.handleError(ActionType.READ, false, err, false);
|
||||
},
|
||||
complete: () => {},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ import { ProjectViewModel } from '@app/ui/projects/project.presenter.model';
|
||||
import { Project } from '@app/domain/projects/project.model';
|
||||
|
||||
export class ProjectPresenter {
|
||||
constructor() {}
|
||||
|
||||
toViewModel(project: Project): ProjectViewModel {
|
||||
return {
|
||||
id: project.id,
|
||||
|
||||
@@ -2,8 +2,6 @@ import { UserViewModel } from '@app/ui/users/user.presenter.model';
|
||||
import { User } from '@app/domain/users/user.model';
|
||||
|
||||
export class UserPresenter {
|
||||
constructor() {}
|
||||
|
||||
toViewModel(user: User): UserViewModel {
|
||||
return {
|
||||
id: user.id,
|
||||
|
||||
Reference in New Issue
Block a user