This commit is contained in:
tiago.kayaya
2021-09-03 13:11:53 +01:00
parent 3c7c60cce0
commit 1ab73f0daf
2 changed files with 8 additions and 13 deletions
@@ -382,19 +382,17 @@ export class ExpedienteDetailPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then( async(res)=>{
alert('AQUI')
let body = res['data'];
if(res['data']) {
//await this.distartExpedientModal(body);
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise();
//this.toastService.successMessage('Processo descartado');
this.goBack();
} catch (error) {
this.toastService.badRequest('Processo não descartado')
} finally {
loader.remove()
this.goBack();
} catch (error) {
this.toastService.badRequest('Processo não descartado')
} finally {
loader.remove()
}
}
else{
@@ -87,7 +87,7 @@ export class OptsExpedientePage implements OnInit {
}
else {
this.location.back()
/* this.activatedRoute.paramMap.subscribe(params => {
console.log('YES');
@@ -166,7 +166,7 @@ export class OptsExpedientePage implements OnInit {
});
});
this.popoverController.dismiss()
}
@@ -325,12 +325,9 @@ export class OptsExpedientePage implements OnInit {
console.log(res['data']);
let body = res['data'];
if(res['data']){
console.log('open discart')
//this.distartExpedientModal(body);
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise();
this.toastService.successMessage('Processo descartado');
this.goBack();
} catch (error) {
this.toastService.badRequest('Processo não descartado')