mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
fix
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
<ion-virtual-scroll [items]="users | filter:textSearch: 'name'" approxItemHeight="70px" [headerFn]="separateLetter">
|
||||
<ion-virtual-scroll [items]="users" approxItemHeight="70px" [headerFn]="separateLetter">
|
||||
|
||||
<div class="item-divider" *virtualHeader="let header">
|
||||
<ion-label>{{header}}</ion-label>
|
||||
|
||||
@@ -66,7 +66,7 @@ export class GroupContactsPage implements OnInit {
|
||||
headers: this.headers,
|
||||
};
|
||||
this.chatService.getAllUsers().subscribe((res:any)=>{
|
||||
if(this.members){
|
||||
if(this.members) {
|
||||
this.contacts = res.users.filter(f => !this.members.some(item => item._id === f._id));
|
||||
}
|
||||
else{
|
||||
@@ -149,6 +149,18 @@ export class GroupContactsPage implements OnInit {
|
||||
|
||||
onChange(event){
|
||||
this.textSearch = event.detail.value;
|
||||
|
||||
this.users = this.contacts.filter( e => e.name.toLowerCase().includes(this.textSearch.toLowerCase())).sort((a,b) => {
|
||||
if(a.name < b.name){
|
||||
return -1;
|
||||
}
|
||||
if(a.name > b.name){
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
clicked(){
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
<ion-virtual-scroll [items]="ChatSystemService.users | filter:textSearch: 'name'" approxItemHeight="70px" [headerFn]="separateLetter">
|
||||
<ion-virtual-scroll [items]="users " approxItemHeight="70px" [headerFn]="separateLetter">
|
||||
|
||||
<div class="item-divider" *virtualHeader="let header">
|
||||
<ion-label>{{header}}</ion-label>
|
||||
|
||||
@@ -237,6 +237,18 @@ export class GroupContactsPage implements OnInit {
|
||||
|
||||
onChange(event){
|
||||
this.textSearch = event.detail.value;
|
||||
|
||||
this.users = this.contacts.filter( e => e.name.toLowerCase().includes(this.textSearch.toLowerCase())).sort((a,b) => {
|
||||
if(a.name < b.name){
|
||||
return -1;
|
||||
}
|
||||
if(a.name > b.name){
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
clicked(){
|
||||
|
||||
@@ -116,12 +116,12 @@ export class ChatPopoverPage implements OnInit {
|
||||
|
||||
if(this.room.t === 'p') {
|
||||
this.chatService.deleteGroup(body).subscribe(res=>{
|
||||
// this.ChatSystemService.deleteRoom(this.roomId)
|
||||
this.ChatSystemService.deleteRoom(this.roomId)
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.chatService.deleteChannel(body).subscribe(res=>{
|
||||
// this.ChatSystemService.deleteRoom(this.roomId)
|
||||
this.ChatSystemService.deleteRoom(this.roomId)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user