Fixe duplicated attendess

This commit is contained in:
Peter Maquiran
2021-04-08 13:53:49 +01:00
9 changed files with 82 additions and 76 deletions
@@ -72,29 +72,36 @@ export class AttendeeModalPage implements OnInit {
filterSearchList(itm: EventPerson): boolean {
if(this.adding == "intervenient"){
const result = this.taskParticipants.find((contact, index)=>{
if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){
index = index;
return contact;
}
});
return undefined == result;
} else if (this.adding == "CC") {
const result = this.taskParticipantsCc.find((contact, index)=>{
const result1 = this.taskParticipants.find((contact, index)=>{
if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){
index = index;
return contact;
}
});
index = index;
return contact;
}
});
return undefined == result;
// if to show
if(undefined != result1){
return false;
}
const result2 = this.taskParticipantsCc.find((contact, index)=>{
if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){
index = index;
return contact;
}
});
// if to show
if(undefined != result2){
return false;
}
// don't show
return true;
}
remove(itm: EventPerson){