Imporve edit event to aprrove

This commit is contained in:
Peter Maquiran
2021-05-19 16:11:22 +01:00
parent 8316ab45ab
commit 35d2eb4580
2 changed files with 7 additions and 7 deletions
@@ -262,7 +262,7 @@ export class EditEventToApproveComponent implements OnInit {
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=>{})
}
})
@@ -345,9 +345,10 @@ export class EditEventToApproveComponent implements OnInit {
console.log('this.loadedAttachments', this.loadedAttachments, result)
}
deleteAttachment(attachment: Attachment) {
deleteAttachment(attachment: Attachment, index) {
attachment['action'] == 'delete'
console.log('index', index)
this.loadedAttachments[index]['action'] = 'delete'
}