feat: suppression d'un projet

This commit is contained in:
2026-09-24 16:45:37 +02:00
parent 55f4a665f8
commit cb36cb6c7b
3 changed files with 39 additions and 11 deletions
+18
View File
@@ -142,6 +142,24 @@ export class Home {
});
}
/**
* deleteGroup
*/
public deleteGroup(id_group:number) {
let response:Observable<void> = this.groupService.deleteGroup(id_group);
response.subscribe({
next: () => {
this.groups.update((groups) => {
return groups.filter(((group) => group.id_group != id_group));
});
},
error: (error) => {
console.error(`La suppression du groupe est impossible\nErreur: ${error.error.message}`);
}
});
}
public toggleProjectForm(): void {
this.showProjectForm = !this.showProjectForm;
}