Improve Event to aprove

This commit is contained in:
Peter Maquiran
2021-05-14 11:05:46 +01:00
parent 5158478ea8
commit ca85464749
2 changed files with 16 additions and 13 deletions
+8 -7
View File
@@ -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;
}
@@ -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(()=>{