diff --git a/src/app/pages/publications/publications.page.html b/src/app/pages/publications/publications.page.html index 0136d4e90..8e58da4a8 100644 --- a/src/app/pages/publications/publications.page.html +++ b/src/app/pages/publications/publications.page.html @@ -37,7 +37,7 @@ - + diff --git a/src/app/shared/event/attendee-modal/attendee-modal.page.ts b/src/app/shared/event/attendee-modal/attendee-modal.page.ts index e9aeba0cf..2300a42a7 100644 --- a/src/app/shared/event/attendee-modal/attendee-modal.page.ts +++ b/src/app/shared/event/attendee-modal/attendee-modal.page.ts @@ -16,6 +16,7 @@ export class AttendeePage implements OnInit { contacts: EventPerson[]; showLoader: boolean = false; eventPersons: EventPerson[]; + inputFilter = '' @Output() closeComponent = new EventEmitter(); @@ -39,10 +40,10 @@ export class AttendeePage implements OnInit { public ThemeService: ThemeService ) { this.LtaskParticipants = removeDuplicate(this.taskParticipants); - this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc); - } + this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc); + } - ngOnChanges(){ + ngOnChanges() { this.LtaskParticipants = removeDuplicate(this.taskParticipants); this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc); } @@ -63,7 +64,6 @@ export class AttendeePage implements OnInit { } } - save() { @@ -107,7 +107,7 @@ export class AttendeePage implements OnInit { this.setContactWithClose(); } - close(){ + close() { this.closeComponent.emit(); } @@ -140,7 +140,7 @@ export class AttendeePage implements OnInit { }); // if to show - if(undefined != result2){ + if(undefined != result2) { return false; } @@ -149,7 +149,7 @@ export class AttendeePage implements OnInit { } - remove(itm: EventPerson){ + remove(itm: EventPerson) { if(this.adding == "intervenient"){ @@ -178,7 +178,17 @@ export class AttendeePage implements OnInit { } - + sort(data: []) { + return data.sort(function (a: any, b: any) { + if (a.Name > b.Name) { + return -1; + } + if (b.Name > a.Name) { + return 1; + } + return 0; + }).reverse() + } async fetchContacts(filter: string) { this.showLoader = true; @@ -196,7 +206,7 @@ export class AttendeePage implements OnInit { }); } - this.contacts = result; + this.contacts = this.sort(result as any); this.showLoader = false; } );