Improve test and loader

This commit is contained in:
Peter Maquiran
2021-07-12 12:26:06 +01:00
parent c819ebfd3e
commit 6ac7a4a715
3 changed files with 12 additions and 3 deletions
@@ -268,6 +268,9 @@ export class DespachoPrPage implements OnInit {
},
"AttachmentList" :documents,
}
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage('')
@@ -275,6 +278,9 @@ export class DespachoPrPage implements OnInit {
} catch (error) {
this.toastService.badRequest()
}
finally {
loader.remove()
}
}
@@ -289,6 +295,9 @@ export class DespachoPrPage implements OnInit {
},
"AttachmentList" :documents,
}
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage()
@@ -296,6 +305,9 @@ export class DespachoPrPage implements OnInit {
} catch (error) {
this.toastService.badRequest()
}
finally {
loader.remove()
}
}