mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improve
This commit is contained in:
@@ -122,29 +122,29 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
} else {
|
||||
|
||||
const event = this.CalendarService.eventSource.find((ele) => ele.id == this.eventId)
|
||||
|
||||
this.eventsService.genericGetEvent(this.eventId, this.loadedEvent.CalendarId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
||||
}, (error)=> {
|
||||
|
||||
this.viewEventDetailDismiss.emit({
|
||||
type: 'close'
|
||||
})
|
||||
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('Não é possível visualizar este evento no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
if(event?.CalendarId) {
|
||||
|
||||
this.eventsService.genericGetEvent(this.eventId, event.CalendarId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
||||
}, (error)=> {
|
||||
|
||||
this.viewEventDetailDismiss.emit({
|
||||
type: 'close'
|
||||
})
|
||||
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('Não é possível visualizar este evento no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user