mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
+6
-8
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user