mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Remove case sensitive
This commit is contained in:
@@ -3,6 +3,7 @@ import { ModalController } from '@ionic/angular';
|
||||
import { ContactsService } from 'src/app/services/contacts.service';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { slugify } from 'src/plugin/javascript-remove-accents.js';
|
||||
|
||||
@Component({
|
||||
selector: 'app-attendee-modal',
|
||||
@@ -119,7 +120,7 @@ export class AttendeePage implements OnInit {
|
||||
|
||||
const result = this.LtaskParticipants.concat(this.LtaskParticipantsCc).find((contact, index)=>{
|
||||
|
||||
if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){
|
||||
if(contact.Name.toLowerCase() == itm.Name.toLowerCase() && contact.EmailAddress.toLowerCase() == itm.EmailAddress.toLowerCase()){
|
||||
index = index;
|
||||
return contact;
|
||||
}
|
||||
@@ -133,7 +134,7 @@ export class AttendeePage implements OnInit {
|
||||
|
||||
const result2 = this.LtaskParticipantsCc.find((contact, index)=>{
|
||||
|
||||
if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){
|
||||
if(contact.Name.toLowerCase() == itm.Name && contact.EmailAddress.toLowerCase() == itm.EmailAddress.toLowerCase()){
|
||||
index = index;
|
||||
return contact;
|
||||
}
|
||||
@@ -155,7 +156,7 @@ export class AttendeePage implements OnInit {
|
||||
|
||||
this.LtaskParticipants = this.LtaskParticipants.filter((contact, index) =>{
|
||||
|
||||
if(contact.Name != itm.Name && contact.EmailAddress != itm.EmailAddress){
|
||||
if(contact.Name.toLocaleLowerCase() != itm.Name.toLocaleLowerCase() && contact.EmailAddress.toLocaleLowerCase() != itm.EmailAddress.toLocaleLowerCase()){
|
||||
return contact;
|
||||
}
|
||||
return false;
|
||||
@@ -166,7 +167,7 @@ export class AttendeePage implements OnInit {
|
||||
|
||||
this.LtaskParticipantsCc = this.LtaskParticipantsCc.filter((contact, index) =>{
|
||||
|
||||
if(contact.Name != itm.Name && contact.EmailAddress != itm.EmailAddress){
|
||||
if(contact.Name.toLocaleLowerCase() != itm.Name.toLocaleLowerCase() && contact.EmailAddress.toLocaleLowerCase() != itm.EmailAddress.toLocaleLowerCase()){
|
||||
return contact;
|
||||
}
|
||||
return false;
|
||||
@@ -189,7 +190,7 @@ export class AttendeePage implements OnInit {
|
||||
{
|
||||
this.eventPersons.forEach(attendee => {
|
||||
const index: number = result.findIndex((cont) => {
|
||||
return cont.EmailAddress == attendee.EmailAddress
|
||||
return cont.EmailAddress.toLowerCase() == attendee.EmailAddress.toLowerCase()
|
||||
});
|
||||
|
||||
result.splice(index, 1);
|
||||
|
||||
Reference in New Issue
Block a user