Improve loader

This commit is contained in:
Peter Maquiran
2021-07-12 11:13:29 +01:00
parent c526426aec
commit 507ebd691a
34 changed files with 400 additions and 32 deletions
@@ -98,7 +98,8 @@ export class EditActionPage implements OnInit {
ActionType: this.folder.ActionType,
}
console.log(body);
const loader = this.toastService.loading()
try {
await this.publicationsService.UpdatePresidentialAction(body).toPromise()
this.close();
@@ -106,6 +107,9 @@ export class EditActionPage implements OnInit {
this.toastService.successMessage('Acção presidencial atualizada')
} catch (error) {
this.toastService.badRequest('Não foi possivel atualizar a acção presidencial')
} finally {
loader.remove()
}
}
}