Add delete notification and loader

This commit is contained in:
Peter Maquiran
2021-07-13 17:15:25 +01:00
parent 5847296edc
commit 1993d0cdb6
2 changed files with 19 additions and 5 deletions
@@ -163,12 +163,12 @@ export class PublicationsPage implements OnInit {
//this.refreshing()
}
deleteAction(id?: string){
async deleteAction(id?: string){
const loader = this.toastService.loading();
try {
this.publications.DeletePresidentialAction(id).toPromise();
await this.publications.DeletePresidentialAction(id).toPromise();
this.toastService.successMessage()
} catch(e) {
this.toastService.badRequest()