feature/gabinete-search

This commit is contained in:
Peter Maquiran
2023-05-26 14:23:37 +01:00
parent 0b3ffa3ea7
commit b2da8463b4
56 changed files with 98 additions and 186 deletions
-3
View File
@@ -72,7 +72,6 @@ export class AuthService {
this.SetSession(response, user)
}
} catch (error) {
console.log(error)
this.httpErroHandle.httpStatusHandle(error)
} finally {
return response
@@ -100,8 +99,6 @@ export class AuthService {
session.BasicAuthKey = user.BasicAuthKey
SessionStore.reset(session)
// console.log(session)
return true;
}
+1 -2
View File
@@ -94,7 +94,6 @@ export class ChatService {
}
getAllUsers() {
// console.log(this.options)
return this.http.get(environment.apiChatUrl + 'users.list', this.options);
}
getAllConnectedUsers() {
@@ -365,7 +364,7 @@ export class ChatService {
}
}
} catch (error) {
console.log(error)
}
}
+2 -6
View File
@@ -334,13 +334,9 @@ export class ChatSystemService {
this.defaultSubtribe(id)
}
this.RochetChatConnectorService.streamNotifyLogged().then((subscription => {
console.log(subscription)
}))
this.RochetChatConnectorService.streamNotifyLogged().then((subscription => {}))
this.RochetChatConnectorService.subStreamMessageUser().then((subscription => {
console.log(subscription)
}))
this.RochetChatConnectorService.subStreamMessageUser().then((subscription => {}))
}
/**
-4
View File
@@ -133,7 +133,6 @@ export class MessageService {
} else if( this.u.username == SessionStore.user.UserName) {
this.u.name = SessionStore.user.FullName
} else {
// console.log(user.username, SessionStore.user.UserName)
}
}
@@ -290,7 +289,6 @@ export class MessageService {
clearTimeout(this.functionTimer);
this.redefinedMessage(ChatMessage)
// console.log()
}
).catch((error) => {
clearTimeout(this.functionTimer);
@@ -369,7 +367,6 @@ export class MessageService {
if(!roomObject.isGroup) {
var memeberTosend = this.ChatSystemService.getRoomById(this.rid).membersExcludeMe
console.log(ChatMessage)
this.notificationService.ChatSendMessageNotification(memeberTosend[0].username,ChatMessage.u.name,ChatMessage.msg,this.rid)
} else {
var memeberTosend = this.ChatSystemService.getRoomById(this.rid).membersExcludeMe
@@ -571,7 +568,6 @@ export class MessageService {
} else {
this.earlySave = true
console.log('save change to early')
}
}
@@ -38,7 +38,6 @@ export class RochetChatConnectorService {
key:'ping-pong',
funx:(message: any) => {
if(message.msg == "ping") {
// console.log(message)
this.ws.send({message:{msg:"pong"}, loginRequired: false})
}
}
@@ -799,8 +798,6 @@ export class RochetChatConnectorService {
this.wsMsgQueue[requestId] = {message, requestId, loginRequired}
} else {
let messageStr = JSON.stringify(message)
//
// console.log(messageStr)
this.socket.send(messageStr)
}
return requestId
@@ -808,8 +805,6 @@ export class RochetChatConnectorService {
onmessage: async (event: any)=> {
const data = JSON.parse(event.data)
// console.log('data', data)
for (const [key, value] of Object.entries(this.wsCallbacks)) {
if(value.type== 'Onmessage') {
+4 -5
View File
@@ -722,7 +722,7 @@ export class RoomService {
this.registerSendMessage(offlineMessage)
offlineMessage?.decryptMessage()
offlineMessage.send()
// console.log('send offline', ChatMessage)
}
@@ -876,20 +876,19 @@ export class RoomService {
private async findMessageInDBByData({localReference, _id}) {
// console.log('look')
const a = await MessageModel.filter({localReference: localReference})
if(a.length >= 1) {
// console.log('localReference', localReference)
return true
}
const c = await MessageModel.filter({_id: _id})
if(c.length >= 1) {
// console.log('_id', _id)
return true
}
// console.log('look not found')
return false
}
@@ -26,9 +26,9 @@ export class NativeNotificationService {
}
foregroundNotification() {
console.log('Local notification foreground')
LocalNotifications.addListener('localNotificationReceived', (notification) => {
console.log('Local Notification',notification)
})
}
+1 -1
View File
@@ -24,7 +24,7 @@ export class NetworkServiceService {
});
this.onNetworkChange().subscribe((status) => {
console.log(status)
})
}
-1
View File
@@ -10,7 +10,6 @@ self.addEventListener('activate', function(event) {
self.addEventListener('notificationclick', function(event) {
// Close the notification when it is clicked
event.notification.close();
// console.log(event)
});
+7 -14
View File
@@ -119,9 +119,9 @@ export class NotificationsService {
this.http.post<Tokenn>(`${geturl}`, body, { headers }).subscribe(data => {
this.active = true
console.log(data)
}, (error) => {
console.log(error)
})
}
);
@@ -146,13 +146,11 @@ export class NotificationsService {
return false
}
console.log('foregrund');
PushNotifications.addListener('pushNotificationReceived',
(notification: PushNotificationSchema) => {
this.active = true
console.log(notification)
//this.DataArray.push(notification)
//console.log(this.DataArray)
this.storageService.get("Notifications").then((store) => {
store.push(notification)
@@ -177,11 +175,9 @@ export class NotificationsService {
return false
}
console.log('fbackgrund');
PushNotifications.addListener('pushNotificationActionPerformed',
(notification: ActionPerformed) => {
this.active = true
console.log(notification)
/* this.DataArray.push(notification.notification)
this.storageService.store("Notifications", this.DataArray)
@@ -203,12 +199,10 @@ export class NotificationsService {
"IdObject": roomId
}
let id = 437
console.log(userID, title, bodymsg, roomId)
this.http.post<Tokenn>(geturl + `?username=${userID}&title=${title}&body=${bodymsg}`, message, { headers }).subscribe(data => {
this.active = true
console.log(data)
}, (error) => {
console.log(error)
})
}
@@ -223,12 +217,11 @@ export class NotificationsService {
"IdObject": roomId
}
}
console.log(usersID, title, bodymsg, roomId)
this.http.post<Tokenn>(geturl + `?title=${title}&body=${bodymsg}`, message, { headers }).subscribe(data => {
this.active = true
console.log(data)
}, (error) => {
console.log(error)
})
}
-2
View File
@@ -77,8 +77,6 @@ export class ProcessesService {
params = params.set("pageSize", 500);
params = params.set("userid", userid);
// console.log(userid, caller)
let options = {
headers: this.headers,
params: params