mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Add attendees
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { ModalController, NavController } from '@ionic/angular';
|
||||
import { AttendeeModalPage } from '../attendee-modal/attendee-modal.page';
|
||||
// import { AttendeeModalPage } from '../attendee-modal/attendee-modal.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-attendees',
|
||||
@@ -11,12 +11,18 @@ import { AttendeeModalPage } from '../attendee-modal/attendee-modal.page';
|
||||
})
|
||||
export class AttendeesPage implements OnInit {
|
||||
|
||||
eventAttendees: EventPerson[];
|
||||
|
||||
segment:string = "true";
|
||||
shouldShowCancel:boolean = true;
|
||||
|
||||
searchCountryString = ''; // initialize your searchCountryString string empty
|
||||
|
||||
@Output() openAttendeeModal = new EventEmitter<any>();
|
||||
@Output() openAddEvent = new EventEmitter<any>();
|
||||
@Input() eventAttendees: EventPerson[];
|
||||
@Output() GoBackEditOrAdd = new EventEmitter<any>();
|
||||
|
||||
|
||||
constructor(private eventService: EventsService, private modalCtrl: ModalController,
|
||||
private navCtrl: NavController) {
|
||||
}
|
||||
@@ -26,11 +32,15 @@ export class AttendeesPage implements OnInit {
|
||||
}
|
||||
|
||||
save(){
|
||||
this.GoBackEditOrAdd.emit();
|
||||
//this.openAddEvent.emit();
|
||||
this.modalCtrl.dismiss(this.eventAttendees);
|
||||
}
|
||||
|
||||
close(){
|
||||
this.GoBackEditOrAdd.emit();
|
||||
this.modalCtrl.dismiss(null);
|
||||
//this.openAddEvent.emit();
|
||||
}
|
||||
|
||||
removeAttendee(attendee: EventPerson)
|
||||
@@ -42,9 +52,12 @@ export class AttendeesPage implements OnInit {
|
||||
this.eventAttendees.splice(index, 1);
|
||||
}
|
||||
|
||||
async addAttendees()
|
||||
{
|
||||
const modal = await this.modalCtrl.create({
|
||||
async addAttendees() {
|
||||
|
||||
console.log('Event Intervenient');
|
||||
this.openAttendeeModal.emit();
|
||||
|
||||
/* const modal = await this.modalCtrl.create({
|
||||
component: AttendeeModalPage,
|
||||
componentProps: {
|
||||
eventPersons: this.eventAttendees
|
||||
@@ -73,7 +86,8 @@ export class AttendeesPage implements OnInit {
|
||||
this.eventAttendees.push(att);
|
||||
});
|
||||
}
|
||||
});
|
||||
}); */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user