mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add either pattern
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user