2022-01-12 17:02:41 +01:00
|
|
|
<ion-header class="ion-no-border">
|
2021-03-04 18:50:26 +01:00
|
|
|
<ion-toolbar class="header-toolbar">
|
|
|
|
|
<div class="main-header">
|
|
|
|
|
<div class="header-top">
|
2022-01-14 12:38:51 +01:00
|
|
|
<div class="middle">
|
|
|
|
|
<ion-label class="title">{{ wsChatMethodsService.getDmRoom(roomId).name }}</ion-label>
|
|
|
|
|
<!-- <span><ion-icon class="{{users.status}}" name="ellipse"></ion-icon></span> -->
|
2021-03-04 18:50:26 +01:00
|
|
|
</div>
|
2021-08-20 15:08:36 +01:00
|
|
|
<div hidden class="right">
|
2022-01-19 12:32:29 +01:00
|
|
|
<button title="Menu" class="btn-no-color" (click)="_openMessagesOptions()">
|
2021-10-25 10:53:01 +01:00
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
|
2022-01-12 17:02:41 +01:00
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg">
|
|
|
|
|
</ion-icon>
|
2021-04-09 08:59:22 +01:00
|
|
|
</button>
|
2021-07-23 14:43:51 +01:00
|
|
|
</div>
|
2021-03-04 18:50:26 +01:00
|
|
|
</div>
|
2021-10-19 14:31:14 +01:00
|
|
|
<!-- <div *ngIf="frameUrl" class="width-100">
|
|
|
|
|
<iframe id="iframe" [src]="frameUrl" height="20%" width="100%" title="Iframe Example">
|
|
|
|
|
</iframe>
|
|
|
|
|
</div> -->
|
2021-03-18 16:30:03 +01:00
|
|
|
<div hidden class="header-bottom" (click)="addContacts()">
|
2021-03-04 18:50:26 +01:00
|
|
|
<div class="header-bottom-icon">
|
2021-10-25 13:21:48 +01:00
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/icon/icons-user.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/icon/theme/gov/icons-user.svg"></ion-icon>
|
2021-03-04 18:50:26 +01:00
|
|
|
</div>
|
|
|
|
|
<div class="header-bottom-contacts">
|
|
|
|
|
<ion-label class="text-color-blue">Adicionar contacto</ion-label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</ion-toolbar>
|
|
|
|
|
</ion-header>
|
|
|
|
|
|
|
|
|
|
<ion-content>
|
2022-01-12 17:02:41 +01:00
|
|
|
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
2021-03-04 18:50:26 +01:00
|
|
|
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
|
|
|
|
<ion-refresher-content>
|
|
|
|
|
</ion-refresher-content>
|
|
|
|
|
</ion-refresher>
|
|
|
|
|
<div class="messages" #scrollMe>
|
2022-01-28 15:59:01 +01:00
|
|
|
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of wsChatMethodsService.getDmRoom(roomId).messages; let last = last">
|
2021-12-22 10:31:10 +01:00
|
|
|
<div class='message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45' *ngIf="msg.msg !=''">
|
2021-09-24 15:39:25 +01:00
|
|
|
<div class="message-item-options d-flex justify-content-end">
|
2022-01-12 17:02:41 +01:00
|
|
|
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer">
|
|
|
|
|
</fa-icon>
|
2021-09-28 12:00:11 +01:00
|
|
|
<mat-menu #beforeMenu="matMenu" xPosition="before">
|
2022-02-10 18:07:06 +01:00
|
|
|
<button (click)="deleteMessage(msg._id)" class="menuButton">Apagar mensagem</button>
|
2021-09-28 12:00:11 +01:00
|
|
|
</mat-menu>
|
2021-09-24 15:39:25 +01:00
|
|
|
</div>
|
2021-03-12 17:35:54 +01:00
|
|
|
<div class="title">
|
2022-02-16 15:52:59 +01:00
|
|
|
<ion-label (click)="testEditMessage(msg)">{{msg.u.name}}</ion-label>
|
2022-02-10 15:50:11 +01:00
|
|
|
<span class="time">{{msg.duration}}</span>
|
2021-03-12 17:35:54 +01:00
|
|
|
</div>
|
2022-02-16 15:52:59 +01:00
|
|
|
<div class="d-flex justify-space-between">
|
|
|
|
|
<ion-label class="flex-0">{{msg.msg}}</ion-label>
|
|
|
|
|
<ion-label class="float-status-all float-status" >
|
|
|
|
|
<ion-icon *ngIf="!msg.offline && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="msg.offline && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="msg.viewed.length == 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
|
|
|
|
|
</ion-label>
|
2022-01-06 20:52:50 +01:00
|
|
|
{{last ? scrollToBottom() : ''}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-01-12 17:02:41 +01:00
|
|
|
|
2022-01-27 14:26:18 +01:00
|
|
|
<div *ngIf="msg.file">
|
|
|
|
|
<div class='message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45' *ngIf="msg.file.type != 'application/meeting'">
|
|
|
|
|
<div class="message-item-options d-flex justify-content-end">
|
|
|
|
|
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer">
|
|
|
|
|
</fa-icon>
|
|
|
|
|
<mat-menu #beforeMenu="matMenu" xPosition="before">
|
2022-02-10 18:07:06 +01:00
|
|
|
<button (click)="deleteMessage(msg._id)" class="menuButton">Apagar mensagem</button>
|
2022-01-27 14:26:18 +01:00
|
|
|
</mat-menu>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="title">
|
2022-02-09 14:39:59 +01:00
|
|
|
<ion-label>{{msg.u.name}} </ion-label>
|
2022-02-10 15:50:11 +01:00
|
|
|
<span class="time">{{msg.duration}}</span>
|
2022-01-27 14:26:18 +01:00
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<div *ngIf="msg.attachments" class="message-attachments">
|
|
|
|
|
<div *ngFor="let file of msg.attachments">
|
2022-01-28 13:25:28 +01:00
|
|
|
<div *ngIf="msg.file.type == 'application/img'" (click)="openPreview(msg)" dfsdvsvs>
|
2022-02-08 17:44:15 +01:00
|
|
|
<img src={{msg.attachments[0].image_url}} alt="image">
|
2022-02-16 15:52:59 +01:00
|
|
|
<ion-label class="float-status-image float-status-all">
|
|
|
|
|
<ion-icon *ngIf="!msg.offline && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="msg.offline && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="msg.viewed.length == 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
|
|
|
|
|
</ion-label>
|
2022-01-12 17:02:41 +01:00
|
|
|
</div>
|
2022-01-27 14:56:55 +01:00
|
|
|
<div *ngIf="msg.file.type != 'application/img'">
|
2022-01-27 14:26:18 +01:00
|
|
|
<div class="file">
|
|
|
|
|
<div (click)="viewDocument(msg, file.title_link)" class="file-details add-ellipsis cursor-pointer"
|
|
|
|
|
*ngIf="msg.file">
|
|
|
|
|
<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/word'" icon="file-word" class="word-icon"></fa-icon>
|
|
|
|
|
<fa-icon
|
|
|
|
|
*ngIf="msg.file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'"
|
|
|
|
|
icon="file-word" class="excel-icon"></fa-icon>
|
|
|
|
|
<ion-icon *ngIf="msg.file.type == 'application/webtrix'" src="assets/icon/webtrix.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="msg.file.type == 'application/meeting'" src="assets/icon/webtrix.svg"></ion-icon>
|
|
|
|
|
</span>
|
|
|
|
|
<ion-label class="file-title">{{file.title}}</ion-label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="file-details-optional">
|
|
|
|
|
<ion-label *ngIf="msg.file">
|
|
|
|
|
<span *ngIf="file.description">{{file.description}}</span>
|
|
|
|
|
<span *ngIf="file.description && msg.file.type != 'application/webtrix'"> • </span>
|
|
|
|
|
<span
|
2022-02-04 00:22:35 +01:00
|
|
|
*ngIf="msg.file.type != 'application/webtrix'">{{msg.displayType}}</span>
|
2022-01-27 14:26:18 +01:00
|
|
|
</ion-label>
|
2022-02-16 15:52:59 +01:00
|
|
|
<ion-label class="float-status-webtrix float-status-all">
|
|
|
|
|
<ion-icon *ngIf="!msg.offline && msg.viewed.length == 0" src="assets/images/check-double-solid.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="msg.offline && msg.viewed.length == 0" src="assets/images/check-solid.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="msg.viewed.length == 1" src="assets/images/check-double-solid -viewed.svg"></ion-icon>
|
|
|
|
|
</ion-label>
|
2022-01-27 14:26:18 +01:00
|
|
|
</div>
|
2021-09-21 14:05:59 +01:00
|
|
|
</div>
|
2022-01-06 20:52:50 +01:00
|
|
|
</div>
|
2021-09-21 14:05:59 +01:00
|
|
|
</div>
|
2022-01-27 14:26:18 +01:00
|
|
|
{{last ? scrollToBottom() : ''}}
|
2021-09-21 14:05:59 +01:00
|
|
|
</div>
|
2021-03-12 17:35:54 +01:00
|
|
|
</div>
|
2022-01-27 14:26:18 +01:00
|
|
|
<div class="info-meeting" *ngIf="msg.file.type == 'application/meeting'">
|
|
|
|
|
<ion-label class="info-meeting-small">{{msg.u.name}} criou esta reunião</ion-label><br />
|
|
|
|
|
<button (click)="goToEvent(msg.file.id)" class="btn-no-color info-meeting-normal">
|
|
|
|
|
<ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label>
|
|
|
|
|
</button><br />
|
|
|
|
|
<ion-label class="info-meeting-medium">
|
|
|
|
|
<ion-icon name="calendar-outline"></ion-icon> De {{showDateDuration(msg.file.start_date)}} a
|
|
|
|
|
{{showDateDuration(msg.file.end_date)}}
|
|
|
|
|
</ion-label><br />
|
|
|
|
|
<ion-label class="info-meeting-medium">
|
|
|
|
|
<ion-icon></ion-icon>
|
|
|
|
|
<ion-icon name="location-outline"></ion-icon> {{msg.file.venue}}
|
|
|
|
|
</ion-label><br />
|
|
|
|
|
</div>
|
2021-03-04 18:50:26 +01:00
|
|
|
</div>
|
2022-01-12 17:02:41 +01:00
|
|
|
|
2022-01-27 14:26:18 +01:00
|
|
|
<!-- <div class='message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45' *ngIf="msg.msg ==''">
|
2022-01-20 14:31:49 +01:00
|
|
|
<div *ngIf="msg.file">
|
|
|
|
|
<div *ngIf="msg.file.type == 'application/img'">
|
|
|
|
|
<div class="message-item-options d-flex justify-content-end">
|
|
|
|
|
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer">
|
|
|
|
|
</fa-icon>
|
|
|
|
|
<mat-menu #beforeMenu="matMenu" xPosition="before">
|
|
|
|
|
<button (click)="deleteMessage(msg._id)" class="menuButton">Apagar mensagem</button>
|
|
|
|
|
</mat-menu>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="title">
|
|
|
|
|
<ion-label>{{msg.u.name}}</ion-label>
|
2022-02-10 15:50:11 +01:00
|
|
|
<span class="time">{{msg.duration}}</span>
|
2022-01-20 14:31:49 +01:00
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<ion-label>{{msg.msg}}</ion-label>
|
|
|
|
|
<div *ngIf="msg.file" class="message-attachments">
|
|
|
|
|
<div>
|
|
|
|
|
<div (click)="openPreview(msg)">
|
2022-01-20 15:33:55 +01:00
|
|
|
File
|
2022-02-08 17:44:15 +01:00
|
|
|
<img *ngIf="msg.attachments[0].image_url" src="{{msg.attachments[0].image_url}}" alt="image">
|
2022-01-20 14:31:49 +01:00
|
|
|
</div>
|
2022-01-12 17:02:41 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-01-20 14:31:49 +01:00
|
|
|
{{last ? scrollToBottom() : ''}}
|
2022-01-12 17:02:41 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-01-27 14:26:18 +01:00
|
|
|
</div> -->
|
2022-01-12 17:02:41 +01:00
|
|
|
|
|
|
|
|
|
2022-01-27 14:26:18 +01:00
|
|
|
<!-- <div *ngIf="msg.file">
|
2022-01-06 20:52:50 +01:00
|
|
|
<div class="info-meeting" *ngIf="msg.file.type == 'application/meeting'">
|
2021-12-22 10:31:10 +01:00
|
|
|
<ion-label class="info-meeting-small">{{msg.u.name}} criou esta reunião</ion-label><br />
|
2022-01-12 17:02:41 +01:00
|
|
|
<button (click)="goToEvent(msg.file.id)" class="btn-no-color info-meeting-normal">
|
|
|
|
|
<ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label>
|
|
|
|
|
</button><br />
|
|
|
|
|
<ion-label class="info-meeting-medium">
|
|
|
|
|
<ion-icon name="calendar-outline"></ion-icon> De {{showDateDuration(msg.file.start_date)}} a
|
|
|
|
|
{{showDateDuration(msg.file.end_date)}}
|
|
|
|
|
</ion-label><br />
|
|
|
|
|
<ion-label class="info-meeting-medium">
|
|
|
|
|
<ion-icon></ion-icon>
|
|
|
|
|
<ion-icon name="location-outline"></ion-icon> {{msg.file.venue}}
|
|
|
|
|
</ion-label><br />
|
2021-12-22 10:31:10 +01:00
|
|
|
</div>
|
|
|
|
|
{{last ? scrollToBottom() : ''}}
|
2022-01-27 14:26:18 +01:00
|
|
|
</div> -->
|
2021-03-04 18:50:26 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-09-24 15:39:25 +01:00
|
|
|
<ion-fab horizontal="end" vertical="bottom" slot="fixed">
|
|
|
|
|
<ion-fab-button *ngIf="scrollToBottomBtn" (click)="scrollToBottomClicked()" color="light" size="small">
|
|
|
|
|
<ion-icon name="chevron-down"></ion-icon>
|
|
|
|
|
</ion-fab-button>
|
|
|
|
|
</ion-fab>
|
2021-03-04 18:50:26 +01:00
|
|
|
|
|
|
|
|
</ion-content>
|
2021-03-12 11:56:54 +01:00
|
|
|
|
|
|
|
|
|
2021-03-04 18:50:26 +01:00
|
|
|
<ion-footer>
|
2021-03-12 17:35:54 +01:00
|
|
|
<div class="container width-100 d-flex">
|
|
|
|
|
<div>
|
2021-10-06 17:27:49 +01:00
|
|
|
<!-- <button class="btn-no-color" (click)="openSendMessageOptions()">
|
2021-10-25 13:21:48 +01:00
|
|
|
<ion-icon class="chat-icon-options" src="assets/images/icons-add.svg"></ion-icon>
|
2021-10-06 17:27:49 +01:00
|
|
|
</button> -->
|
|
|
|
|
|
|
|
|
|
<ion-fab horizontal="start" vertical="bottom" slot="fixed">
|
|
|
|
|
<ion-fab-button color="light" size="small">
|
|
|
|
|
<ion-icon name="add"></ion-icon>
|
|
|
|
|
</ion-fab-button>
|
|
|
|
|
<ion-fab-list side="top">
|
2022-01-19 12:32:29 +01:00
|
|
|
<ion-fab-button title="Nova Reunião" (click)="bookMeeting()" color="light">
|
2021-10-06 17:27:49 +01:00
|
|
|
<ion-icon name="calendar"></ion-icon>
|
|
|
|
|
</ion-fab-button>
|
2022-02-09 15:06:54 +01:00
|
|
|
<ion-fab-button title="Adicionar Documento" (click)="addFile()" color="light">
|
2021-10-06 17:27:49 +01:00
|
|
|
<ion-icon name="document"></ion-icon>
|
2021-12-23 07:40:01 +01:00
|
|
|
</ion-fab-button>
|
2022-01-24 15:21:37 +01:00
|
|
|
<ion-fab-button title="Anexar Fotografia" (click)="addImage()" color="light">
|
2021-10-06 17:27:49 +01:00
|
|
|
<ion-icon name="image"></ion-icon>
|
2021-12-23 07:40:01 +01:00
|
|
|
</ion-fab-button>
|
2022-02-09 14:34:23 +01:00
|
|
|
<ion-fab-button title="Tirar Fotografia" (click)="takePictureMobile()" color="light">
|
2021-10-06 17:27:49 +01:00
|
|
|
<ion-icon name="camera"></ion-icon>
|
2021-12-23 07:40:01 +01:00
|
|
|
</ion-fab-button>
|
2022-01-24 15:21:37 +01:00
|
|
|
<ion-fab-button title="Documento da Gestão Documental" (click)="addFileWebtrix()" color="light">
|
2021-10-07 15:30:36 +01:00
|
|
|
<ion-icon src="assets/icon/webtrix.svg"></ion-icon>
|
|
|
|
|
</ion-fab-button>
|
2021-10-06 17:27:49 +01:00
|
|
|
</ion-fab-list>
|
|
|
|
|
</ion-fab>
|
2021-03-12 17:35:54 +01:00
|
|
|
</div>
|
2021-12-14 23:04:03 +01:00
|
|
|
|
|
|
|
|
<div class="width-100">
|
2021-03-12 17:35:54 +01:00
|
|
|
<ion-item class="ion-no-padding type-message" lines="none">
|
2022-01-12 17:02:41 +01:00
|
|
|
<ion-textarea (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem"
|
2022-02-10 16:14:25 +01:00
|
|
|
class="message-input" rows="1" [(ngModel)]="wsChatMethodsService.getDmRoom(roomId).message" (ionChange)="wsChatMethodsService.getDmRoom(roomId).sendTyping()"></ion-textarea>
|
2021-07-26 10:48:34 +01:00
|
|
|
<button hidden class="btn-no-color" (click)="notImplemented()">
|
2021-04-13 14:14:55 +01:00
|
|
|
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
|
|
|
|
|
</button>
|
2021-03-12 17:35:54 +01:00
|
|
|
</ion-item>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
2022-01-28 16:15:20 +01:00
|
|
|
<button *ngIf="wsChatMethodsService.getDmRoom(roomId).message" class="btn-no-color" (click)="sendMessage()">
|
2022-01-12 17:02:41 +01:00
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send"
|
|
|
|
|
src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send"
|
|
|
|
|
src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
2021-04-12 00:22:47 +01:00
|
|
|
</button>
|
2022-01-28 16:15:20 +01:00
|
|
|
<button *ngIf="!wsChatMethodsService.getDmRoom(roomId).message" class="btn-no-color">
|
2022-01-12 17:02:41 +01:00
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send"
|
|
|
|
|
src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send"
|
|
|
|
|
src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
2021-04-09 08:59:22 +01:00
|
|
|
</button>
|
2021-03-12 17:35:54 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-01-24 15:21:37 +01:00
|
|
|
</ion-footer>
|