fix issues

This commit is contained in:
Peter Maquiran
2024-03-02 12:21:00 +01:00
parent e0c75e6d87
commit b1bf06b19e
23 changed files with 131 additions and 34 deletions
@@ -247,6 +247,37 @@ export class ViewEventPage implements OnInit {
}
loadEvent1() {
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
this.eventsService.getEvent(this.eventId).subscribe(res => {
res = this.dateService.fixDate(res as any)
this.loadedEvent = res;
this.setTimeZone()
// this.addEventToDb(res);
}, (error) => {
});
} else {
if(this.CalendarId) {
this.eventsService.genericGetEvent(this.eventId, this.CalendarId).subscribe(res => {
res = this.dateService.fixDate(res as any)
this.loadedEvent = res;
this.setTimeZone()
}, (error) => {
});
}
}
}
deleteYesOrNo() {
this.alertController.create({
header: 'Eliminar evento?',
@@ -364,14 +395,13 @@ export class ViewEventPage implements OnInit {
await modal.present();
modal.onDidDismiss().then((res) => {
if (res) {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent()
this.loadEvent1()
}, 250);
this.isEventEdited = true;
console.log('res', res)
console.log('res', res, res.data?.action, 'cancel')
}
});
@@ -399,7 +429,20 @@ export class ViewEventPage implements OnInit {
modal.onDidDismiss().then((res) => {
if (res) {
if (res.data?.action == 'cancel') {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent1()
}, 250);
this.isEventEdited = true;
if(res.data.Attendees?.length >= 1) {
this.loadedEvent.HasAttachments = true
this.getAttachments()
}
console.log('res', res)
} else {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent()