several improvements

This commit is contained in:
tiago.kayaya
2021-09-21 14:05:59 +01:00
parent afb7c42e9f
commit 2e209711bb
22 changed files with 603 additions and 74 deletions
@@ -13,6 +13,7 @@ import { ChatOptionsFeaturesPage } from 'src/app/modals/chat-options-features/ch
import { ChatMessageStore } from 'src/app/store/chat/chat-message.service';
import { ChatUserStorage } from 'src/app/store/chat/chat-user.service';
import { TimeService } from 'src/app/services/functions/time.service';
import { FileService } from 'src/app/services/functions/file.service';
@Component({
selector: 'app-messages',
@@ -61,6 +62,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
private toastService: ToastService,
private route: Router,
private timeService: TimeService,
private fileService: FileService,
) {
this.loggedUser = authService.ValidatedUserChat['data'];
@@ -191,6 +193,10 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
})
}
viewDocument(url:string){
this.fileService.viewDocumentByUrl(url);
}
getChatMembers() {
console.log(this.roomId);
@@ -350,6 +356,20 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
this.openNewEventPage.emit(data);
}
else if(res['data'] == 'add-picture'){
this.fileService.addPictureToChat(this.roomId);
//this.loadPicture();
}
else if(res['data'] == 'add-document'){
this.fileService.addDocumentToChat(this.roomId);
//this.loadDocument();
}
else if(res['data'] == 'documentoGestaoDocumental'){
this.fileService.addDocGestaoDocumentalToChat(this.roomId);
this.showLoader = false;
//this.addDocGestaoDocumental();
}
});
}