This commit is contained in:
Peter Maquiran
2023-08-11 16:46:06 +01:00
parent 0671471f59
commit b1e5857c82
6 changed files with 35 additions and 11 deletions
@@ -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)
});
}
});
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = {
"shortSHA": "19ddb1814",
"SHA": "19ddb18148a87d4cb7cd755d8c05190a2b0031e9",
"shortSHA": "0671471f5",
"SHA": "0671471f59be9f3b0e6b86ed4cf0586e8951182b",
"branch": "developer-bug",
"lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Thu Aug 10 16:46:55 2023 +0100'",
"lastCommitTime": "'Fri Aug 11 16:38:23 2023 +0100'",
"lastCommitMessage": "fix",
"lastCommitNumber": "5145",
"change": "diff --git a/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.html b/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.html\nindex 18ad65e3a..d0f7f1af9 100644\n--- a/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.html\n+++ b/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.html\n@@ -47,7 +47,7 @@\n </ion-list>\n </div>\n \n- <ion-virtual-scroll [items]=\"users | filter:textSearch: 'name'\" approxItemHeight=\"70px\" [headerFn]=\"separateLetter\">\n+ <ion-virtual-scroll [items]=\"users\" approxItemHeight=\"70px\" [headerFn]=\"separateLetter\">\n \n <div class=\"item-divider\" *virtualHeader=\"let header\">\n <ion-label>{{header}}</ion-label>\ndiff --git a/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts b/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts\nindex 373b5c612..a53da800b 100644\n--- a/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts\n+++ b/src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts\n@@ -66,7 +66,7 @@ export class GroupContactsPage implements OnInit {\n headers: this.headers,\n };\n this.chatService.getAllUsers().subscribe((res:any)=>{\n- if(this.members){\n+ if(this.members) {\n this.contacts = res.users.filter(f => !this.members.some(item => item._id === f._id));\n }\n else{\n@@ -149,6 +149,18 @@ export class GroupContactsPage implements OnInit {\n \n onChange(event){\n this.textSearch = event.detail.value;\n+\n+ this.users = this.contacts.filter( e => e.name.toLowerCase().includes(this.textSearch.toLowerCase())).sort((a,b) => {\n+ if(a.name < b.name){\n+ return -1;\n+ }\n+ if(a.name > b.name){\n+ return 1;\n+ }\n+ return 0;\n+ });\n+ \n+\n }\n clicked(){\n \ndiff --git a/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.html b/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.html\nindex d582861b3..6e820fa0b 100644\n--- a/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.html\n+++ b/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.html\n@@ -49,7 +49,7 @@\n </ion-list>\n </div>\n \n- <ion-virtual-scroll [items]=\"ChatSystemService.users | filter:textSearch: 'name'\" approxItemHeight=\"70px\" [headerFn]=\"separateLetter\">\n+ <ion-virtual-scroll [items]=\"users \" approxItemHeight=\"70px\" [headerFn]=\"separateLetter\">\n \n <div class=\"item-divider\" *virtualHeader=\"let header\">\n <ion-label>{{header}}</ion-label>\ndiff --git a/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts b/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts\nindex 436b4eccf..77e4c4d77 100644\n--- a/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts\n+++ b/src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts\n@@ -237,6 +237,18 @@ export class GroupContactsPage implements OnInit {\n \n onChange(event){\n this.textSearch = event.detail.value;\n+\n+ this.users = this.contacts.filter( e => e.name.toLowerCase().includes(this.textSearch.toLowerCase())).sort((a,b) => {\n+ if(a.name < b.name){\n+ return -1;\n+ }\n+ if(a.name > b.name){\n+ return 1;\n+ }\n+ return 0;\n+ });\n+\n+ \n }\n \n clicked(){\ndiff --git a/src/app/shared/popover/chat-popover/chat-popover.page.ts b/src/app/shared/popover/chat-popover/chat-popover.page.ts\nindex 3a0f85821..72362b081 100644\n--- a/src/app/shared/popover/chat-popover/chat-popover.page.ts\n+++ b/src/app/shared/popover/chat-popover/chat-popover.page.ts\n@@ -116,12 +116,12 @@ export class ChatPopoverPage implements OnInit {\n \n if(this.room.t === 'p') {\n this.chatService.deleteGroup(body).subscribe(res=>{\n- // this.ChatSystemService.deleteRoom(this.roomId)\n+ this.ChatSystemService.deleteRoom(this.roomId)\n });\n }\n else {\n this.chatService.deleteChannel(body).subscribe(res=>{\n- // this.ChatSystemService.deleteRoom(this.roomId)\n+ this.ChatSystemService.deleteRoom(this.roomId)\n });\n }\n });",
"changeStatus": "On branch developer-bug\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/app-routing.module.ts\n\tnew file: src/app/modals/ask-modal/ask-modal-routing.module.ts\n\tnew file: src/app/modals/ask-modal/ask-modal.module.ts\n\tnew file: src/app/modals/ask-modal/ask-modal.page.html\n\tnew file: src/app/modals/ask-modal/ask-modal.page.scss\n\tnew file: src/app/modals/ask-modal/ask-modal.page.spec.ts\n\tnew file: src/app/modals/ask-modal/ask-modal.page.ts\n\tmodified: src/app/modals/eliminate-event/eliminate-event.page.ts\n\tmodified: src/app/modals/profile/edit-profile/edit-profile.page.html\n\tmodified: src/app/modals/profile/profile.page.html\n\tmodified: src/app/pages/agenda/agenda.page.html\n\tmodified: src/app/pages/agenda/agenda.page.scss\n\tmodified: src/app/pages/agenda/agenda.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/publications/publications.page.ts\n\tmodified: src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.html\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.ts\n\tmodified: src/app/services/task.service.ts\n\tmodified: src/app/shared/publication/new-publication/new-publication.page.html\n\tmodified: src/app/shared/publication/view-publications/publication-detail/publication-detail.page.ts\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.html\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.ts\n\tmodified: src/app/store/publication-folder.service.ts\n\nChanges not staged for commit:\n (use \"git add <file>...\" to update what will be committed)\n (use \"git restore <file>...\" to discard changes in working directory)\n\tmodified: src/app/pages/chat/group-messages/group-contacts/group-contacts.page.html\n\tmodified: src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts\n\tmodified: src/app/shared/chat/group-messages/group-contacts/group-contacts.page.html\n\tmodified: src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts\n\tmodified: src/app/shared/popover/chat-popover/chat-popover.page.ts",
"lastCommitNumber": "5146",
"change": "",
"changeStatus": "On branch developer-bug\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/chat/group-messages/group-contacts/group-contacts.page.html\n\tmodified: src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts\n\tmodified: src/app/shared/chat/group-messages/group-contacts/group-contacts.page.html\n\tmodified: src/app/shared/chat/group-messages/group-contacts/group-contacts.page.ts\n\tmodified: src/app/shared/popover/chat-popover/chat-popover.page.ts",
"changeAuthor": "peter.maquiran"
}