mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
improve
This commit is contained in:
@@ -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();
|
||||
},()=>{},
|
||||
|
||||
Reference in New Issue
Block a user