mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
fix issues
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user