mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
fix
This commit is contained in:
@@ -386,7 +386,7 @@ export class ChatPage implements OnInit {
|
||||
})
|
||||
|
||||
this.storageservice.get('chatusers').then((users) => {
|
||||
this.dmUsers = users.filter(data => data.username != SessionStore.user.RochetChatUser);
|
||||
this.dmUsers = users.filter(data => data.username != SessionStore.user.UserName);
|
||||
})
|
||||
} else {
|
||||
this.sqlservice.getAllChatRoom().then((rooms: any) => {
|
||||
@@ -429,7 +429,7 @@ export class ChatPage implements OnInit {
|
||||
chatusersArray.push(userListDB);
|
||||
});
|
||||
|
||||
this.dmUsers = chatusersArray.filter(data => data.username != SessionStore.user.RochetChatUser);
|
||||
this.dmUsers = chatusersArray.filter(data => data.username != SessionStore.user.UserName);
|
||||
|
||||
})
|
||||
}
|
||||
@@ -545,7 +545,7 @@ export class ChatPage implements OnInit {
|
||||
})
|
||||
|
||||
this.storageservice.get('chatusers').then((users) => {
|
||||
this.dmUsers = users.filter(data => data.username != SessionStore.user.RochetChatUser);
|
||||
this.dmUsers = users.filter(data => data.username != SessionStore.user.UserName);
|
||||
})
|
||||
} else {
|
||||
this.sqlservice.getAllChatRoom().then((rooms: any) => {
|
||||
|
||||
@@ -72,7 +72,7 @@ export class GroupContactsPage implements OnInit {
|
||||
this.contacts = res.users.filter(f => !this.members.some(item => item._id === f._id));
|
||||
}
|
||||
else{
|
||||
this.contacts = res.users.filter(data => data.username != this.sessionStore.user.RochetChatUser);
|
||||
this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName);
|
||||
}
|
||||
this.users = this.contacts.sort((a,b) => {
|
||||
if(a.name < b.name){
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<ion-label *ngIf="msg.delate == false">{{msg.msg}}</ion-label>
|
||||
<ion-label *ngIf="msg.delate == true">{{msg.msg}}</ion-label>
|
||||
|
||||
<ion-label class="float-status-all float-status" >
|
||||
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
|
||||
|
||||
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
|
||||
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
|
||||
@@ -102,7 +102,7 @@
|
||||
</div> -->
|
||||
|
||||
<div *ngIf="msg.file && msg.delate == false">
|
||||
<div class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' class='message-container incoming-{{msg.u.username!=sessionStore.user.RochetChatUser}}' *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru' && msg.file.type != 'application/meeting'" (press)="handlePress(msg._id)">
|
||||
<div class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru' && msg.file.type != 'application/meeting'" (press)="handlePress(msg._id)">
|
||||
<div class="title">
|
||||
<ion-label>{{msg.u.name ?? ""}}</ion-label>
|
||||
<span class="time">{{msg.duration}}</span>
|
||||
@@ -124,7 +124,7 @@
|
||||
</div>
|
||||
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image" >
|
||||
<ion-icon *ngIf="msg.attachments[0].image_url == null" name="download-outline"></ion-icon>
|
||||
<ion-label class="float-status-all float-status" >
|
||||
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
|
||||
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
|
||||
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
|
||||
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
|
||||
@@ -171,7 +171,7 @@
|
||||
<span *ngIf="file.description && msg.file.type != 'application/webtrix'"> • </span>
|
||||
|
||||
</ion-label>
|
||||
<ion-label class="float-status-all float-status" >
|
||||
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
|
||||
|
||||
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
|
||||
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
|
||||
|
||||
@@ -393,7 +393,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.chatService.getAllUsers().subscribe(res => {
|
||||
console.log(res);
|
||||
|
||||
this.allUsers = res['users'].filter(data => data.username != SessionStore.user.RochetChatUser);
|
||||
this.allUsers = res['users'].filter(data => data.username != SessionStore.user.UserName);
|
||||
console.log(this.allUsers);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export class ContactsPage implements OnInit {
|
||||
};
|
||||
this.chatService.getAllUsers().subscribe((res:any)=>{
|
||||
console.log('All users',res.users);
|
||||
this.contacts = res.users.filter(data => data.username != this.sessionStore.user.RochetChatUser);
|
||||
this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName);
|
||||
this.users = this.contacts.sort((a,b) => {
|
||||
if(a.name < b.name){
|
||||
return -1;
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<ion-label *ngIf="msg.delate == false">{{msg.msg}}</ion-label>
|
||||
<ion-label *ngIf="msg.delate == true">{{msg.msg}}</ion-label>
|
||||
|
||||
<ion-label class="float-status-all float-status" >
|
||||
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
|
||||
|
||||
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
|
||||
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
|
||||
<div *ngIf="msg.file && msg.delate == false">
|
||||
<div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=sessionStore.user.RochetChatUser}}' *ngIf="msg.file.type != 'application/meeting'">
|
||||
<div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=sessionStore.user.UserName}}' *ngIf="msg.file.type != 'application/meeting'">
|
||||
<div class="title">
|
||||
<ion-label>{{msg.u.name}}</ion-label>
|
||||
<span class="time">{{msg.duration}}</span>
|
||||
@@ -93,7 +93,7 @@
|
||||
</div>
|
||||
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image">
|
||||
|
||||
<ion-label class="float-status-all float-status" >
|
||||
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
|
||||
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
|
||||
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
|
||||
<ion-icon *ngIf="msg.messageSend && msg.received.length >= 1 && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
</ion-label>
|
||||
|
||||
<ion-label class="float-status-all float-status" >
|
||||
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
|
||||
|
||||
<ion-icon *ngIf="msg.messageSend == false" src="assets/images/clock-regular.svg"></ion-icon>
|
||||
<ion-icon *ngIf="msg.messageSend == true && msg.received.length == 0" src="assets/images/check-solid.svg"></ion-icon>
|
||||
|
||||
@@ -536,7 +536,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.showLoader = true;
|
||||
this.chatService.getMembers(this.roomId).subscribe(res => {
|
||||
this.members = res['members'];
|
||||
this.dmUsers = res['members'].filter(data => data.username != this.sessionStore.user.RochetChatUser)
|
||||
this.dmUsers = res['members'].filter(data => data.username != this.sessionStore.user.UserName)
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ export class NewGroupPage implements OnInit {
|
||||
}
|
||||
|
||||
async createGroup(){
|
||||
console.log('NEW GROUP', SessionStore.user.RochetChatUser)
|
||||
console.log('NEW GROUP', SessionStore.user.UserName)
|
||||
let name = this.groupName.split(' ').join('-');
|
||||
//Take out all special characters in string
|
||||
name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
||||
@@ -75,11 +75,11 @@ export class NewGroupPage implements OnInit {
|
||||
let customFields = {
|
||||
"countDownDate":this.thedate
|
||||
}
|
||||
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.RochetChatUser, customFields);
|
||||
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
|
||||
console.log(res);
|
||||
}
|
||||
else{
|
||||
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.RochetChatUser, customFields);
|
||||
res = await this.wsChatMethodsService.createPrivateRoom(name, SessionStore.user.UserName, customFields);
|
||||
console.log(res);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user