mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
add parameters
This commit is contained in:
@@ -32,6 +32,10 @@ export class GroupContactsPage implements OnInit {
|
||||
groupName:string;
|
||||
selectedUserList:any;
|
||||
sessionStore = SessionStore
|
||||
|
||||
|
||||
objectUserSingleStone = []
|
||||
userContainer = {}
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -81,6 +85,30 @@ export class GroupContactsPage implements OnInit {
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
for( const user of this.users) {
|
||||
|
||||
const foundUser = this.objectUserSingleStone.find( e => e.name == user.name)
|
||||
|
||||
if(!foundUser) {
|
||||
this.objectUserSingleStone.push(user)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for(const user of this.objectUserSingleStone) {
|
||||
const firstLetter = user.name.charAt(0)
|
||||
|
||||
if(!this.userContainer[firstLetter]) {
|
||||
this.userContainer[firstLetter] = [user]
|
||||
} else {
|
||||
this.userContainer[firstLetter].push(user)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.showLoader = false;
|
||||
@@ -178,6 +206,26 @@ export class GroupContactsPage implements OnInit {
|
||||
})
|
||||
|
||||
this.users = users
|
||||
|
||||
|
||||
|
||||
|
||||
let a = this.objectUserSingleStone.filter( e => e.name.toLowerCase().includes(this.textSearch.toLowerCase()))
|
||||
|
||||
let b = {}
|
||||
for(const user of a) {
|
||||
const firstLetter = user.name.charAt(0)
|
||||
|
||||
if(!b[firstLetter]) {
|
||||
b[firstLetter] = [user]
|
||||
} else {
|
||||
b[firstLetter].push(user)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.userContainer = b
|
||||
|
||||
|
||||
}
|
||||
@@ -185,9 +233,16 @@ export class GroupContactsPage implements OnInit {
|
||||
|
||||
|
||||
}
|
||||
selectedContact(user:any){
|
||||
/* this.groupName = this.room.name; */
|
||||
user.isChecked = !user.isChecked;
|
||||
selectedContact(user:any) {
|
||||
/* this.groupName = this.room.name; */
|
||||
if(user.isChecked != true ) {
|
||||
user.isChecked = false
|
||||
} else {
|
||||
user.isChecked = true
|
||||
}
|
||||
|
||||
const userIndex = this.objectUserSingleStone.findIndex((e) => e._id == user._id)
|
||||
this.objectUserSingleStone[userIndex].isChecked = user.isChecked
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user