mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Fix
This commit is contained in:
@@ -15,6 +15,7 @@ import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { EliminateEventPage } from 'src/app/modals/eliminate-event/eliminate-event.page';
|
||||
import { Location } from '@angular/common'
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -58,6 +59,7 @@ export class ViewEventPage implements OnInit {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
private toastService: ToastService,
|
||||
private location: Location
|
||||
)
|
||||
{
|
||||
this.isEventEdited = false;
|
||||
@@ -128,13 +130,17 @@ export class ViewEventPage implements OnInit {
|
||||
/* this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||
loader.remove()
|
||||
}, ()=>{
|
||||
}, (error)=>{
|
||||
|
||||
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']);
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('não é possível vizualizar este event no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
}
|
||||
|
||||
loader.remove()
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
this.location.back();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user