This commit is contained in:
tiago.kayaya
2021-06-22 12:59:28 +01:00
parent 3c35ae0cab
commit 1888fea538
@@ -106,18 +106,7 @@ export class ApproveEventPage implements OnInit {
}); */
}
async emendTask(serialNumber:string){
/* console.log('Emendar'); */
this.menu.close();
try {
await this.openEmendMessageModal(serialNumber);
this.modalController.dismiss(null);
} catch (error) {
this.toastService.badRequest()
}
}
async rejectTask(serialNumber:string) {
@@ -163,18 +152,21 @@ export class ApproveEventPage implements OnInit {
this.menu.open();
}
async openEmendMessageModal(serialNumber:string) {
async emendTask(serialNumber:string){
console.log('Desktop');
const modal = await this.modalController.create({
component: EmendMessageModalPage,
componentProps:{
},
cssClass: 'emend-message-modal',
backdropDismiss: false
});-
});
await modal.present();
modal.onDidDismiss().then( async (res) => {
modal.onDidDismiss()
.then( async (res) => {
console.log(res.data);
if(res.data !== ''){
@@ -184,24 +176,23 @@ export class ApproveEventPage implements OnInit {
"ReviewUserComment": res.data,
}
}
console.log(body);
try {
await this.processes.PostTaskAction(body).toPromise()
//this.router.navigate(['/home/gabinete-digital/event-list']);
this.goToEventsToApprove();
this.toastService.successMessage()
} catch (error) {
this.toastService.badRequest()
}
console.log(body);
try {
await this.processes.PostTaskAction(body).toPromise();
this.toastService.successMessage('Pedido enviado');
this.close();
} catch (error) {
this.toastService.badRequest();
}
}
else{
//this.alertService.presentAlert('Operação cancelada!');
}
});
//this.openEmendMessageModal(serialNumber);
//this.goBack();
}
goToEventsToApprove(){