Improve add event

This commit is contained in:
2021-02-24 20:34:17 +01:00
parent 388aa6d2d4
commit 7751d3ca06
2 changed files with 19 additions and 25 deletions
+4 -4
View File
@@ -634,6 +634,9 @@ export class AgendaPage implements OnInit {
}); });
await modal.present(); await modal.present();
modal.onDidDismiss().then((data) => { modal.onDidDismiss().then((data) => {
if(data){
}
this.openAddEventDismiss(data['data']) this.openAddEventDismiss(data['data'])
}); });
} else { } else {
@@ -642,9 +645,7 @@ export class AgendaPage implements OnInit {
} }
openAddEventDismiss(data){ openAddEventDismiss(data){
this.cloneAllmobileComponent();
if(data.type == 'save'){
let postEvent: Event = data; let postEvent: Event = data;
if (postEvent.Subject != null) if (postEvent.Subject != null)
{ {
@@ -659,9 +660,8 @@ export class AgendaPage implements OnInit {
this.myCal.loadEvents(); this.myCal.loadEvents();
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
} }
this.mobileComponent.showAddNewEvent = false;
}
this.cloneAllmobileComponent();
} }
async viewEventDetail(eventId:any) { async viewEventDetail(eventId:any) {
@@ -90,10 +90,7 @@ export class NewEventPage implements OnInit {
} }
} }
close(){ close(){
this.onAddEvent.emit({ this.onAddEvent.emit(false);
type:'close',
data: this.postEvent
});
} }
save(){ save(){
@@ -104,10 +101,7 @@ export class NewEventPage implements OnInit {
this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).subscribe(); this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).subscribe();
} }
this.onAddEvent.emit({ this.onAddEvent.emit(this.postEvent);
type:'save',
data: this.postEvent
});
} }
async openAttendees() async openAttendees()