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;
}