This commit is contained in:
Peter Maquiran
2023-06-09 15:29:03 +01:00
parent 7f3cfdc55e
commit 2f38104155
12 changed files with 56 additions and 31 deletions
@@ -20,7 +20,7 @@ import { Storage } from '@ionic/storage';
import { SessionStore } from 'src/app/store/session.service';
import { CalendarService } from 'src/app/store/calendar.service';
import { HttpErrorHandle} from 'src/app/services/http-error-handle.service'
import { AttachmentsService } from 'src/app/services/attachments.service';
@Component({
selector: 'app-view-event',
@@ -73,7 +73,8 @@ export class ViewEventPage implements OnInit {
private RouteService: RouteService,
private ionicStorage: Storage,
private CalendarService: CalendarService,
private httpErrorHandle: HttpErrorHandle
private httpErrorHandle: HttpErrorHandle,
private attachmentsService: AttachmentsService,
) {
@@ -394,6 +395,7 @@ export class ViewEventPage implements OnInit {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent()
this.getAttachments()
}, 250);
this.isEventEdited = true;
}
@@ -404,6 +406,18 @@ export class ViewEventPage implements OnInit {
this.dicIndex = index
}
getAttachments() {
if(this.loadedEvent.HasAttachments) {
this.attachmentsService.getAttachmentsById(this.loadedEvent.EventId).subscribe(res=>{
this.loadedEvent.Attachments = res;
},((erro) => {
console.error('editgetAttchament', erro)
}));
}
}
async LoadDocumentDetails() {
const docId = this.loadedEvent.Attachments[this.dicIndex].SourceId