mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improve
This commit is contained in:
@@ -671,7 +671,6 @@ export class AgendaPage implements OnInit {
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -681,9 +680,6 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
|
||||
|
||||
alert('MDGPR')
|
||||
|
||||
this.eventService.getAllMdEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then((response: any) => {
|
||||
|
||||
this.addEventToDB(response, "md");
|
||||
|
||||
@@ -206,8 +206,9 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
const event = this.CalendarService.eventSource.find((ele) => ele.id == this.eventId)
|
||||
|
||||
// console.log('View event details', event)
|
||||
|
||||
if(event?.CalendarId) {
|
||||
|
||||
this.eventsService.genericGetEvent(this.eventId, event.CalendarId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
this.addEventToDb(res);
|
||||
@@ -260,25 +261,26 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
alert('generic delete')
|
||||
|
||||
this.eventsService.genericDeleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName, this.loadedEvent.CalendarId).subscribe(async () => {
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
header: 'Evento removido',
|
||||
buttons: ['OK']
|
||||
});
|
||||
this.eventsService.genericDeleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName, this.loadedEvent.CalendarId).subscribe(async () => {
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
header: 'Evento removido',
|
||||
buttons: ['OK']
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
alert.dismiss();
|
||||
}, 1500);
|
||||
this.goBack();
|
||||
this.toastService.successMessage('Evento apagado');
|
||||
}, () => { },
|
||||
() => {
|
||||
loader.remove();
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
alert.dismiss();
|
||||
}, 1500);
|
||||
this.goBack();
|
||||
this.toastService.successMessage('Evento apagado');
|
||||
}, () => { },
|
||||
() => {
|
||||
loader.remove();
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user