git pull made

This commit is contained in:
Eudes Inácio
2021-10-09 16:59:10 +01:00
20 changed files with 244 additions and 81 deletions
@@ -62,17 +62,9 @@
<ion-checkbox [checked]="SessionStore.user.LoginPreference=='Pin' " class="checkBox" ></ion-checkbox> <ion-checkbox [checked]="SessionStore.user.LoginPreference=='Pin' " class="checkBox" ></ion-checkbox>
PIN PIN
</div> </div>
</ion-col>
<ion-col hidden class="align-center d-flex">
<div (click)="addFingerprint()" class="d-flex align-center">
<ion-checkbox class="checkBox" [checked]="false"></ion-checkbox>
Impressão Digital
</div>
</ion-col> </ion-col>
</ion-row> </ion-row>
</div> </div>
</div> </div>
</div> </div>
</ion-content> </ion-content>
View File
+2 -2
View File
@@ -65,7 +65,7 @@
</div> </div>
<div class="item-date" [class.item-date-active]="dm._id == idSelected">{{showDateDuration(dm._updatedAt)}}</div> <div class="item-date" [class.item-date-active]="dm._id == idSelected">{{showDateDuration(dm._updatedAt)}}</div>
</div> </div>
<div class="item-description" [class.item-description-active]="dm._id == idSelected"> <div *ngIf="dm.lastMessage" class="item-description" [class.item-description-active]="dm._id == idSelected">
<ion-label *ngIf="dm.lastMessage">{{dm.lastMessage.msg}}</ion-label> <ion-label *ngIf="dm.lastMessage">{{dm.lastMessage.msg}}</ion-label>
<ion-label *ngIf="dm.lastMessage.file"> <ion-label *ngIf="dm.lastMessage.file">
<fa-icon icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="dm._id == idSelected"></fa-icon> <fa-icon icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="dm._id == idSelected"></fa-icon>
@@ -98,7 +98,7 @@
</div> </div>
<div class="item-date" [class.item-date-active]="group._id ==idSelected" *ngIf="group.lastMessage">{{showDateDuration(group._updatedAt)}}</div> <div class="item-date" [class.item-date-active]="group._id ==idSelected" *ngIf="group.lastMessage">{{showDateDuration(group._updatedAt)}}</div>
</div> </div>
<div class="item-description d-flex align-items-center" [class.item-description-active]="group._id ==idSelected" *ngIf="group.lastMessage"> <div *ngIf="group.lastMessage" class="item-description d-flex align-items-center" [class.item-description-active]="group._id ==idSelected">
<div class="item-message">{{group.lastMessage.u.name}}: {{group.lastMessage.msg}} </div> <div class="item-message">{{group.lastMessage.u.name}}: {{group.lastMessage.msg}} </div>
<div class="item-files" *ngIf="group.lastMessage.file"> <div class="item-files" *ngIf="group.lastMessage.file">
<fa-icon icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="group._id == idSelected"></fa-icon> <fa-icon icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="group._id == idSelected"></fa-icon>
+1
View File
@@ -382,6 +382,7 @@ hideRefreshButton(){
async getDirectMessages(event?){ async getDirectMessages(event?){
this.chatService.getAllDirectMessages().subscribe(async (res:any)=>{ this.chatService.getAllDirectMessages().subscribe(async (res:any)=>{
console.log(res.ims);
if(res != 200){ if(res != 200){
//console.log(res.ims); //console.log(res.ims);
@@ -40,11 +40,11 @@
<ion-content> <ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)"> <!-- <ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<ion-refresher-content> <ion-refresher-content>
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher> -->
<div (click)="handleClick()" class="messages overflow-y-auto" #scrollMe> <div (click)="handleClick()" class="messages overflow-y-auto" #scrollMe>
<div class="welcome-text"> <div class="welcome-text">
@@ -41,11 +41,11 @@
<ion-content> <ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)"> <!-- <ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<ion-refresher-content> <ion-refresher-content>
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher> -->
<div (click)="handleClick()" class="messages" #scrollMe> <div (click)="handleClick()" class="messages" #scrollMe>
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of chatMessageStore.message[roomId]; let last = last" <div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of chatMessageStore.message[roomId]; let last = last"
@@ -58,13 +58,13 @@
<div> <div>
<ion-label>{{msg.msg}}</ion-label> <ion-label>{{msg.msg}}</ion-label>
<div *ngIf="msg.attachments" class="message-attachments"> <div *ngIf="msg.attachments" class="message-attachments">
<div *ngFor="let file of msg.attachments"> <div *ngFor="let file of msg.attachments let i = index">
<img *ngIf="file.image_url" src="{{file.image_url}}" alt="image"> <img *ngIf="file.image_url" src="{{file.image_url}}" alt="image">
<div> <div>
<div> <div>
<div class="file"> <div class="file">
<!-- <canvas id="pdf_canvas"></canvas> --> <!-- <canvas id="pdf_canvas"></canvas> -->
<div (click)="viewDocument(file)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file"> <div (click)="docIndex(i); viewDocument(msg.file)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
<span *ngIf="msg.file.type"> <span *ngIf="msg.file.type">
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon> <fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon> <fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
+97 -23
View File
@@ -4,11 +4,14 @@ import { GestureController, Gesture, ModalController, NavParams, PopoverControll
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page'; import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { EventPerson } from 'src/app/models/eventperson.model'; import { EventPerson } from 'src/app/models/eventperson.model';
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
import { SearchDocumentDetails, SearchFolderDetails } from 'src/app/models/search-document';
import { ContactsPage } from 'src/app/pages/chat/messages/contacts/contacts.page'; import { ContactsPage } from 'src/app/pages/chat/messages/contacts/contacts.page';
import { AlertService } from 'src/app/services/alert.service'; import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service'; import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service'; import { ChatService } from 'src/app/services/chat.service';
import { FileService } from 'src/app/services/functions/file.service'; import { FileService } from 'src/app/services/functions/file.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { synchro } from 'src/app/services/socket/synchro.service'; import { synchro } from 'src/app/services/socket/synchro.service';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
import { NewEventPage } from 'src/app/shared/agenda/new-event/new-event.page'; import { NewEventPage } from 'src/app/shared/agenda/new-event/new-event.page';
@@ -55,6 +58,10 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
showMessageOptions = false; showMessageOptions = false;
selectedMsgId:string; selectedMsgId:string;
dicIndex = 0;
task: ExpedientTaskModalPageNavParamsTask;
LoadedDocument:any = null;
constructor( constructor(
public popoverController: PopoverController, public popoverController: PopoverController,
private modalController: ModalController, private modalController: ModalController,
@@ -67,6 +74,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
private fileService: FileService, private fileService: FileService,
private gestureController: GestureController, private gestureController: GestureController,
private processes: ProcessesService,
) { ) {
/* this.activatedRoute.paramMap.subscribe(params => { /* this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) { if(params["params"].SerialNumber) {
@@ -111,19 +119,19 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.scrollChangeCallback = () => this.onContentScrolled(event); this.scrollChangeCallback = () => this.onContentScrolled(event);
window.addEventListener('scroll', this.scrollChangeCallback, true); window.addEventListener('scroll', this.scrollChangeCallback, true);
const gesture = this.gestureController.create({ // const gesture = this.gestureController.create({
el: this.rectangle.nativeElement, // el: this.rectangle.nativeElement,
gestureName:'long-press', // gestureName:'long-press',
onStart: () => { alert('OP') }, // onStart: () => { alert('OP') },
/* onMove () => { // /* onMove () => {
console.log('Move'); // console.log('Move');
}, */ // }, */
onEnd: () => { // onEnd: () => {
console.log('ENNNNNDS'); // console.log('ENNNNNDS');
}, // },
}) // })
gesture.enable(); // gesture.enable();
} }
handlePress(id?:string){ handlePress(id?:string){
@@ -275,6 +283,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
viewDocument(file:any){ viewDocument(file:any){
console.log(file);
if(file.type == "file"){ if(file.type == "file"){
let fullUrl = "https://www.tabularium.pt" + file.title_link; let fullUrl = "https://www.tabularium.pt" + file.title_link;
this.fileService.viewDocumentByUrl(fullUrl); this.fileService.viewDocumentByUrl(fullUrl);
@@ -285,17 +295,80 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
} }
docIndex(index: number){
this.dicIndex = index
}
async openViewDocumentModal(file:any){ async openViewDocumentModal(file:any){
const modal = await this.modalController.create({ console.log(file);
component: ViewDocumentPage, const docId = file.DocId;
componentProps: { const applicationId: any = file.ApplicationId;
file: file,
}, this.processes.GetDocumentDetails(docId, applicationId).subscribe( async(res)=> {
cssClass: 'modal modal-desktop',
backdropDismiss: false this.LoadedDocument = res;
this.LoadedDocument.Subject = this.LoadedDocument.Assunto
let thedate = new Date(this.LoadedDocument.DateDispatch || this.LoadedDocument.DocDate);
//this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
let task: ExpedientTaskModalPageNavParamsTask
let document: SearchDocumentDetails = this.LoadedDocument
let folder: SearchFolderDetails = this.LoadedDocument
if(this.LoadedDocument.ApplicationID == 361 || this.LoadedDocument.ApplicationId == 361) {
task = {
serialNumber: folder.DispatchNumber,
taskStartDate: folder.DateDispatch,
isEvent: true,
workflowInstanceDataFields: {
FolderID: folder['FolderId'] || folder['FolderID'] || folder.folderId,
Subject: folder.Assunto,
SourceSecFsID: folder.ApplicationID || folder['ApplicationId'],
SourceType: 'FOLDER',
SourceID: folder.folderId,
DispatchNumber: folder.DispatchNumber
},
}
}
else if (document.ApplicationID == 8 || document.ApplicationId == 8)
{
task = {
serialNumber: document.DocId,
taskStartDate: document.DocDate,
isEvent: true,
workflowInstanceDataFields: {
FolderID: null,
Subject: document.Assunto,
DispatchNumber: null,
SourceSecFsID: document.ApplicationID || document.ApplicationId,
SourceType: 'DOC',
SourceID: document.DocId,
}
}
} else {
console.log('unexpected ApplicationID')
}
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: task.workflowInstanceDataFields.Subject,
url: '',
title_link: '',
},
Document: this.LoadedDocument,
applicationId: document.ApplicationID || document.ApplicationId,
docId: document.ApplicationID || document.ApplicationId,
folderId: folder['FolderId'] || folder['FolderID'] || folder.folderId
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}); });
await modal.present();
modal.onDidDismiss();
} }
getChatMembers() { getChatMembers() {
@@ -401,6 +474,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
} }
async openChatOptions(ev?: any) { async openChatOptions(ev?: any) {
const roomId = this.roomId
console.log(this.members); console.log(this.members);
const popover = await this.popoverController.create({ const popover = await this.popoverController.create({
@@ -421,11 +495,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.bookMeeting(); this.bookMeeting();
} }
else if(res['data'] == 'take-picture'){ else if(res['data'] == 'take-picture'){
this.fileService.addCameraPictureToChat(this.roomId); this.fileService.addCameraPictureToChat(roomId);
//this.loadPicture(); //this.loadPicture();
} }
else if(res['data'] == 'add-picture'){ else if(res['data'] == 'add-picture'){
this.fileService.addPictureToChat(this.roomId); this.fileService.addPictureToChatMobile(roomId);
//this.loadPicture(); //this.loadPicture();
} }
else if(res['data'] == 'add-document'){ else if(res['data'] == 'add-document'){
@@ -74,13 +74,11 @@
<ion-buttons class="flex-grow-1" slot="start"> <ion-buttons class="flex-grow-1" slot="start">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()"> <button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label> <ion-label>Cancelar</ion-label>
<ion-icon name="close" slot="start"></ion-icon>
</button> </button>
</ion-buttons> </ion-buttons>
<ion-buttons class="flex-grow-1" slot="end"> <ion-buttons class="flex-grow-1" slot="end">
<button class="btn-ok" fill="clear" color="#fff" (click)="save()"> <button class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>Gravar</ion-label> <ion-label>Gravar</ion-label>
<ion-icon name="checkmark" slot="start"></ion-icon>
</button> </button>
</ion-buttons> </ion-buttons>
</ion-toolbar> </ion-toolbar>
@@ -73,7 +73,7 @@
<span>Lista vazia</span> <span>Lista vazia</span>
</div> </div>
<div *ngIf="skeletonLoader && listToPresent.length == 0"> <!-- <div *ngIf="skeletonLoader && listToPresent.length == 0">
<ion-list> <ion-list>
<ion-item> <ion-item>
<ion-thumbnail slot="end"> <ion-thumbnail slot="end">
@@ -96,7 +96,7 @@
</ion-label> </ion-label>
</ion-item> </ion-item>
</ion-list> </ion-list>
</div> </div> -->
</div> </div>
@@ -375,15 +375,15 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
thedate.getMinutes(); thedate.getMinutes();
} }
goToProcess(serialNumber: string, workflowName: string, activityName: string) { goToProcess(serialNumber:string, workflowName:string, activityName:string){
if (workflowName == 'Despacho') { if(workflowName == 'Despacho') {
if (activityName == 'Tarefa de Despacho') { if(activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho'){
this.router.navigate(['/home/gabinete-digital/despachos', serialNumber, 'gabinete-digital']); this.router.navigate(['/home/gabinete-digital/despachos',serialNumber,'gabinete-digital']);
} }
} }
else if (workflowName == 'Despacho do Presidente da República') { else if(workflowName == 'Despacho do Presidente da República') {
if (activityName == 'Tarefa de Despacho') { if(activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho'){
this.router.navigate(['/home/gabinete-digital/despachos-pr', serialNumber, 'gabinete-digital']); this.router.navigate(['/home/gabinete-digital/despachos-pr',serialNumber,'gabinete-digital']);
} }
else if (activityName == 'Revisar Diploma' || activityName == 'Assinar Diploma') { else if (activityName == 'Revisar Diploma' || activityName == 'Assinar Diploma') {
this.router.navigate(['/home/gabinete-digital/diplomas', serialNumber, 'gabinete-digital']); this.router.navigate(['/home/gabinete-digital/diplomas', serialNumber, 'gabinete-digital']);
@@ -639,6 +639,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
break; break;
} */ } */
this.LoadCounts(); this.LoadCounts();
this.loadAllProcesses();
//this.refreshExpedientes(); //this.refreshExpedientes();
if (event) { if (event) {
@@ -13,7 +13,7 @@
</div> </div>
</div> </div>
<ion-toolbar> <ion-toolbar>
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)"> <ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)" >
<ion-segment-button value="parecer"> <ion-segment-button value="parecer">
Parecer Parecer
</ion-segment-button> </ion-segment-button>
@@ -27,7 +27,7 @@
<ion-content> <ion-content>
<div class="main-content width-100 overflow-y-auto height-100"> <div class="main-content width-100 overflow-y-auto height-100">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="segmentChanged($event)"> <ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content <ion-refresher-content
pullingIcon="chevron-down-circle-outline" pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar" pullingText="deslize para actualizar"
@@ -28,10 +28,12 @@ export class FileLoaderService {
// console.log(files); // console.log(files);
// }; // };
input.click(); input.click();
return input return input
} }
getFirstFile(input: HTMLInputElement) { getFirstFile(input: HTMLInputElement) {
+96 -10
View File
@@ -86,38 +86,114 @@ export class FileService {
} }
addCameraPictureToChat(roomId){ addCameraPictureToChat(roomId){
let data = this.takePicture();
if(data.name != null){ const options: CameraOptions = {
quality: 50,
destinationType: this.camera.DestinationType.DATA_URL,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
targetWidth: 720,
targetHeight: 720,
}
this.camera.getPicture(options).then((imageData) => {
this.capturedImage = 'data:image/png;base64,'+imageData;
this.capturedImageTitle = new Date().getTime() + '.jpeg';
let body = { let body = {
"message": "message":
{ {
"rid": roomId, "rid": roomId,
"msg": "", "msg": "",
"attachments": [{ "attachments": [{
"title": data.name, "title": this.capturedImageTitle,
"title_link_download": false, "title_link_download": false,
"image_url": data.image, "image_url": this.capturedImage,
}] }]
} }
} }
const loader = this.toastService.loading();
this.chatService.sendMessage(body).subscribe(res=> { this.chatService.sendMessage(body).subscribe(res=> {
console.log(res); console.log(res);
loader.remove();
},(error) => { },(error) => {
loader.remove();
this.toastService.badRequest("Não foi possível adicionar a fotografia!");
}); });
}
else{ }, (err) => {
this.toastService.badRequest("Não foi possível adicionar a fotografia!"); this.toastService.badRequest("Não foi possível adicionar a fotografia!");
} });
} }
addPictureToChat(roomId:string) { addPictureToChatMobile(roomId) {
alert('Here')
const options: CameraOptions = {
quality: 90,
sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
destinationType: this.camera.DestinationType.DATA_URL,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
targetWidth: 720,
targetHeight: 720,
correctOrientation: true
}
this.camera.getPicture(options).then((imageData) => {
let base64Image = 'data:image/jpeg;base64,' + imageData;
this.capturedImage = imageData;
this.capturedImageTitle = new Date().getTime() + '.jpeg';
//const loader = this.toastService.loading();
let body = {
"message":
{
"rid": roomId,
"msg": "",
"attachments": [{
//"title": this.capturedImageTitle ,
//"text": "description",
"title_link_download": false,
"image_url": this.capturedImage,
}]
}
}
console.log(this.capturedImage)
this.chatService.sendMessage(body).subscribe(res=> {
//loader.remove();
//console.log(res);
},(error) => {
//loader.remove();
});
}, (err) => {
//console.log(err);
});
}
addPictureToChat(roomId) {
const input = this.fileLoaderService.createInput({ const input = this.fileLoaderService.createInput({
accept: ['image/apng', 'image/jpeg', 'image/png'] accept: ['image/apng', 'image/jpeg', 'image/png']
}) })
setInterval(()=>{
console.log(input.value)
}, 550)
input.onchange = async () => { input.onchange = async () => {
alert('Onchange AQUI')
const file = this.fileLoaderService.getFirstFile(input) const file = this.fileLoaderService.getFirstFile(input)
console.log(file); console.log(file);
@@ -141,6 +217,8 @@ export class FileService {
} }
} }
console.log(this.capturedImage)
this.chatService.sendMessage(body).subscribe(res=> { this.chatService.sendMessage(body).subscribe(res=> {
loader.remove(); loader.remove();
//console.log(res); //console.log(res);
@@ -189,6 +267,8 @@ export class FileService {
modal.onDidDismiss().then(async res=>{ modal.onDidDismiss().then(async res=>{
const data = res.data; const data = res.data;
alert('HERE')
if(data.selected){ if(data.selected){
const loader = this.toastService.loading(); const loader = this.toastService.loading();
@@ -197,6 +277,10 @@ export class FileService {
console.log(res.data.selected.Id); console.log(res.data.selected.Id);
console.log(res.data.selected.ApplicationType); console.log(res.data.selected.ApplicationType);
console.log('AQUIIIII');
alert('HERE 2')
let url = await this.processesService.GetDocumentUrl(res.data.selected.Id, res.data.selected.ApplicationType).toPromise(); let url = await this.processesService.GetDocumentUrl(res.data.selected.Id, res.data.selected.ApplicationType).toPromise();
let url_no_options: string = url.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1"); let url_no_options: string = url.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
console.log(url_no_options); console.log(url_no_options);
@@ -218,7 +302,9 @@ export class FileService {
}], }],
"file":{ "file":{
"name": res.data.selected.Assunto, "name": res.data.selected.Assunto,
"type": "application/webtrix" "type": "application/webtrix",
"ApplicationId": res.data.selected.ApplicationType,
"DocId": res.data.selected.Id,
} }
} }
} }
@@ -138,9 +138,6 @@
<ion-fab-button (click)="bookMeeting()" color="light"> <ion-fab-button (click)="bookMeeting()" color="light">
<ion-icon name="calendar"></ion-icon> <ion-icon name="calendar"></ion-icon>
</ion-fab-button> </ion-fab-button>
<ion-fab-button (click)="addFileWebtrix()" color="light">
<ion-icon src="assets/icon/webtrix.svg"></ion-icon>
</ion-fab-button>
<ion-fab-button (click)="addFile()" color="light"> <ion-fab-button (click)="addFile()" color="light">
<ion-icon name="document"></ion-icon> <ion-icon name="document"></ion-icon>
</ion-fab-button> </ion-fab-button>
@@ -150,6 +147,9 @@
<ion-fab-button class="hide-desktop" (click)="takePicture()" color="light"> <ion-fab-button class="hide-desktop" (click)="takePicture()" color="light">
<ion-icon name="camera"></ion-icon> <ion-icon name="camera"></ion-icon>
</ion-fab-button> </ion-fab-button>
<ion-fab-button (click)="addFileWebtrix()" color="light">
<ion-icon src="assets/icon/webtrix.svg"></ion-icon>
</ion-fab-button>
</ion-fab-list> </ion-fab-list>
</ion-fab> </ion-fab>
</div> </div>
@@ -111,9 +111,6 @@
<ion-fab-button (click)="bookMeeting()" color="light"> <ion-fab-button (click)="bookMeeting()" color="light">
<ion-icon name="calendar"></ion-icon> <ion-icon name="calendar"></ion-icon>
</ion-fab-button> </ion-fab-button>
<ion-fab-button (click)="addFileWebtrix()" color="light">
<ion-icon src="assets/icon/webtrix.svg"></ion-icon>
</ion-fab-button>
<ion-fab-button (click)="addFile()" color="light"> <ion-fab-button (click)="addFile()" color="light">
<ion-icon name="document"></ion-icon> <ion-icon name="document"></ion-icon>
</ion-fab-button> </ion-fab-button>
@@ -123,6 +120,9 @@
<ion-fab-button class="hide-desktop" (click)="takePicture()" color="light"> <ion-fab-button class="hide-desktop" (click)="takePicture()" color="light">
<ion-icon name="camera"></ion-icon> <ion-icon name="camera"></ion-icon>
</ion-fab-button> </ion-fab-button>
<ion-fab-button (click)="addFileWebtrix()" color="light">
<ion-icon src="assets/icon/webtrix.svg"></ion-icon>
</ion-fab-button>
</ion-fab-list> </ion-fab-list>
</ion-fab> </ion-fab>
@@ -380,10 +380,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
takePicture(){ takePicture(){
this.fileService.addCameraPictureToChat(this.roomId); const roomId = this.roomId
this.fileService.addCameraPictureToChat(roomId);
} }
addImage(){ addImage(){
this.fileService.addPictureToChat(this.roomId); const roomId = this.roomId
this.fileService.addPictureToChat(roomId);
} }
addFile(){ addFile(){
this.fileService.addDocumentToChat(this.roomId); this.fileService.addDocumentToChat(this.roomId);
@@ -75,13 +75,11 @@
<ion-buttons slot="start"> <ion-buttons slot="start">
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()"> <button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
<ion-label>Cancelar</ion-label> <ion-label>Cancelar</ion-label>
<ion-icon name="close" slot="start"></ion-icon>
</button> </button>
</ion-buttons> </ion-buttons>
<ion-buttons slot="end"> <ion-buttons slot="end">
<button class="btn-ok" fill="clear" color="#fff" (click)="save()"> <button class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>Gravar</ion-label> <ion-label>Gravar</ion-label>
<ion-icon name="checkmark" slot="start"></ion-icon>
</button> </button>
</ion-buttons> </ion-buttons>
</ion-toolbar> </ion-toolbar>
@@ -6,9 +6,9 @@
</div> </div>
<div class="buttons"> <div class="buttons">
<button (click)="takePicture()" full class="btn-ok" shape="round" >Tirar Fotografia</button> <button (click)="takePicture()" full class="btn-ok" shape="round" >Tirar Fotografia</button>
<button hidden (click)="notImplemented()" class="btn-ok" shape="round" >Digitalizar Documento</button> <button (click)="addFile()" class="btn-ok" shape="round" >Anexar Documento</button>
<button (click)="anexarFoto()" full class="btn-ok" shape="round" >Anexar Fotografia</button> <button hidden (click)="anexarFoto()" full class="btn-ok" shape="round" >Anexar Fotografia</button>
<button (click)="addDocGestaoDocumental()" class="btn-ok" shape="round" >Anexar Documento (G.D.)</button> <button (click)="addDocGestaoDocumental()" class="btn-ok" shape="round" >Gestão Documental</button>
<div class="solid"></div> <div class="solid"></div>
<button (click)="bookMeeting()" class="btn-ok" shape="round" >Novo Evento</button> <button (click)="bookMeeting()" class="btn-ok" shape="round" >Novo Evento</button>
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button> <button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
@@ -54,6 +54,15 @@ export class ChatOptionsPopoverPage implements OnInit {
} }
} }
addFile(){
if( window.innerWidth < 701){
this.popoverController.dismiss('add-document');
}
else{
this.modalController.dismiss('add-document');
}
}
anexarFoto(){ anexarFoto(){
if( window.innerWidth < 701){ if( window.innerWidth < 701){
this.popoverController.dismiss('add-picture'); this.popoverController.dismiss('add-picture');