mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix atachments bug
This commit is contained in:
@@ -52,8 +52,8 @@
|
|||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
|
|
||||||
<div *ngIf="loadedAttachments" class="bottom-content">
|
<div *ngIf="loadedAttachments" class="bottom-content">
|
||||||
|
<h5>Documentos Anexados</h5>
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<h3>Documentos Anexados</h3>
|
|
||||||
<ion-item lines="none" class="ion-no-margin ion-no-padding">
|
<ion-item lines="none" class="ion-no-margin ion-no-padding">
|
||||||
<ion-label *ngFor="let attach of loadedAttachments"
|
<ion-label *ngFor="let attach of loadedAttachments"
|
||||||
(click)="viewDocument(attach.SourceId)">
|
(click)="viewDocument(attach.SourceId)">
|
||||||
|
|||||||
@@ -50,18 +50,19 @@ export class ViewEventPage implements OnInit {
|
|||||||
this.loadedEvent = new Event();
|
this.loadedEvent = new Event();
|
||||||
this.eventBody = { BodyType : "1", Text : ""};
|
this.eventBody = { BodyType : "1", Text : ""};
|
||||||
this.loadedEvent.Body = this.eventBody;
|
this.loadedEvent.Body = this.eventBody;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
/* console.log(this.eventId); */
|
/* console.log(this.eventId); */
|
||||||
this.loadEvent();
|
this.loadEvent();
|
||||||
this.getAttachments();
|
//this.getAttachments();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: any): void {
|
ngOnChanges(changes: any): void {
|
||||||
|
this.loadedAttachments = null;
|
||||||
this.loadEvent();
|
this.loadEvent();
|
||||||
this.getAttachments();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
close(){
|
close(){
|
||||||
@@ -75,12 +76,11 @@ export class ViewEventPage implements OnInit {
|
|||||||
loadEvent(){
|
loadEvent(){
|
||||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||||
this.loadedEvent = res;
|
this.loadedEvent = res;
|
||||||
|
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
|
||||||
this.today = new Date(res.StartDate);
|
this.today = new Date(res.StartDate);
|
||||||
console.log(new Date(this.today));
|
console.log(new Date(this.today));
|
||||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
||||||
|
this.getAttachments(this.loadedEvent.EventId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
deleteEvent(){
|
deleteEvent(){
|
||||||
@@ -97,8 +97,8 @@ export class ViewEventPage implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getAttachments(){
|
getAttachments(eventId){
|
||||||
this.attachmentsService.getAttachmentsById(this.eventId).subscribe(res=>{
|
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
|
||||||
this.loadedAttachments = res;
|
this.loadedAttachments = res;
|
||||||
console.log(res);
|
console.log(res);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user