ordenation

This commit is contained in:
Peter Maquiran
2023-01-19 11:30:12 +01:00
parent 7851c5a78e
commit 4e8a31b6b9
7 changed files with 45 additions and 25 deletions
@@ -81,9 +81,9 @@ export class AttendeesPageModal implements OnInit {
}
remove(itm: EventPerson){
remove(itm: EventPerson) {
if(this.adding == "intervenient"){
if(this.adding == "intervenient") {
this.taskParticipants = this.taskParticipants.filter((contact, index) =>{
@@ -135,10 +135,23 @@ export class AttendeesPageModal implements OnInit {
});
}
this.contacts = result;
this.contacts = this.sort(result as any);
this.showLoader = false;
}
);
}
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()
}
}