This commit is contained in:
Peter Maquiran
2022-05-30 16:43:54 +01:00
parent 8f11b87457
commit 7430bf7fe1
2 changed files with 16 additions and 11 deletions
@@ -131,7 +131,7 @@ export class NewEventPage implements OnInit {
this.getRecurrenceTypes();
if(this.selectedSegment != "Combinada"){
this.postEvent ={
this.postEvent = {
EventId: '',
Subject: '',
Body: this.eventBody,
@@ -153,7 +153,7 @@ export class NewEventPage implements OnInit {
};
}
else{
this.postEvent ={
this.postEvent = {
EventId: '',
Subject: '',
Body: this.eventBody,
@@ -176,7 +176,6 @@ export class NewEventPage implements OnInit {
}
window.onresize = (event) => {
// if not mobile remove all component
if( window.innerWidth >= 1024){
this.modalController.dismiss();
}
@@ -187,25 +186,25 @@ export class NewEventPage implements OnInit {
}
close(){
close() {
this.modalController.dismiss();
}
getRecurrenceTypes() {
this.eventService.getRecurrenceTypes().subscribe(res=>{
this.eventService.getRecurrenceTypes().subscribe( res => {
this.recurringTypes = res;
});
}
onSelectedRecurringChanged(ev:any){
onSelectedRecurringChanged(ev:any) {
if(ev.length > 1){
if(ev.length > 1) {
this.selectedRecurringType = ev.filter(data => data != '-1');
}
if(ev.length == 0){
if(ev.length == 0) {
this.selectedRecurringType = "-1";
}
}
@@ -286,7 +285,7 @@ export class NewEventPage implements OnInit {
if(this.documents.length >= 0) {
this.postEvent.HasAttachments = true;
}
if(this.selectedRecurringType != '-1'){
if(this.selectedRecurringType != '-1') {
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
}
@@ -152,7 +152,11 @@ export class NewEventPage implements OnInit {
ngOnInit() {
this.CalendarName = this.loggeduser.Profile;
if(!this.CalendarName) {
this.CalendarName = this.loggeduser.Profile;
}
this.getRecurrenceTypes();
if(!this.restoreTemporaryData()){
@@ -574,7 +578,8 @@ export class NewEventPage implements OnInit {
window['temp.path:/home/agenda/new-event.component.ts'] = {
postEvent: this.postEvent,
eventBody: this.eventBody,
segment: this.segment
segment: this.segment,
CalendarName: this.CalendarName
}
}
@@ -591,6 +596,7 @@ export class NewEventPage implements OnInit {
this.postEvent = restoredData.postEvent
this.eventBody = restoredData.eventBody
this.segment = restoredData.segment
this.CalendarName = restoredData.CalendarName
// restore dater for date and hours picker