diff --git a/src/app/models/attachment.model.ts b/src/app/models/attachment.model.ts index 996164ee0..ac1f8ca87 100644 --- a/src/app/models/attachment.model.ts +++ b/src/app/models/attachment.model.ts @@ -3,13 +3,14 @@ export class Attachment { ParentId: string; Sources: Sources; Source?: Sources; - SourceId: string; - Description: string; - SourceName: string; - CreateDate: string; - Stakeholders: string; - Link: string; - ApplicationId?: string; + ApplicationId: number + CreateDate: string + Data: null| string + Description:string + Link: null + SourceId: string + SourceName: string + Stakeholders: string //Data: any; } diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts index 6211c102c..2102d225e 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts @@ -18,7 +18,8 @@ import { Event } from '../../../models/event.model'; export class EditEventToApproveComponent implements OnInit { serialNumber: string - loadedAttachments:any + loadedAttachments: Attachment[] + eventProcess = { taskStartDate: "", @@ -34,7 +35,7 @@ export class EditEventToApproveComponent implements OnInit { } } - show =false + show = false postEvent: Event; isRecurring:string; @@ -114,7 +115,8 @@ export class EditEventToApproveComponent implements OnInit { } this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => { - if(e.IsRequired){ + e.toAdd = false + if(e.IsRequired) { this.taskParticipants.push(e); } else { this.taskParticipantsCc.push(e); @@ -208,7 +210,7 @@ export class EditEventToApproveComponent implements OnInit { async getAttachments() { this.loadedAttachments = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise(); - console.log(this.loadedAttachments) + console.log('this.loadedAttachments', this.loadedAttachments) } deleteAttachment(attachmentID: string) { @@ -235,7 +237,6 @@ export class EditEventToApproveComponent implements OnInit { const data = res.data; - //data.selected const DocumentToSave = { SourceTitle: data.selected.Assunto, ParentId: this.InstanceId, @@ -244,7 +245,8 @@ export class EditEventToApproveComponent implements OnInit { ApplicationId: data.selected.ApplicationType.toString(), Id: '', Link: '', - SerialNumber: '' + SerialNumber: '', + toAdd: true }; await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{