mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Improve event to approve
This commit is contained in:
@@ -191,7 +191,7 @@
|
||||
<div class="d-flex container-div width-100" >
|
||||
<ion-list class="width-100 ">
|
||||
<ion-item class="width-100" *ngFor="let document of loadedAttachments">
|
||||
<ion-label class="width-100 d-block list">
|
||||
<ion-label class="width-100 d-block list" *ngIf="document.action != 'delete' ">
|
||||
<p class="d-flex ion-justify-content-between">
|
||||
<span class="attach-title-item">{{document.SourceName}}</span>
|
||||
<span class="app-name" *ngIf="document.ApplicationId == 8"> Correspondencia </span>
|
||||
|
||||
@@ -220,11 +220,6 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
save() {
|
||||
|
||||
this.taskParticipantsCc.forEach(e => {
|
||||
e.is
|
||||
});
|
||||
|
||||
|
||||
this.taskParticipantsCc.forEach(e=>{
|
||||
e.IsRequired = false
|
||||
})
|
||||
@@ -252,6 +247,16 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
this.eventsService.postEventToApproveEdit(event).subscribe()
|
||||
|
||||
|
||||
this.loadedAttachments.forEach((document:any)=>{
|
||||
if(document['action'] == 'add'){
|
||||
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{});
|
||||
} else if(document['action'] == 'delete') {
|
||||
this.attachmentsService.deleteEventAttachmentById(document).subscribe( res=>{})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
alert('save')
|
||||
}
|
||||
|
||||
@@ -328,14 +333,9 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
console.log('this.loadedAttachments', this.loadedAttachments, result)
|
||||
}
|
||||
|
||||
deleteAttachment(attachmentID) {
|
||||
deleteAttachment(attachment: Attachment) {
|
||||
|
||||
const AttachmentToDelete = this.loadedAttachments.filter(e => e.Id == attachmentID)[0]
|
||||
|
||||
this.attachmentsService.deleteEventAttachmentById(attachmentID).subscribe(
|
||||
res=>{
|
||||
this.loadedAttachments = this.loadedAttachments.filter(e=> e.Id.toString() != attachmentID);
|
||||
})
|
||||
this.attachmentsService.deleteEventAttachmentById(attachment.Id).subscribe( res=>{})
|
||||
|
||||
}
|
||||
|
||||
@@ -378,7 +378,6 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
// await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{
|
||||
// this.getAttachments();
|
||||
// });
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user