add attendee component in gabinete digital

This commit is contained in:
Peter Maquiran
2021-03-30 15:38:57 +01:00
parent db001a9ae0
commit 133bfdfaf6
7 changed files with 52 additions and 23 deletions
@@ -22,6 +22,8 @@ export class AttendeeModalPage implements OnInit {
@Output() closeComponent = new EventEmitter<any>();
@Output() setContact = new EventEmitter<any>();
currentPath = window.location.pathname;
ngOnInit() {
this.fetchContacts("");
this.selectedContact = this.eventAttendees;
@@ -33,6 +35,12 @@ export class AttendeeModalPage implements OnInit {
this.closeComponent.emit();
}
setContactWithClose(){
if(this.currentPath == '/home/gabinete-digital'){
this.setContact.emit(this.selectedContact);
}
}
close(){
// this.modalCtrl.dismiss(null);
this.selectedContact = [];
@@ -66,13 +74,18 @@ export class AttendeeModalPage implements OnInit {
return false;
});
// run only in gabinete digital
this.setContactWithClose();
}
async selectContact(itm: EventPerson){
this.selectedContact.push(itm);
// run only in gabinete digital
this.setContactWithClose();
}
async fetchContacts(filter: string) {