mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
fix atachments bug
This commit is contained in:
@@ -52,8 +52,8 @@
|
||||
<div class="line"></div>
|
||||
|
||||
<div *ngIf="loadedAttachments" class="bottom-content">
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-list>
|
||||
<h3>Documentos Anexados</h3>
|
||||
<ion-item lines="none" class="ion-no-margin ion-no-padding">
|
||||
<ion-label *ngFor="let attach of loadedAttachments"
|
||||
(click)="viewDocument(attach.SourceId)">
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user