This commit is contained in:
tiago.kayaya
2021-07-08 21:31:14 +01:00
parent 88bdab5d65
commit b140873df9
11 changed files with 191 additions and 38 deletions
@@ -14,6 +14,7 @@ import { AttendeesPageModal } from '../../events/attendees/attendees.page';
import { SearchPage } from '../../search/search.page';
import { ThemePalette } from '@angular/material/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { EventRecurrence } from 'src/app/models/agenda/eventrecurrence.model';
@Component({
@@ -47,6 +48,8 @@ export class NewEventPage implements OnInit {
eventAttendees: EventPerson[];
selectedSegment: string;
selectedDate: Date;
recurringTypes: any;
selectedRecurringType: any;
adding: "intervenient" | "CC";
@@ -77,6 +80,8 @@ export class NewEventPage implements OnInit {
}
ngOnInit() {
this.selectedRecurringType = "-1";
this.getRecurrenceTypes();
/* console.log(this.profile); */
@@ -142,6 +147,25 @@ export class NewEventPage implements OnInit {
close(){
this.modalController.dismiss();
}
getRecurrenceTypes() {
this.eventService.getRecurrenceTypes().subscribe(res=>{
console.log(res);
this.recurringTypes = res;
});
}
onSelectedRecurringChanged(ev:any){
console.log(ev);
if(ev.length > 1){
console.log(ev.filter(data => data != '-1'));
this.selectedRecurringType = ev.filter(data => data != '-1');
}
if(ev.length == 0){
this.selectedRecurringType = "-1";
}
}
runValidation() {