diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html
index 006791024..c2f48c252 100644
--- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html
+++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html
@@ -188,18 +188,17 @@
-
-
+
+
{{document.SourceName}}
Correspondencia
AccoesPresidenciais
ArquivoDespachoElect
-
+
-
{{document.Stakeholders}} {{document.CreateDate | date: 'dd-MM-yy'}}
diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts
index af8c6f3f6..75dee98cb 100644
--- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts
+++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts
@@ -257,17 +257,19 @@ export class EditEventToApproveComponent implements OnInit {
this.loadedAttachments.forEach((document:any)=>{
- if(document['action'] == 'add'){
+ if(document['action'] == 'add') {
delete document.action
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{});
} else if(document['action'] == 'delete') {
delete document.action
- this.attachmentsService.deleteEventAttachmentById(document).subscribe( res=>{})
+ this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{})
}
})
-
- alert('save')
+
+
+ this.modalController.dismiss();
+
}
async openAttendees() {
@@ -343,9 +345,10 @@ export class EditEventToApproveComponent implements OnInit {
console.log('this.loadedAttachments', this.loadedAttachments, result)
}
- deleteAttachment(attachment: Attachment) {
+ deleteAttachment(attachment: Attachment, index) {
- this.attachmentsService.deleteEventAttachmentById(attachment.Id).subscribe( res=>{})
+ console.log('index', index)
+ this.loadedAttachments[index]['action'] = 'delete'
}