diff --git a/src/app/shared/agenda/view-event/view-event.page.html b/src/app/shared/agenda/view-event/view-event.page.html
index e9faf0c36..e4349e261 100644
--- a/src/app/shared/agenda/view-event/view-event.page.html
+++ b/src/app/shared/agenda/view-event/view-event.page.html
@@ -52,8 +52,8 @@
+
Documentos Anexados
- Documentos Anexados
diff --git a/src/app/shared/agenda/view-event/view-event.page.ts b/src/app/shared/agenda/view-event/view-event.page.ts
index 5b5ff2375..42e1439ca 100644
--- a/src/app/shared/agenda/view-event/view-event.page.ts
+++ b/src/app/shared/agenda/view-event/view-event.page.ts
@@ -50,18 +50,19 @@ export class ViewEventPage implements OnInit {
this.loadedEvent = new Event();
this.eventBody = { BodyType : "1", Text : ""};
this.loadedEvent.Body = this.eventBody;
+
}
ngOnInit() {
+
/* console.log(this.eventId); */
this.loadEvent();
- this.getAttachments();
-
+ //this.getAttachments();
}
ngOnChanges(changes: any): void {
+ this.loadedAttachments = null;
this.loadEvent();
- this.getAttachments();
}
close(){
@@ -75,12 +76,11 @@ export class ViewEventPage implements OnInit {
loadEvent(){
this.eventsService.getEvent(this.eventId).subscribe(res => {
this.loadedEvent = res;
-
console.log(res);
-
this.today = new Date(res.StartDate);
console.log(new Date(this.today));
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
+ this.getAttachments(this.loadedEvent.EventId);
});
}
deleteEvent(){
@@ -97,8 +97,8 @@ export class ViewEventPage implements OnInit {
});
}
- getAttachments(){
- this.attachmentsService.getAttachmentsById(this.eventId).subscribe(res=>{
+ getAttachments(eventId){
+ this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
this.loadedAttachments = res;
console.log(res);
});