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
@@ -199,6 +199,9 @@ export class PedidoPage implements OnInit {
},
"AttachmentList" :documents,
}
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
@@ -206,6 +209,8 @@ export class PedidoPage implements OnInit {
this.close();
} catch (error) {
this.toastService.badRequest()
} finally {
loader.remove()
}
}
@@ -220,13 +225,18 @@ export class PedidoPage implements OnInit {
"AttachmentList" :documents,
}
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage('Processo arquivado')
this.close();
} catch (error) {
this.toastService.badRequest()
} finally {
loader.remove()
}
}
async assignar(note:string, documents:any) {
@@ -240,13 +250,18 @@ export class PedidoPage implements OnInit {
"AttachmentList" :documents,
}
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage('Processo arquivado')
this.close();
} catch (error) {
this.toastService.badRequest()
} finally {
loader.remove()
}
}
sendExpedienteToPending() {