mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
add loader
This commit is contained in:
@@ -72,14 +72,16 @@ export class DespachosOptionsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
sendExpedienteToPending(){
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.popoverController.dismiss();
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
this.toastService._successMessage()
|
||||
loader.remove()
|
||||
|
||||
this.close();
|
||||
},()=>{
|
||||
|
||||
loader.remove()
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -98,11 +98,14 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{
|
||||
|
||||
this.toastService._successMessage()
|
||||
this.popoverController.dismiss('close')
|
||||
loader.remove()
|
||||
},()=>{
|
||||
loader.remove()
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
});
|
||||
|
||||
@@ -107,12 +107,14 @@ export class DiplomasGerarOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
async sendExpedienteToPending() {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
this.despachoService.sendExpedienteToPending(this.serialNumber).subscribe(res => {
|
||||
this.goBack();
|
||||
this.toastService.successMessage()
|
||||
loader.remove()
|
||||
},
|
||||
error => {
|
||||
loader.remove()
|
||||
this.toastService.badRequest("Processo não enviado para despacho")
|
||||
});
|
||||
|
||||
|
||||
@@ -252,12 +252,14 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
|
||||
sendExpedienteToPending(){
|
||||
this.popoverController.dismiss();
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
|
||||
loader.remove()
|
||||
this.close();
|
||||
},()=>{
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
loader.remove()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -81,11 +81,14 @@ export class RequestOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
|
||||
this.toastService._successMessage()
|
||||
this.close();
|
||||
loader.remove()
|
||||
},()=>{
|
||||
loader.remove()
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user