created all delete functions
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user