mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Add find or return
This commit is contained in:
@@ -109,16 +109,20 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
loadEvent(){
|
||||
loadEvent() {
|
||||
const loader = this.toastService.loading();
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
|
||||
console.log(res);
|
||||
|
||||
/* this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||
loader.remove()
|
||||
}, ()=>{
|
||||
|
||||
loader.remove()
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
this.router.navigate(['/home/agenda']);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user