mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +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']);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ export class ViewEventPage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
loadEvent(){
|
||||
loadEvent() {
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.today = new Date(res.StartDate);
|
||||
@@ -99,6 +99,8 @@ export class ViewEventPage implements OnInit {
|
||||
this.viewEventDetailDismiss.emit({
|
||||
type: 'close'
|
||||
})
|
||||
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
})
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user