mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Fixe merge and improve sucess message
This commit is contained in:
@@ -84,7 +84,7 @@ export class ApproveEventComponent implements OnInit {
|
||||
console.log(body);
|
||||
|
||||
try {
|
||||
this.processes.PostTaskAction(body).toPromise()
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.modalController.dismiss(serialNumber);
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
@@ -115,7 +115,7 @@ export class ApproveEventComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async rejectTask(serialNumber:string){
|
||||
async rejectTask(serialNumber:string) {
|
||||
|
||||
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||
console.log(body);
|
||||
@@ -167,11 +167,11 @@ export class ApproveEventComponent implements OnInit {
|
||||
},
|
||||
cssClass: 'emend-message-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
});-
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
modal.onDidDismiss().then( async (res) => {
|
||||
console.log(res.data);
|
||||
|
||||
if(res.data !== ''){
|
||||
@@ -182,9 +182,18 @@ export class ApproveEventComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
console.log(body);
|
||||
this.processes.PostTaskAction(body).toPromise()
|
||||
//this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.goToEventsToApprove();
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
//this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
this.goToEventsToApprove();
|
||||
this.successMessage()
|
||||
} catch (error) {
|
||||
this.badRequest()
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
//this.alertService.presentAlert('Operação cancelada!');
|
||||
|
||||
@@ -169,7 +169,7 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
if(this.profile=='mdgpr') {
|
||||
this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe(
|
||||
(id) => {
|
||||
async (id) => {
|
||||
|
||||
const eventId: string = id;
|
||||
|
||||
@@ -186,7 +186,7 @@ export class NewEventPage implements OnInit {
|
||||
};
|
||||
});
|
||||
|
||||
DocumentToSave.forEach((attachments, i) => {
|
||||
await DocumentToSave.forEach((attachments, i) => {
|
||||
this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) =>{
|
||||
|
||||
if(DocumentToSave.length == (i+1)){
|
||||
|
||||
Reference in New Issue
Block a user