change events agenda

This commit is contained in:
tiago.kayaya
2021-06-29 10:50:05 +01:00
parent 46e6e3fe88
commit a5be718a14
5 changed files with 57 additions and 37 deletions
@@ -35,6 +35,7 @@ export class ViewEventPage implements OnInit {
profile:string;
eventId:string;
caller:string;
customDate:any;
today:any;
@@ -62,8 +63,12 @@ export class ViewEventPage implements OnInit {
this.eventBody = { BodyType : "1", Text : ""};
this.loadedEvent.Body = this.eventBody;
this.activatedRoute.paramMap.subscribe(paramMap =>{
this.eventId = paramMap['params'].eventId;
this.activatedRoute.paramMap.subscribe(params =>{
this.eventId = params['params'].eventId;
if(params["params"].caller){
this.caller = (params["params"].caller);
}
});
/* this.activatedRoute.queryParams.subscribe(params => {
@@ -76,7 +81,6 @@ export class ViewEventPage implements OnInit {
}
ngOnInit() {
console.log('Notifi teste '+this.eventId);
this.loadEvent();
this.getAttachments();
@@ -136,8 +140,8 @@ export class ViewEventPage implements OnInit {
setTimeout(()=>{
alert.dismiss();
}, 1500);
this.goBack();
this.toastService.successMessage('Evento apagado');
this.close();
});
}
@@ -154,11 +158,14 @@ export class ViewEventPage implements OnInit {
async editEventDetail() {
console.log(this.caller);
const modal = await this.modalController.create({
component: EditEventPage,
componentProps: {
eventId: this.loadedEvent.EventId,
profile: this.profile,
caller: this.caller,
},
cssClass: 'modal modal-desktop',
@@ -192,7 +199,7 @@ export class ViewEventPage implements OnInit {
component: EditEventPage,
componentProps:{
event: this.loadedEvent,
profile: this.profile,
caller: this.caller,
},
cssClass: classs,
});