mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Imporve edit event to aprrove
This commit is contained in:
@@ -188,18 +188,17 @@
|
||||
</div>
|
||||
|
||||
<div class="d-flex container-div width-100" >
|
||||
<ion-list class="width-100 ">
|
||||
<ion-item class="width-100" *ngFor="let document of loadedAttachments">
|
||||
<ion-list class="width-100 ">
|
||||
<ion-item class="width-100" *ngFor="let document of loadedAttachments; let i = index">
|
||||
<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>
|
||||
<span class="app-name" *ngIf="document.ApplicationId == 386"> AccoesPresidenciais </span>
|
||||
<span class="app-name" *ngIf="document.ApplicationId == 361 "> ArquivoDespachoElect </span>
|
||||
<span class="close-button text-black cursor-pointer" (click)="deleteAttachment(document)" >
|
||||
<span class="close-button text-black cursor-pointer" (click)="deleteAttachment(document, i)" >
|
||||
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||
</span>
|
||||
|
||||
</p>
|
||||
<p><span class="span-left">{{document.Stakeholders}}</span><span class="span-right"> {{document.CreateDate | date: 'dd-MM-yy'}} </span></p>
|
||||
</ion-label>
|
||||
|
||||
@@ -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'
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user