created all delete functions

This commit is contained in:
2025-11-21 18:51:35 +01:00
parent 230560dbbc
commit ebea9f1a6b
7 changed files with 46 additions and 12 deletions

View File

@@ -51,7 +51,19 @@ export class AuthorTable implements OnInit {
this.authorsLoading.set(false)
}
delete() {
return
async delete(author:number) {
try {
await firstValueFrom(this.authorsService.deleteAuthorEndpoint(author))
this.notificationService.success(
'Success',
'Suppression effectuée'
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
)
}
await this.fetchauthors();
}
}