Improve add task from event attachment

This commit is contained in:
Peter Maquiran
2021-04-27 09:56:14 +01:00
parent 983f5bf385
commit 12dff45a9c
3 changed files with 88 additions and 52 deletions
@@ -35,6 +35,7 @@ export class ViewEventPage implements OnInit {
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
documents: Attachment[] = [];
dicIndex = 0;
@Input() profile:string;
@Input() eventId: string;
@@ -68,6 +69,10 @@ export class ViewEventPage implements OnInit {
this.loadEvent();
}
docIndex(index: number) {
this.dicIndex = index;
}
close(){
console.log(this.isEventEdited);
@@ -135,19 +140,19 @@ export class ViewEventPage implements OnInit {
classs = 'modal modal-desktop showAsideOptions'
}
this.loadedAttachments.forEach((attachment)=>{
task = {
serialNumber: attachment.SourceId,
taskStartDate: attachment.CreateDate,
isEvent: true,
workflowInstanceDataFields: {
FsId: attachment.ApplicationId,
FolderID: null,
DocId: attachment.SourceId,
Subject: attachment.SourceName
},
}
});
const doc = this.loadedAttachments[ this.dicIndex];
task = {
serialNumber: doc.SourceId,
taskStartDate: doc.CreateDate,
isEvent: true,
workflowInstanceDataFields: {
FsId: doc.ApplicationId,
FolderID: null,
DocId: doc.SourceId,
Subject: doc.SourceName
},
}
const modal = await this.modalController.create({
component: ExpedientTaskModalPage,
@@ -171,22 +176,21 @@ export class ViewEventPage implements OnInit {
});
}
async openBookMeetingModal(task: any) {
this.loadedAttachments.forEach((attachment)=>{
task = {
serialNumber: attachment.SourceId,
taskStartDate: attachment.CreateDate,
isEvent: true,
workflowInstanceDataFields: {
FsId: attachment.ApplicationId,
FolderID: null,
DocId: attachment.SourceId,
Subject: attachment.SourceName
},
}
});
const doc = this.loadedAttachments[ this.dicIndex];
task = {
serialNumber: doc.SourceId,
taskStartDate: doc.CreateDate,
isEvent: true,
workflowInstanceDataFields: {
FsId: doc.ApplicationId,
FolderID: null,
DocId: doc.SourceId,
Subject: doc.SourceName
},
}
let classs;
if( window.innerWidth <= 800){