This commit is contained in:
Peter Maquiran
2022-05-27 13:36:37 +01:00
parent 304975d823
commit ce7cee0876
25 changed files with 131 additions and 234 deletions
@@ -45,6 +45,7 @@ export class ViewEventPage implements OnInit {
@Input() profile:string;
@Input() eventId: string;
@Input() CalendarId: string;
@Output() viewEventDetailDismiss = new EventEmitter<any>();
sesseionStora = SessionStore
@@ -121,12 +122,12 @@ export class ViewEventPage implements OnInit {
});
} else {
const event = this.CalendarService.eventSource.find((ele) => ele.id == this.eventId)
if(event?.CalendarId) {
if(this.CalendarId) {
this.eventsService.genericGetEvent(this.eventId, event.CalendarId).subscribe(res => {
this.eventsService.genericGetEvent(this.eventId, this.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()]);
@@ -162,10 +163,10 @@ export class ViewEventPage implements OnInit {
});
} else {
const event = this.CalendarService.eventSource.find((ele) => ele.id == this.eventId)
if(event?.CalendarId) {
this.eventsService.genericDeleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName, event?.CalendarId).subscribe(async () => {
if(this.CalendarId) {
this.eventsService.genericDeleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName, this.CalendarId).subscribe(async () => {
this.toastService.successMessage('Evento apagado');
this.close();
},()=>{},
@@ -189,7 +190,7 @@ export class ViewEventPage implements OnInit {
loader.remove();
});
} else {
this.eventsService.genericDeleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName, this.loadedEvent.CalendarId).subscribe(async () => {
this.eventsService.genericDeleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName, this.CalendarId).subscribe(async () => {
this.toastService.successMessage('Evento apagado');
this.close();
},()=>{},