fixe go back

This commit is contained in:
Peter Maquiran
2023-06-10 16:44:19 +01:00
parent ffa1f34b4c
commit 32dfa12517
3 changed files with 39 additions and 34 deletions
@@ -220,7 +220,7 @@ export class DespachoPage implements OnInit {
await this.despachoService.executado(note, documents, this.serialnumber).toPromise();
this.httpErrorHandle.httpsSucessMessagge('Executado')
this.TaskService.loadDespachos();
this.close();
// this.close();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
}
@@ -237,7 +237,7 @@ export class DespachoPage implements OnInit {
await this.despachoService.arquivar(note, documents, this.serialnumber).toPromise()
this.httpErrorHandle.httpsSucessMessagge('Arquivar')
this.TaskService.loadDespachos();
this.close();
// this.close();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
}
@@ -264,7 +264,7 @@ export class DespachoPage implements OnInit {
await this.processes.CompleteTask(body).toPromise()
this.httpErrorHandle.httpsSucessMessagge('Reexecução')
this.TaskService.loadDespachos();
this.close();
//this.close();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
@@ -292,7 +292,7 @@ export class DespachoPage implements OnInit {
await this.processes.CompleteTask(body).toPromise()
this.httpErrorHandle.httpsSucessMessagge('Gerar Diploma')
this.TaskService.loadDespachos();
this.close();
// this.close();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error);
} finally {
@@ -496,9 +496,16 @@ export class DespachoPage implements OnInit {
},
translucent: true
});
return await popover.present().then(()=> {
this.TaskService.loadDespachos();
await popover.present();
popover.onDidDismiss().then((res)=> {
console.log('res', res.data)
if(res.data == 'back') {
this.goBack();
}
})
}