This commit is contained in:
Peter Maquiran
2021-08-25 13:04:15 +01:00
parent 3798d61632
commit 75a714a03a
8 changed files with 8 additions and 36 deletions
@@ -80,7 +80,7 @@
<div *ngIf="loadedAttachments" class="bottom-content width-100">
<h5>Documentos Anexados</h5>
<ion-list class="width-100">
<ion-item *ngFor="let attach of loadedAttachments; let i = index" class="width-100" class="ion-no-margin ion-no-padding">
<ion-item *ngFor="let attach of loadedEvent.Attachments; let i = index" class="width-100" class="ion-no-margin ion-no-padding">
<ion-label class="width-100 d-flex " >
<p class="flex-grow-1" (click)="viewDocument(attach.SourceId)">
<span class="attach-title-item d-block">{{attach.SourceName}}</span>
@@ -26,7 +26,6 @@ export class ViewEventPage implements OnInit {
isEventEdited: boolean;
eventBody: EventBody;
loadedAttachments:any;
loadedEventAttachments: Attachment[];
pageId: string;
showLoader: boolean;
@@ -91,7 +90,6 @@ export class ViewEventPage implements OnInit {
ngOnInit() {
this.loadEvent();
this.getAttachments();
window.onresize = (event) => {
@@ -183,7 +181,6 @@ export class ViewEventPage implements OnInit {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent()
this.getAttachments();
}, 250);
this.isEventEdited = true;
}
@@ -191,22 +188,6 @@ export class ViewEventPage implements OnInit {
}
getAttachments() {
const loader = this.toastService.loading()
try {
this.attachmentsService.getAttachmentsById(this.eventId).subscribe(res=>{
this.loadedAttachments = res;
console.log(res);
});
} catch (error) {
}
finally {
loader.remove()
}
}
async editEventDetail() {
@@ -227,7 +208,6 @@ export class ViewEventPage implements OnInit {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent()
this.getAttachments();
}, 250);
this.isEventEdited = true;
}
@@ -261,7 +241,6 @@ export class ViewEventPage implements OnInit {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent()
this.getAttachments();
}, 250);
this.isEventEdited = true;
}