Improve edit event to approve

This commit is contained in:
Peter Maquiran
2021-05-19 11:36:21 +01:00
parent 371cedfd76
commit 5274695a43
3 changed files with 5 additions and 3 deletions
@@ -3,7 +3,7 @@
<div class="main-header">
<div class="title-content">
<div class="middle">
<ion-label class="title">Editar Evento agenda</ion-label>
<ion-label class="title">Editar Evento</ion-label>
</div>
</div>
</div>
@@ -14,7 +14,6 @@
</ion-header>
</div>
<ion-item-sliding class="overflow-y-auto">
{{ eventProcess.serialNumber }}
<div class="px-20">
<div class="ion-item-container width-100">
<ion-input placeholder="Assunto" [(ngModel)]="eventProcess.workflowInstanceDataFields.Subject"></ion-input>
@@ -19,7 +19,7 @@ import { Event, EventToApproveEdit } from '../../../models/event.model';
export class EditEventToApproveComponent implements OnInit {
serialNumber: string
loadedAttachments: Attachment[]
loadedAttachments: Attachment[]= []
eventProcess = {
@@ -258,8 +258,10 @@ export class EditEventToApproveComponent implements OnInit {
this.loadedAttachments.forEach((document:any)=>{
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=>{})
}
@@ -382,6 +384,7 @@ export class EditEventToApproveComponent implements OnInit {
this.loadedAttachments.push(DocumentToSave)
console.log('push', DocumentToSave)
// await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{
// this.getAttachments();