mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -103,7 +103,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
private storage: Storage,
|
||||
private AttachmentsService: AttachmentsService,
|
||||
|
||||
|
||||
private CameraService: CameraService,
|
||||
private toastService: ToastService,
|
||||
|
||||
@@ -477,7 +477,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
if (res) {
|
||||
const data = res.data;
|
||||
this.documents.push(data.selected);
|
||||
|
||||
|
||||
this.addFileWebtrix()
|
||||
}
|
||||
});
|
||||
@@ -544,7 +544,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
|
||||
async takePicture() {
|
||||
const roomId = this.roomId
|
||||
|
||||
|
||||
const image = await this.CameraService.takePicture();
|
||||
await this.fileService.saveImage(image)
|
||||
const lastphoto: any = await this.fileService.loadFiles();
|
||||
@@ -571,11 +571,11 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
async addImage() {
|
||||
this.addFileToChat(['image/apng', 'image/jpeg', 'image/png'])
|
||||
}
|
||||
|
||||
|
||||
async addFile() {
|
||||
this.addFileToChat(['.doc', '.docx', '.pdf'])
|
||||
}
|
||||
@@ -599,7 +599,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
if(data.selected) {
|
||||
const loader = this.toastService.loading();
|
||||
|
||||
this.wsChatMethodsService.getDmRoom(roomId).send({
|
||||
this.wsChatMethodsService.getGroupRoom(roomId).send({
|
||||
file:{
|
||||
"name": res.data.selected.Assunto,
|
||||
"type": "application/webtrix",
|
||||
@@ -632,13 +632,13 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
|
||||
async addFileToChat(types: typeof FileType[] ) {
|
||||
const roomId = this.roomId
|
||||
|
||||
|
||||
const file: any = await this.fileService.getFileFromDevice(types);
|
||||
const imageData = await this.fileToBase64Service.convert(file)
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("blobFile", file);
|
||||
|
||||
|
||||
this.wsChatMethodsService.getDmRoom(roomId).send({
|
||||
file: {
|
||||
"type": "application/img",
|
||||
@@ -729,7 +729,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
else if (res['data'] == 'documentoGestaoDocumental') {
|
||||
|
||||
this.addFileWebtrix()
|
||||
|
||||
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user