mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
remove old methods
This commit is contained in:
@@ -14,7 +14,6 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
|
||||
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service'
|
||||
import { MessageService } from 'src/app/services/chat/message.service';
|
||||
import { CameraService } from 'src/app/services/camera.service';
|
||||
@@ -35,11 +34,10 @@ import { ChatMessageDebuggingPage } from 'src/app/shared/popover/chat-message-de
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { FileValidatorService } from "src/app/services/file/file-validator.service"
|
||||
import { RoomRepositoryService } from 'src/app/services/Repositorys/chat/repository/room-repository.service';
|
||||
import { RoomListItemOutPutDTO, RoomListOutPutDTO } from 'src/app/services/Repositorys/chat/dto/room/roomListOutputDTO';
|
||||
import { RoomListItemOutPutDTO } from 'src/app/services/Repositorys/chat/dto/room/roomListOutputDTO';
|
||||
import { MessageRepositoryService } from 'src/app/services/Repositorys/chat/repository/message-respository.service';
|
||||
import { MessageInputDTO } from 'src/app/services/Repositorys/chat/dto/message/messageInputDtO';
|
||||
import { TableMemberList } from 'src/app/services/Repositorys/chat/data-source/room/rooom-local-data-source.service';
|
||||
import { Observable } from 'rxjs';
|
||||
import { TableMessage } from 'src/app/services/Repositorys/chat/data-source/message/message-local-data-source.service';
|
||||
import { ChatPopoverPage } from '../../popover/chat-popover/chat-popover.page';
|
||||
import { Observable as DexieObservable } from 'Dexie';
|
||||
@@ -125,7 +123,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
public popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
/* private navParams: NavParams, */
|
||||
private chatService: ChatService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private timeService: TimeService,
|
||||
@@ -133,7 +130,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
private gestureController: GestureController,
|
||||
public ThemeService: ThemeService,
|
||||
private storage: Storage,
|
||||
public ChatSystemService: ChatSystemService,
|
||||
public RochetChatConnectorService: RochetChatConnectorService,
|
||||
private CameraService: CameraService,
|
||||
private sanitiser: DomSanitizer,
|
||||
@@ -186,7 +182,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.ChatSystemService.getAllRooms();
|
||||
// this.ChatSystemService.getAllRooms();
|
||||
// this.chatService.refreshtoken();
|
||||
this.scrollToBottom();
|
||||
this.getChatMembers();
|
||||
@@ -451,22 +447,22 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
const formData = new FormData();
|
||||
formData.append("blobFile", blob);
|
||||
|
||||
this.ChatSystemService.getDmRoom(roomId).send({
|
||||
file: {
|
||||
"type": "application/audio",
|
||||
"msDuration": audioFile.value.msDuration,
|
||||
"mimeType": audioFile.value.mimeType,
|
||||
},
|
||||
attachments: [{
|
||||
"title": fileName,
|
||||
"title_link_download": true,
|
||||
"type": "audio"
|
||||
}],
|
||||
temporaryData: formData,
|
||||
attachmentsModelData: {
|
||||
fileBase64: encodedData,
|
||||
}
|
||||
})
|
||||
// this.ChatSystemService.getDmRoom(roomId).send({
|
||||
// file: {
|
||||
// "type": "application/audio",
|
||||
// "msDuration": audioFile.value.msDuration,
|
||||
// "mimeType": audioFile.value.mimeType,
|
||||
// },
|
||||
// attachments: [{
|
||||
// "title": fileName,
|
||||
// "title_link_download": true,
|
||||
// "type": "audio"
|
||||
// }],
|
||||
// temporaryData: formData,
|
||||
// attachmentsModelData: {
|
||||
// fileBase64: encodedData,
|
||||
// }
|
||||
// })
|
||||
|
||||
});
|
||||
this.deleteRecording();
|
||||
@@ -474,7 +470,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
|
||||
deleteMessage(msgId: string, msg: MessageService) {
|
||||
this.ChatSystemService.getDmRoom(this.roomId).sendDeleteRequest(msgId)
|
||||
// this.ChatSystemService.getDmRoom(this.roomId).sendDeleteRequest(msgId)
|
||||
}
|
||||
|
||||
|
||||
@@ -537,7 +533,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
// this.showLoader = false;
|
||||
// });
|
||||
|
||||
this.dmUsers = this.ChatSystemService.getDmRoom(this.roomId).membersExcludeMe
|
||||
// this.dmUsers = this.ChatSystemService.getDmRoom(this.roomId).membersExcludeMe
|
||||
}
|
||||
|
||||
async openMessagesOptions(ev: any) {
|
||||
@@ -632,7 +628,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
this.getRoomInfo();
|
||||
this.closeAllDesktopComponents.emit();
|
||||
this.showEmptyContainer.emit();
|
||||
this.ChatSystemService.hidingRoom(this.roomId).catch((error) => console.error(error));
|
||||
// this.ChatSystemService.hidingRoom(this.roomId).catch((error) => console.error(error));
|
||||
}
|
||||
else if (res.data == 'delete') {
|
||||
this.closeAllDesktopComponents.emit();
|
||||
@@ -713,23 +709,23 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
const formData = new FormData();
|
||||
formData.append("blobFile", blob);
|
||||
|
||||
this.ChatSystemService.getDmRoom(roomId).send({
|
||||
file: {
|
||||
"type": "application/img",
|
||||
"guid": '',
|
||||
},
|
||||
temporaryData: formData,
|
||||
attachments: [{
|
||||
"title": file.path,
|
||||
// "image_url": "",
|
||||
//"image_url": 'data:image/jpeg;base64,' + file.base64String,
|
||||
"text": "description",
|
||||
"title_link_download": false,
|
||||
}],
|
||||
attachmentsModelData: {
|
||||
fileBase64: base64,
|
||||
}
|
||||
})
|
||||
// this.ChatSystemService.getDmRoom(roomId).send({
|
||||
// file: {
|
||||
// "type": "application/img",
|
||||
// "guid": '',
|
||||
// },
|
||||
// temporaryData: formData,
|
||||
// attachments: [{
|
||||
// "title": file.path,
|
||||
// // "image_url": "",
|
||||
// //"image_url": 'data:image/jpeg;base64,' + file.base64String,
|
||||
// "text": "description",
|
||||
// "title_link_download": false,
|
||||
// }],
|
||||
// attachmentsModelData: {
|
||||
// fileBase64: base64,
|
||||
// }
|
||||
// })
|
||||
|
||||
}
|
||||
|
||||
@@ -755,21 +751,21 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
formData.append("blobFile", blob);
|
||||
|
||||
|
||||
this.ChatSystemService.getDmRoom(roomId).send({
|
||||
file: {
|
||||
"type": "application/img",
|
||||
"guid": ''
|
||||
},
|
||||
temporaryData: formData,
|
||||
attachments: [{
|
||||
"title": "file.jpg",
|
||||
"text": "description",
|
||||
"title_link_download": false,
|
||||
}],
|
||||
attachmentsModelData: {
|
||||
fileBase64: imageBase64,
|
||||
}
|
||||
})
|
||||
// this.ChatSystemService.getDmRoom(roomId).send({
|
||||
// file: {
|
||||
// "type": "application/img",
|
||||
// "guid": ''
|
||||
// },
|
||||
// temporaryData: formData,
|
||||
// attachments: [{
|
||||
// "title": "file.jpg",
|
||||
// "text": "description",
|
||||
// "title_link_download": false,
|
||||
// }],
|
||||
// attachmentsModelData: {
|
||||
// fileBase64: imageBase64,
|
||||
// }
|
||||
// })
|
||||
|
||||
}
|
||||
|
||||
@@ -799,24 +795,24 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
if (data.selected) {
|
||||
|
||||
this.ChatSystemService.getDmRoom(roomId).send({
|
||||
file: {
|
||||
"name": res.data.selected.Assunto,
|
||||
"type": "application/webtrix",
|
||||
"ApplicationId": res.data.selected.ApplicationType,
|
||||
"DocId": res.data.selected.Id,
|
||||
"Assunto": res.data.selected.Assunto,
|
||||
},
|
||||
temporaryData: res,
|
||||
attachments: [{
|
||||
"title": res.data.selected.Assunto,
|
||||
"description": res.data.selected.DocTypeDesc,
|
||||
"title_link_download": true,
|
||||
"type": "webtrix",
|
||||
"text": res.data.selected.DocTypeDesc,
|
||||
"thumb_url": "https://static.ichimura.ed.jp/uploads/2017/10/pdf-icon.png",
|
||||
}],
|
||||
})
|
||||
// this.ChatSystemService.getDmRoom(roomId).send({
|
||||
// file: {
|
||||
// "name": res.data.selected.Assunto,
|
||||
// "type": "application/webtrix",
|
||||
// "ApplicationId": res.data.selected.ApplicationType,
|
||||
// "DocId": res.data.selected.Id,
|
||||
// "Assunto": res.data.selected.Assunto,
|
||||
// },
|
||||
// temporaryData: res,
|
||||
// attachments: [{
|
||||
// "title": res.data.selected.Assunto,
|
||||
// "description": res.data.selected.DocTypeDesc,
|
||||
// "title_link_download": true,
|
||||
// "type": "webtrix",
|
||||
// "text": res.data.selected.DocTypeDesc,
|
||||
// "thumb_url": "https://static.ichimura.ed.jp/uploads/2017/10/pdf-icon.png",
|
||||
// }],
|
||||
// })
|
||||
|
||||
|
||||
}
|
||||
@@ -859,22 +855,22 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
const formData = new FormData();
|
||||
formData.append("blobFile", blob);
|
||||
|
||||
this.ChatSystemService.getDmRoom(roomId).send({
|
||||
file: {
|
||||
"type": "application/img",
|
||||
"guid": ''
|
||||
},
|
||||
temporaryData: formData,
|
||||
attachments: [{
|
||||
"title": file.path,
|
||||
//"image_url": 'data:image/jpeg;base64,' + file.base64String,
|
||||
"text": "description",
|
||||
"title_link_download": false,
|
||||
}],
|
||||
attachmentsModelData: {
|
||||
fileBase64: base64,
|
||||
}
|
||||
})
|
||||
// this.ChatSystemService.getDmRoom(roomId).send({
|
||||
// file: {
|
||||
// "type": "application/img",
|
||||
// "guid": ''
|
||||
// },
|
||||
// temporaryData: formData,
|
||||
// attachments: [{
|
||||
// "title": file.path,
|
||||
// //"image_url": 'data:image/jpeg;base64,' + file.base64String,
|
||||
// "text": "description",
|
||||
// "title_link_download": false,
|
||||
// }],
|
||||
// attachmentsModelData: {
|
||||
// fileBase64: base64,
|
||||
// }
|
||||
// })
|
||||
}
|
||||
|
||||
|
||||
@@ -930,23 +926,23 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
|
||||
|
||||
this.ChatSystemService.getDmRoom(roomId).send({
|
||||
file: {
|
||||
"type": file.type,
|
||||
"guid": '',
|
||||
},
|
||||
attachments: [{
|
||||
"title": file.name,
|
||||
"name": file.name,
|
||||
//"image_url": res,
|
||||
// "text": "description",
|
||||
"title_link_download": false,
|
||||
}],
|
||||
temporaryData: formData,
|
||||
attachmentsModelData: {
|
||||
fileBase64: fileBase64,
|
||||
}
|
||||
})
|
||||
// this.ChatSystemService.getDmRoom(roomId).send({
|
||||
// file: {
|
||||
// "type": file.type,
|
||||
// "guid": '',
|
||||
// },
|
||||
// attachments: [{
|
||||
// "title": file.name,
|
||||
// "name": file.name,
|
||||
// //"image_url": res,
|
||||
// // "text": "description",
|
||||
// "title_link_download": false,
|
||||
// }],
|
||||
// temporaryData: formData,
|
||||
// attachmentsModelData: {
|
||||
// fileBase64: fileBase64,
|
||||
// }
|
||||
// })
|
||||
} else {
|
||||
this.toastService._badRequest("Ficheiro inválido")
|
||||
}
|
||||
@@ -1257,27 +1253,27 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
}
|
||||
|
||||
async getRoomInfo() {
|
||||
let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
|
||||
this.room = room['room'];
|
||||
if (this.room.name) {
|
||||
try {
|
||||
this.roomName = this.room.name.split('-').join(' ');
|
||||
} catch (error) {
|
||||
this.roomName = this.room.name;
|
||||
}
|
||||
// let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
|
||||
// this.room = room['room'];
|
||||
// if (this.room.name) {
|
||||
// try {
|
||||
// this.roomName = this.room.name.split('-').join(' ');
|
||||
// } catch (error) {
|
||||
// this.roomName = this.room.name;
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
if (SessionStore.user.ChatData.data.userId == this.room.u._id) {
|
||||
this.isAdmin = true
|
||||
} else {
|
||||
this.isAdmin = false
|
||||
}
|
||||
// if (SessionStore.user.ChatData.data.userId == this.room.u._id) {
|
||||
// this.isAdmin = true
|
||||
// } else {
|
||||
// this.isAdmin = false
|
||||
// }
|
||||
|
||||
if (this.room.customFields.countDownDate) {
|
||||
this.roomCountDownDate = this.room.customFields.countDownDate;
|
||||
}
|
||||
// if (this.room.customFields.countDownDate) {
|
||||
// this.roomCountDownDate = this.room.customFields.countDownDate;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user