This commit is contained in:
Peter Maquiran
2022-06-14 14:34:54 +01:00
parent 21a76454a7
commit cb21f2a31c
3 changed files with 34 additions and 10 deletions
+1 -1
View File
@@ -701,7 +701,7 @@ export class SearchPage implements OnInit {
const modal = await this.modalCtrl.create({
component: ViewEventPage,
componentProps:{
componentProps: {
eventId: Id,
CalendarId: CalendarId,
isModal: true,
@@ -9,7 +9,7 @@
<ion-header>
<div class="title-content">
<div class="middle">
<ion-label class="title">Editar evento por aprovar </ion-label>
<ion-label class="title">Editar evento por aprovar</ion-label>
</div>
</div>
</ion-header>
@@ -372,6 +372,6 @@
<ion-footer class="background-whit">
<div class="buttons">
<button class="btn-cancel cursor-pointer" shape="round" (click)="close()">Cancelar</button>
<button class="btn-ok cursor-pointer" shape="round" (click)="save()">Gravar</button>
<button class="btn-ok cursor-pointer" shape="round" (click)="reenviar()">Gravar</button>
</div>
</ion-footer>
@@ -223,14 +223,12 @@ export class EditEventToApprovePage implements OnInit {
this.setIntervenientCC.emit([]);
this.clearContact.emit();
this.approveEventDismiss.emit({
"serialNumber": this.eventProcess.serialNumber,
"action": "Aprovar",
"saveData": this.eventProcess
serialNumber: this.eventProcess.serialNumber,
action: "Aprovar",
saveData: this.eventProcess
});
}
@@ -330,14 +328,14 @@ export class EditEventToApprovePage implements OnInit {
if(document['action'] == 'add') {
delete document.action
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
// this.toastService.successMessage();
}, error =>{
this.toastService.badRequest();
});
} else if(document['action'] == 'delete') {
delete document.action
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
// this.toastService.successMessage()
}, error =>{
this.toastService.badRequest()
})
@@ -347,6 +345,32 @@ export class EditEventToApprovePage implements OnInit {
}
async reenviar() {
let body = {
serialNumber: this.eventProcess.serialNumber,
action: "Reenviar",
dataFields: {
ReviewUserComment: "",
}
}
const loader = this.toastService.loading();
try {
await this.processes.PostTaskAction(body).toPromise();
this.toastService._successMessage();
this.goToApproveEventList();
} catch (error) {
this.toastService._badRequest();
} finally {
loader.remove()
}
}
goToApproveEventList() {
this.closeEventToApprove.emit();
this.modalController.dismiss();
}
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) {
this.taskParticipants = removeDuplicate(taskParticipants) ;