Merge branch 'bugfix/pendentes-loader' into develop

This commit is contained in:
gilson.manuel
2022-07-15 14:37:50 +01:00
11 changed files with 28 additions and 5 deletions
@@ -184,11 +184,14 @@ export class DiplomasGerarPage 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")
});
@@ -324,12 +324,15 @@ export class ExpedienteDetailPage implements OnInit {
}
sendExpedienteToPending() {
const loader = this.toastService.loading()
this.processes.SetTaskToPending(this.serialNumber).subscribe(res => {
this.toastService._successMessage('Processo enviado para pendentes')
this.goBack();
loader.remove()
},
(error) => {
loader.remove()
this.toastService._badRequest('Processo não enviado para pendentes')
});
}
@@ -133,12 +133,15 @@ export class ExpedientePrPage implements OnInit {
}
sendExpedienteToPending() {
const loader = this.toastService.loading()
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
this.toastService._successMessage('Processo enviado para pendentes')
this.goBack();
loader.remove()
},
(error)=>{
loader.remove()
this.toastService._badRequest('Processo não enviado para pendentes')
});
}
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title">
<div class="thetitle"><ion-label >Expediente</ion-label></div>
<div class="theicon">
<div class="theicon" (click)="refreshing()">
<button title="Atualizar" class="btn-no-color" (click)="refreshing()">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
@@ -84,6 +84,7 @@ export class ExpedientesPrPage implements OnInit {
}
refreshing() {
setTimeout(() => {
this.LoadList();
}, 1000);
@@ -95,6 +95,7 @@ export class ExpedientsPage implements OnInit {
}
doRefresh() {
setTimeout(() => {
this.LoadList();
}, 1000)
@@ -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')
});