mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
monitoring notifications
This commit is contained in:
@@ -675,18 +675,14 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
|
||||
deleteAttachment(attachmentID: string, index) {
|
||||
console.log(this.loadedEventAttachments)
|
||||
const id: any = this.loadedEventAttachments[index].docId
|
||||
let update = this.removeItemById(this.loadedEventAttachments, id)
|
||||
this.loadedEventAttachments = update
|
||||
this.deletedAttachmentsList.push(id)
|
||||
const indexToRemove = index; // Assuming you already know the index you want to remove
|
||||
|
||||
/* if (id == 'add') {
|
||||
this.loadedEventAttachments = this.loadedEventAttachments.filter((e, i) => i != index)
|
||||
} else {
|
||||
this.loadedEventAttachments[index]['remove'] = true
|
||||
} */
|
||||
const DocumentId: any = this.loadedEventAttachments[index].Id
|
||||
if (indexToRemove > -1 && indexToRemove < this.loadedEventAttachments.length) {
|
||||
this.loadedEventAttachments.splice(indexToRemove, 1);
|
||||
}
|
||||
|
||||
this.deletedAttachmentsList.push(DocumentId)
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user