This commit is contained in:
tiago.kayaya
2021-07-27 10:07:55 +01:00
parent 3fe7097dfa
commit 6847d2c74a
2 changed files with 14 additions and 2 deletions
@@ -224,7 +224,18 @@ export class ExpedienteDetailPage implements OnInit {
modal.onDidDismiss().then( async(res)=>{
let body = res['data'];
if(res['data']) {
await 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{
this.close();
@@ -275,6 +286,7 @@ export class ExpedienteDetailPage implements OnInit {
}
else{
if(res['data']== 'Yes'){
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise();