Improve form validation

This commit is contained in:
Peter Maquiran
2021-07-07 16:25:36 +01:00
parent 34eed1dc26
commit 49d09e3593
8 changed files with 72 additions and 7 deletions
@@ -123,11 +123,18 @@ export class NewActionPage implements OnInit {
ActionType: this.segment,
}
let loader = this.toastService.loading()
try {
await this.publication.CreatePublicationFolder(this.folder).toPromise();
loader.remove()
this.toastService.successMessage("Ação presidencial criado");
this.close();
} catch (error) {
loader.remove()
this.toastService.badRequest("Ação presidencial não criado");
}