Skip to content

Commit

Permalink
fix(projects list): deactivating-a-project-not-possible (DEV-3206) (#…
Browse files Browse the repository at this point in the history
…1366)

Co-authored-by: Julien Schneider <julien.schneider.1991@gmail.com>
  • Loading branch information
domsteinbach and derschnee68 committed Jan 25, 2024
1 parent ac5298a commit ad76437
Showing 1 changed file with 6 additions and 13 deletions.
Expand Up @@ -161,22 +161,15 @@ export class ProjectsListComponent implements OnInit, OnDestroy {
}

deactivateProject(id: string) {
this._projectApiService.delete(id).pipe(
tap(() => {
this.refreshParent.emit(); // TODO Soft or Hard refresh ?
})
);
this._projectApiService.delete(id).subscribe(() => {
this.refreshParent.emit();
});
}

activateProject(id: string) {
// As there is no activate route implemented in the js lib, we use the update route to set the status to true
const data: UpdateProjectRequest = new UpdateProjectRequest();
data.status = true;

this._projectApiService.update(id, data).pipe(
tap(() => {
this.refreshParent.emit();
})
);
this._projectApiService.update(id, { status: true }).subscribe(() => {
this.refreshParent.emit();
});
}
}

0 comments on commit ad76437

Please sign in to comment.