add either pattern

This commit is contained in:
Peter Maquiran
2024-05-30 12:03:30 +01:00
parent 3c4ec1a432
commit 746db6f583
9 changed files with 410 additions and 85 deletions
@@ -127,22 +127,17 @@ export class ViewEventPage implements OnInit {
}
async loadEvent() {
try {
let res = await this.agendaDataRepository.getEventById(this.eventId)
let res = await this.agendaDataRepository.getEventById(this.eventId).toPromise()
console.log('Loaded Event', res)
res = this.dateService.fixDate(res as any)
this.loadedEvent = res as any;
this.setTimeZone()
// this.addEventToDb(res);
} catch (error) {
if(res.isOk()) {
console.log('Loaded Event', res.value)
let changeDate = this.dateService.fixDate(res.value as any) as any
this.loadedEvent = changeDate as any;
this.setTimeZone()
} else {
this.viewEventDetailDismiss.emit({
type: 'close'
})
// this.httpErrorHandle.httpStatusHandle(error)
}
}