This commit is contained in:
tiago.kayaya
2021-06-18 17:02:32 +01:00
parent 345a2cdbca
commit 203fadffe0
4 changed files with 95 additions and 18 deletions
@@ -115,9 +115,47 @@ export class ApproveEventPage implements OnInit {
}); */
}
emendTask(serialNumber:string){
this.openEmendMessageModal(serialNumber);
this.goBack();
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) => {
console.log(res.data);
if(res.data !== ''){
let body = { "serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
}
}
console.log(body);
try {
await this.processes.PostTaskAction(body).toPromise();
this.toastService.successMessage('Pedido enviado');
this.goBack();
} catch (error) {
this.toastService.badRequest();
}
}
else{
//this.alertService.presentAlert('Operação cancelada!');
}
});
//this.openEmendMessageModal(serialNumber);
//this.goBack();
}
async rejeitar(serialNumber:string){