This commit is contained in:
tiago.kayaya
2021-08-06 12:26:36 +01:00
parent 6baec772dc
commit 766897332c
@@ -409,17 +409,24 @@ export class ExpedientePrPage implements OnInit {
cssClass: classs,
});
await modal.present();
modal.onDidDismiss().then(res=>{
console.log(res['data']);
modal.onDidDismiss().then(async(res)=>{
let body = res['data'];
// alert('close '+ res['data'])
if(res['data']){
console.log('open discart');
if(res['data']) {
this.distartExpedientModal(body);
//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()
}
}
else{
console.log('Not open');
this.close();
}
});
}