mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
pull made
This commit is contained in:
@@ -147,18 +147,37 @@ export class GroupContactsPage implements OnInit {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
onChange(event){
|
||||
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){
|
||||
const 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){
|
||||
if(a.name > b.name) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
const selectedUsers = this.users.filter( e => e?.isChecked == true)
|
||||
|
||||
users.forEach( (user, index) => {
|
||||
if(user[index]) {
|
||||
console.log({user, index})
|
||||
const isCheck = selectedUsers.find( e => e._id == user._id)?.isChecked
|
||||
if(isCheck) {
|
||||
user[index].isChecked = isCheck
|
||||
}
|
||||
|
||||
// if(user[index].isChecked) {
|
||||
// console.log('user[index].isChecked', user[index].isChecked)
|
||||
// }
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
this.users = users
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -24,16 +24,16 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-progress-bar class="position-absolute" type="indeterminate" *ngIf="loading"></ion-progress-bar>
|
||||
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="main-content">
|
||||
|
||||
<ion-progress-bar class="position-absolute" type="indeterminate" *ngIf="loading"></ion-progress-bar>
|
||||
<ion-virtual-scroll [items]="userList" approxItemHeight="70px" [headerFn]="separateLetter">
|
||||
|
||||
|
||||
<div class="item-divider" *virtualHeader="let header">
|
||||
<ion-label>{{header}}</ion-label>
|
||||
</div>
|
||||
|
||||
@@ -95,9 +95,13 @@ export class ContactsPage implements OnInit {
|
||||
}
|
||||
this.chatService.createRoom(body).subscribe(async(res) => {
|
||||
this.room = res['room'];
|
||||
await this.ChatSystemService.getAllRooms();
|
||||
this.getDirectMessage(this.room._id);
|
||||
this.loading = false
|
||||
|
||||
this.ChatSystemService.getAllRooms(() => {
|
||||
this.getDirectMessage(this.room._id);
|
||||
this.loading = false
|
||||
}, this.room._id);
|
||||
|
||||
|
||||
}, ()=> {
|
||||
this.loading = false
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user