mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
Improve loader
This commit is contained in:
@@ -187,6 +187,8 @@ export class DespachoPage implements OnInit {
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
@@ -194,6 +196,9 @@ export class DespachoPage implements OnInit {
|
||||
} catch(error) {
|
||||
this.toastService.badRequest("Processo não criado")
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
|
||||
async arquivar(note:string, documents:any){
|
||||
@@ -206,6 +211,8 @@ export class DespachoPage implements OnInit {
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage('Processo descartado')
|
||||
@@ -213,6 +220,9 @@ export class DespachoPage implements OnInit {
|
||||
} catch (error) {
|
||||
this.toastService.badRequest("Processo não descartado")
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -226,6 +236,9 @@ export class DespachoPage implements OnInit {
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage()
|
||||
@@ -233,6 +246,10 @@ export class DespachoPage implements OnInit {
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async reexecute(note:string, documents:any) {
|
||||
@@ -246,6 +263,8 @@ export class DespachoPage implements OnInit {
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage()
|
||||
@@ -254,6 +273,9 @@ export class DespachoPage implements OnInit {
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user