Fixe merge and improve sucess message

This commit is contained in:
Peter Maquiran
2021-05-28 15:45:41 +01:00
21 changed files with 322 additions and 87 deletions
@@ -117,7 +117,7 @@ export class OptsExpedientePrPage implements OnInit {
}
try {
await this.processes.CompleteTask(body);
await this.processes.CompleteTask(body).toPromise()
this.close();
this.successMessage()
} catch(error) {
@@ -139,11 +139,20 @@ export class OptsExpedientePrPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then(res=>{
modal.onDidDismiss().then( async (res)=>{
console.log(res['data']);
if(res['data']== 'Yes'){
this.processes.CompleteTask(body);
this.goBack();
try {
await this.processes.CompleteTask(body).toPromise()
this.successMessage()
this.goBack();
} catch (error) {
this.badRequest()
}
}
else if(res['data'] == 'No'){
let otherbody = {
@@ -154,7 +163,15 @@ export class OptsExpedientePrPage implements OnInit {
"Note": "",
}
}
this.processes.CompleteTask(otherbody);
try {
await this.processes.CompleteTask(otherbody).toPromise()
this.successMessage()
} catch (error) {
this.badRequest()
}
}
//Volta na lista principal
this.goBack();