mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Fixe merge and improve sucess message
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user