This commit is contained in:
Peter Maquiran
2021-03-25 15:18:12 +01:00
parent f072ff46f6
commit e0d4c595fe
6 changed files with 69 additions and 31 deletions
@@ -29,6 +29,7 @@
Campo obrigatório
</span> -->
</div>
<div class="container-div">
@@ -134,7 +135,7 @@
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
</div>
<div (click)="openAttendees()" class="ion-input-class d-flex flex-grow-1 width-100 overflow-hidden">
<div (click)="openAttendees()" class="ion-input-class d-flex flex-grow-1 width-100 overflow-hidden ">
<div class="list-people flex-grow-1">
<ion-item lines="none">
<ion-list>
@@ -32,7 +32,8 @@ export class EditEventComponent implements OnInit {
@Output() cloneAllmobileComponent = new EventEmitter<any>();
@Output() openAttendeesComponent = new EventEmitter<any>();
@Output() setContact = new EventEmitter<any>();
constructor(
private modalController: ModalController,
@@ -76,24 +77,10 @@ export class EditEventComponent implements OnInit {
async openAttendees()
{
const modal = await this.modalController.create({
component: AttendeesPage,
componentProps: {
eventAttendees: this.postEvent.Attendees
},
cssClass: 'attendee',
backdropDismiss: false
});
await modal.present();
this.openAttendeesComponent.emit();
modal.onDidDismiss().then((data) => {
if (data['data'] != null)
{
let newattendees: EventPerson[] = data['data'];
this.postEvent.Attendees = newattendees;
}
});
this.clearContact.emit();
}
}
@@ -24,6 +24,7 @@ export class NewEventPage implements OnInit {
@Output() onAddEvent = new EventEmitter<any>();
@Output() openAttendeesComponent = new EventEmitter<any>();
@Output() clearContact = new EventEmitter<any>();
@Output() GoBackEditOrAdd = new EventEmitter<any>();
minDate: string;
@@ -90,7 +91,7 @@ export class NewEventPage implements OnInit {
}
}
close(){
this.onAddEvent.emit(false);
this.GoBackEditOrAdd.emit();
this.clearContact.emit();
}
save(){
@@ -104,7 +105,7 @@ export class NewEventPage implements OnInit {
this.onAddEvent.emit(this.postEvent);
this.clearContact.emit();
this.GoBackEditOrAdd.emit();
}
async openAttendees(data: any)
@@ -20,6 +20,7 @@ export class AttendeesPage implements OnInit {
@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,
@@ -31,13 +32,15 @@ export class AttendeesPage implements OnInit {
}
save(){
this.openAddEvent.emit();
this.GoBackEditOrAdd.emit();
//this.openAddEvent.emit();
// this.modalCtrl.dismiss(this.eventAttendees);
}
close(){
this.GoBackEditOrAdd.emit();
// this.modalCtrl.dismiss(null);
this.openAddEvent.emit();
//this.openAddEvent.emit();
}
removeAttendee(attendee: EventPerson)