Add component in aganda

This commit is contained in:
Peter Maquiran
2021-03-24 15:10:46 +01:00
parent f5ec384100
commit 35102b380d
15 changed files with 266 additions and 58 deletions
@@ -23,12 +23,12 @@ export class NewEventPage implements OnInit {
@Input() selectedDate: Date;
@Output() onAddEvent = new EventEmitter<any>();
@Output() openAttendeesComponent = new EventEmitter<any>();
minDate: string;
constructor(
private modalController: ModalController,
//private navParams: NavParams,
private eventService: EventsService,
) {
this.postEvent = new Event();
@@ -104,26 +104,10 @@ export class NewEventPage implements OnInit {
this.onAddEvent.emit(this.postEvent);
}
async openAttendees()
async openAttendees(data: any)
{
const modal = await this.modalController.create({
component: AttendeesPage,
componentProps: {
eventAttendees: this.postEvent.Attendees
},
cssClass: 'attendee',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((data) => {
if (data['data'] != null)
{
let newattendees: EventPerson[] = data['data'];
this.postEvent.Attendees = newattendees;
}
});
}
this.openAttendeesComponent.emit();
}
}