mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Remove relevant console log,
This commit is contained in:
@@ -55,7 +55,7 @@ export class ContactsPage implements OnInit {
|
||||
headers: this.headers,
|
||||
};
|
||||
this.chatService.getAllUsers().subscribe((res:any)=>{
|
||||
console.log('All users',res.users);
|
||||
|
||||
this.contacts = res.users.filter(data => data.username != this.sessionStore.user.UserName);
|
||||
this.users = this.contacts.sort((a,b) => {
|
||||
if(a.name < b.name){
|
||||
@@ -92,7 +92,7 @@ export class ContactsPage implements OnInit {
|
||||
}
|
||||
|
||||
clicked(){
|
||||
console.log('clicked');
|
||||
|
||||
}
|
||||
|
||||
createRoom(username:string){
|
||||
@@ -100,29 +100,29 @@ export class ContactsPage implements OnInit {
|
||||
username: username,
|
||||
}
|
||||
this.chatService.createRoom(body).subscribe(res => {
|
||||
console.log(res);
|
||||
|
||||
this.room = res['room'];
|
||||
console.log(this.room._id);
|
||||
|
||||
|
||||
this.getDirectMessage(this.room._id);
|
||||
this.WsChatMethodsService.getAllRooms()
|
||||
});
|
||||
}
|
||||
getDirectMessage(roomId:any){
|
||||
console.log(roomId);
|
||||
|
||||
|
||||
this.chatService.getAllDirectMessages().subscribe(res=>{
|
||||
let result = res['ims'].filter(data => data._id == roomId);
|
||||
console.log(result[0]);
|
||||
|
||||
|
||||
this.dm = result[0];
|
||||
console.log(this.dm);
|
||||
|
||||
this.openModal(this.dm._id);
|
||||
});
|
||||
}
|
||||
async openModal(roomId:any){
|
||||
this.close();
|
||||
console.log(roomId);
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: MessagesPage,
|
||||
@@ -143,7 +143,7 @@ export class ContactsPage implements OnInit {
|
||||
this.createRoom(username);
|
||||
//Get direct messages (dm)
|
||||
/* this.getDirectMessage(this.room._id); */
|
||||
console.log(this.dm);
|
||||
|
||||
|
||||
|
||||
/* const modal = await this.modalController.create({
|
||||
|
||||
@@ -134,7 +134,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
) {
|
||||
this.loggedUser = authService.ValidatedUserChat['data'];
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
console.log('ROOM ID', this.roomId)
|
||||
|
||||
|
||||
window.onresize = (event) => {
|
||||
if (window.innerWidth > 701) {
|
||||
@@ -142,7 +142,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
console.log(this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({}));
|
||||
|
||||
|
||||
this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({})
|
||||
this.wsChatMethodsService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
|
||||
@@ -157,7 +157,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
ngOnInit() {
|
||||
this.wsChatMethodsService.getUserOfRoom(this.roomId).then((value) => {
|
||||
console.log('MEMBER', value)
|
||||
|
||||
})
|
||||
//this.loadFiles();
|
||||
VoiceRecorder.requestAudioRecordingPermission();
|
||||
@@ -254,13 +254,13 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
stopRecording() {
|
||||
this.deleteRecording();
|
||||
this.allowTyping = false;
|
||||
console.log('Stop');
|
||||
|
||||
if (!this.recording) {
|
||||
return;
|
||||
}
|
||||
this.recording = false;
|
||||
VoiceRecorder.stopRecording().then(async (result: RecordingData) => {
|
||||
console.log(result);
|
||||
|
||||
this.recording = false;
|
||||
if (result.value && result.value.recordDataBase64) {
|
||||
const recordData = result.value.recordDataBase64;
|
||||
@@ -269,7 +269,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
//Save file
|
||||
this.storage.set('fileName', fileName);
|
||||
this.storage.set('recordData', result).then(() => {
|
||||
console.log('Audio recorded saved');
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -354,7 +354,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
console.log(res);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -422,12 +422,12 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.audioRecorded = `data:${recordData.value.mimeType};base64,${recordData?.value?.recordDataBase64}`;
|
||||
}
|
||||
|
||||
console.log(this.audioRecorded);
|
||||
|
||||
|
||||
//Converting base64 to blob
|
||||
const encodedData = btoa(this.audioRecorded);
|
||||
const blob = this.base64toBlob(encodedData, recordData.value.mimeType)
|
||||
console.log(blob)
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("blobFile", blob);
|
||||
|
||||
@@ -450,7 +450,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
viewDocument(file: any, url?: string) {
|
||||
console.log()
|
||||
|
||||
if (file.type == "application/webtrix") {
|
||||
this.openViewDocumentModal(file);
|
||||
}
|
||||
@@ -462,7 +462,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
/* playSound(url?:any){
|
||||
alert('here')
|
||||
console.log(url);
|
||||
|
||||
//this.audioDownloaded = this.sanitiser.bypassSecurityTrustResourceUrl(url);
|
||||
this.audioDownloaded = url;
|
||||
} */
|
||||
@@ -601,7 +601,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
IsRequired: "true",
|
||||
}
|
||||
});
|
||||
console.log(this.attendees);
|
||||
|
||||
this.popoverController.dismiss();
|
||||
if (window.innerWidth <= 1024) {
|
||||
const modal = await this.modalController.create({
|
||||
@@ -635,7 +635,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
const blob = await base64.blob();
|
||||
const formData = new FormData();
|
||||
formData.append("blobFile", blob);
|
||||
console.log('ALL IMAGE', formData)
|
||||
|
||||
|
||||
this.wsChatMethodsService.getDmRoom(roomId).send({
|
||||
file: {
|
||||
@@ -715,9 +715,9 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
resultType: CameraResultType.Base64,
|
||||
source: CameraSource.Photos
|
||||
});
|
||||
console.log('ADDFILECHAT', file)
|
||||
|
||||
//const imageData = await this.fileToBase64Service.convert(file)
|
||||
//console.log('ADDFILECHAT', imageData)
|
||||
//
|
||||
|
||||
const response = await fetch('data:image/jpeg;base64,' + file.base64String!);
|
||||
const blob = await response.blob();
|
||||
@@ -752,17 +752,17 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
const file: any = await this.fileService.getFileFromDevice(types);
|
||||
|
||||
console.log('Add file', JSON.stringify(await this.getBase64(file)))
|
||||
|
||||
|
||||
if (file.type != "application/img" && file.type != "image/png" && file.type != "image/jpeg" && file.type != "image/gif") {
|
||||
|
||||
const encodedData = btoa(JSON.stringify(await this.getBase64(file)));
|
||||
const blob = this.base64toBlob(encodedData, file.type)
|
||||
console.log('Add Blob file', blob)
|
||||
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('blobFile', blob);
|
||||
console.log(formData)
|
||||
|
||||
|
||||
this.wsChatMethodsService.getDmRoom(roomId).send({
|
||||
file: {
|
||||
@@ -778,7 +778,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
temporaryData: formData
|
||||
});
|
||||
} else {
|
||||
console.log('File type invalid')
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -793,7 +793,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
resolve(reader.result)
|
||||
};
|
||||
reader.onerror = function (error) {
|
||||
console.log('Error: ', error);
|
||||
|
||||
};
|
||||
});
|
||||
|
||||
@@ -801,7 +801,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
async openChatOptions(ev?: any) {
|
||||
const roomId = this.roomId
|
||||
console.log('MOBILE CHAT OPTION', this.members);
|
||||
|
||||
|
||||
const popover = await this.popoverController.create({
|
||||
component: ChatOptionsPopoverPage,
|
||||
@@ -816,7 +816,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
});
|
||||
await popover.present();
|
||||
popover.onDidDismiss().then(async (res) => {
|
||||
console.log(res['data']);
|
||||
|
||||
if (res['data'] == 'meeting') {
|
||||
this.bookMeeting();
|
||||
}
|
||||
@@ -843,11 +843,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
} else {
|
||||
this.sqlservice.getAllChatMSG(roomId).then((msg: any) => {
|
||||
console.log('ALL MSG DBBB', msg)
|
||||
|
||||
let chatmsgArray = [];
|
||||
let array = []
|
||||
msg.forEach(element => {
|
||||
console.log('CHANNEL ELEMENT', element.channels)
|
||||
|
||||
|
||||
let msgChat = {
|
||||
_id: element.Id,
|
||||
@@ -867,7 +867,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
});
|
||||
|
||||
|
||||
console.log('CHAT MSG FROM DB', chatmsgArray)
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -958,18 +958,18 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
// } else {
|
||||
// pathFile = this.file.externalRootDirectory
|
||||
// }
|
||||
// console.log(pdfString)
|
||||
// console.log(pathFile)
|
||||
// console.log(contentFile)
|
||||
//
|
||||
//
|
||||
//
|
||||
// this.file
|
||||
// .writeFile(pathFile, fileName, contentFile, { replace: true })
|
||||
// .then(success => {
|
||||
// this.fileOpener
|
||||
// .open(pathFile + fileName, type)
|
||||
// .then(() => console.log('File is opened'))
|
||||
// .catch(e => console.log('Error opening file', e));
|
||||
// .then(() =>
|
||||
// .catch(e =>
|
||||
// })
|
||||
// .catch(e => console.log('Error writing file', e))
|
||||
// .catch(e =>
|
||||
}
|
||||
|
||||
downloadFileFromBrowser(fileName: string, data: any): void {
|
||||
@@ -982,7 +982,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
|
||||
async openPreview(msg) {
|
||||
console.log(msg);
|
||||
|
||||
|
||||
if(msg.file.type === "application/webtrix") {
|
||||
this.viewDocument(msg.file, msg.attachments.image_url)
|
||||
@@ -1021,7 +1021,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
async audioPreview(msg) {
|
||||
console.log(msg);
|
||||
|
||||
if (!msg.attachments[0].title_link || msg.attachments[0].title_link === null || msg.attachments[0].title_link === '') {
|
||||
this.downloadFileMsg(msg)
|
||||
} else { }
|
||||
|
||||
Reference in New Issue
Block a user