2021-03-04 18:50:26 +01:00
|
|
|
<ion-header class="ion-no-border">
|
|
|
|
|
<app-header></app-header>
|
2020-12-16 15:07:28 +01:00
|
|
|
</ion-header>
|
2020-09-10 09:48:37 +01:00
|
|
|
|
2021-12-10 16:08:36 +01:00
|
|
|
<ion-content class="height-100 container-wrapper">
|
2021-08-19 18:54:50 +01:00
|
|
|
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
2022-01-12 12:44:51 +01:00
|
|
|
<ion-progress-bar type="indeterminate" *ngIf="wsChatMethodsService.loadingWholeList"></ion-progress-bar>
|
2021-01-27 16:01:49 +01:00
|
|
|
<ion-refresher-content>
|
|
|
|
|
</ion-refresher-content>
|
|
|
|
|
</ion-refresher>
|
2021-11-16 16:00:14 +01:00
|
|
|
<div class="main-content d-flex height-100 border-t-radius">
|
2021-03-05 11:58:59 +01:00
|
|
|
<!-- Aside left -->
|
2021-07-30 13:49:31 +01:00
|
|
|
<div class="aside-wrapper d-flex flex-column flex-grow-1">
|
2021-03-05 16:43:07 +01:00
|
|
|
<!-- <p class="text-center mt-0 aside-title px-20">Chat</p> -->
|
|
|
|
|
<div class="title-content">
|
|
|
|
|
<div class="div-title">
|
|
|
|
|
<ion-label class="title">Chat</ion-label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="div-icon">
|
2022-01-19 12:32:29 +01:00
|
|
|
<button title="Nova Conversa Individual" class="btn-no-color" (click)="openContactsPage()">
|
2021-11-16 16:00:14 +01:00
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-conversation.svg"></ion-icon>
|
2021-04-09 08:59:22 +01:00
|
|
|
</button>
|
2022-01-19 12:32:29 +01:00
|
|
|
<button title="Novo Grupo" class="btn-no-color" (click)="openNewGroupPage()">
|
2021-11-16 16:00:14 +01:00
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-group.svg" ></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-group.svg" ></ion-icon>
|
2021-04-09 08:59:22 +01:00
|
|
|
</button>
|
2021-03-05 16:43:07 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<ion-toolbar>
|
2021-03-04 15:24:47 +01:00
|
|
|
<ion-segment [(ngModel)]="segment" (ionChange)="onSegmentChange()">
|
|
|
|
|
<ion-segment-button value="Contactos">
|
|
|
|
|
Conversas
|
|
|
|
|
</ion-segment-button>
|
|
|
|
|
<ion-segment-button value="Grupos">
|
|
|
|
|
Grupos
|
|
|
|
|
</ion-segment-button>
|
|
|
|
|
</ion-segment>
|
|
|
|
|
</ion-toolbar>
|
2021-07-26 22:51:13 +01:00
|
|
|
<div class=" aside overflow-y-auto d-flex flex-wrap flex-grow-1">
|
2021-03-05 11:58:59 +01:00
|
|
|
<div class="width-100" [ngSwitch]="segment">
|
2021-03-04 15:24:47 +01:00
|
|
|
<ion-list *ngSwitchCase="'Contactos'">
|
2022-01-11 13:03:43 +01:00
|
|
|
<ion-item-sliding>
|
|
|
|
|
<div class="item item-hover width-100 d-flex ion-no-padding ion-no-margin"
|
2022-01-12 12:44:51 +01:00
|
|
|
*ngFor="let room of wsChatMethodsService.dm | keyvalue"
|
2022-01-11 13:03:43 +01:00
|
|
|
[class.item-active]="room.value.id == idSelected">
|
|
|
|
|
<div class="item-icon">
|
|
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && room.value.id != idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-chat-40.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && room.value.id == idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-chat-40-hover.svg"></ion-icon>
|
|
|
|
|
</div>
|
|
|
|
|
<div [class.highlight]="room.value.id =='cjFv5XfreKz5j3fWW'"
|
|
|
|
|
(click)="openMessagesPage(room.value.id)"
|
|
|
|
|
class="item-content flex-grow-1 cursor-pointer"><!-- (click)="openMessages(dm)" -->
|
|
|
|
|
<div class="item-title-time">
|
|
|
|
|
<div class="item-title" [class.item-title-active]="room.value.id == idSelected">
|
|
|
|
|
<ion-label >
|
|
|
|
|
<span >
|
|
|
|
|
<div >
|
|
|
|
|
<div >
|
|
|
|
|
{{room.value.name}}
|
2021-08-19 18:54:50 +01:00
|
|
|
</div>
|
2022-01-11 13:03:43 +01:00
|
|
|
</div>
|
|
|
|
|
</span>
|
2021-09-27 10:53:57 +01:00
|
|
|
</ion-label>
|
2021-03-04 15:24:47 +01:00
|
|
|
</div>
|
2022-01-11 20:56:21 +01:00
|
|
|
<div class="item-date" [class.item-date-active]="room.value.id == idSelected">{{room.value.duration}}</div>
|
2022-01-11 13:03:43 +01:00
|
|
|
</div>
|
|
|
|
|
<div *ngIf="room.value.lastMessage" class="item-description" [class.item-description-active]="room.value.id == idSelected">
|
|
|
|
|
<ion-label *ngIf="room.value.lastMessage">{{room.value.lastMessage.msg}}</ion-label>
|
|
|
|
|
<ion-label *ngIf="room.value.lastMessage.file">
|
|
|
|
|
<fa-icon *ngIf="room.value.lastMessage.file.type != 'application/meeting'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="room.value.id == idSelected"></fa-icon>
|
|
|
|
|
<fa-icon *ngIf="room.value.lastMessage.file.type == 'application/meeting'" icon="calendar-alt" class="file-icon" [class.set-active-item-font-to-white]="room.value.id == idSelected"></fa-icon>
|
|
|
|
|
<span> {{room.value.lastMessage.file.name || room.value.lastMessage.file.subject }}</span>
|
|
|
|
|
</ion-label>
|
|
|
|
|
<ion-label *ngIf="room.value.lastMessage.attachments">
|
|
|
|
|
<div *ngIf="room.value.lastMessage.attachments[0].image_url">
|
|
|
|
|
<fa-icon icon="image" class="file-icon" [class.set-active-item-font-to-white]="room.value.id == idSelected"></fa-icon>
|
|
|
|
|
<span> Fotografia</span>
|
|
|
|
|
</div>
|
2022-01-12 14:48:17 +01:00
|
|
|
</ion-label>
|
2021-03-04 15:24:47 +01:00
|
|
|
</div>
|
2021-07-27 00:01:38 +01:00
|
|
|
</div>
|
2022-01-11 13:03:43 +01:00
|
|
|
</div>
|
|
|
|
|
</ion-item-sliding>
|
2022-01-12 12:44:51 +01:00
|
|
|
<ion-item-sliding *ngIf=" wsChatMethodsService.dmCount < 1">
|
2022-01-11 13:03:43 +01:00
|
|
|
<div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin">
|
|
|
|
|
<div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-chat-grey.svg"></ion-icon></div>
|
|
|
|
|
<div class="item-content flex-grow-1 cursor-pointer">
|
|
|
|
|
<div class="item-title-time">
|
|
|
|
|
<div class="item-title"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></div>
|
|
|
|
|
<div class="item-date"><ion-skeleton-text animated></ion-skeleton-text></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-description d-flex align-items-center">
|
|
|
|
|
<fa-icon icon="file-alt" class="file-icon"></fa-icon>
|
|
|
|
|
<ion-skeleton-text animated style="width: 95%; margin-left:5%"></ion-skeleton-text>
|
2021-12-17 16:54:18 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-01-11 13:03:43 +01:00
|
|
|
</div>
|
|
|
|
|
</ion-item-sliding>
|
2021-03-04 15:24:47 +01:00
|
|
|
</ion-list>
|
2021-09-07 15:19:56 +01:00
|
|
|
<ion-list *ngSwitchCase="'Grupos'">
|
2022-01-12 14:48:17 +01:00
|
|
|
<ion-item-sliding *ngIf="!wsChatMethodsService.loadingWholeList">
|
|
|
|
|
<div *ngFor="let group of wsChatMethodsService.group | keyvalue"
|
|
|
|
|
[class.item-active]="group.value.id ==idSelected"
|
2021-09-01 09:38:05 +01:00
|
|
|
class="item item-hover d-flex">
|
2021-03-04 15:24:47 +01:00
|
|
|
<div class="item-icon">
|
2021-11-16 16:00:14 +01:00
|
|
|
<!-- <ion-icon class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon> -->
|
|
|
|
|
|
|
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon>
|
2022-01-12 14:48:17 +01:00
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && group.value.id != idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-group-chat-40.svg"></ion-icon>
|
|
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && group.value.id == idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-group-chat-40-hover.svg"></ion-icon>
|
2021-03-04 15:24:47 +01:00
|
|
|
</div>
|
2021-07-27 00:01:38 +01:00
|
|
|
<div
|
2022-01-12 14:48:17 +01:00
|
|
|
(click)="openGroupMessagesPage(group.value.id)" class="item-content flex-grow-1 cursor-pointer">
|
2021-03-04 15:24:47 +01:00
|
|
|
<div class="item-title-time">
|
2022-01-12 14:48:17 +01:00
|
|
|
<div class="item-title" [class.item-title-active]="group.value.id ==idSelected">
|
2022-01-13 21:24:43 +01:00
|
|
|
<ion-label>{{group.value.name.split('-').join(' ')}}</ion-label>
|
2021-03-04 15:24:47 +01:00
|
|
|
</div>
|
2022-01-13 21:24:43 +01:00
|
|
|
<div class="item-date" [class.item-date-active]="group.value.id ==idSelected" *ngIf="group.value.lastMessage && !group.value.customFields.countDownDate">{{group.value.duration}}</div>
|
|
|
|
|
<div class="item-date" [class.item-date-active]="group.value.id ==idSelected" *ngIf="group.value.customFields.countDownDate">{{countDownDate(group.value.customFields.countDownDate, group.value.id)}}</div>
|
2021-03-04 15:24:47 +01:00
|
|
|
</div>
|
2022-01-13 21:24:43 +01:00
|
|
|
<div *ngIf="group.value.lastMessage" class="item-description d-flex align-items-center" [class.item-description-active]="group.value.id ==idSelected">
|
|
|
|
|
<div class="item-message">{{group.value.lastMessage.u.name}}: {{group.value.lastMessage.msg}} </div>
|
|
|
|
|
<div class="item-files add-ellipsis" *ngIf="group.value.file">
|
2022-01-12 14:48:17 +01:00
|
|
|
<fa-icon *ngIf="group.value.lastMessage.file.type != 'application/meeting'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="group.value.id == idSelected"></fa-icon>
|
|
|
|
|
<fa-icon *ngIf="group.value.lastMessage.file.type == 'application/meeting'" icon="calendar-alt" class="file-icon" [class.set-active-item-font-to-white]="group.value.id == idSelected"></fa-icon>
|
2022-01-13 21:24:43 +01:00
|
|
|
<span class="item-files-title"> {{group.value.lastMessage.file.name || group.value.file.subject}}</span>
|
2021-09-27 12:09:33 +01:00
|
|
|
</div>
|
2022-01-13 21:24:43 +01:00
|
|
|
<div class="item-files" *ngIf="group.value.attachments">
|
2022-01-12 14:48:17 +01:00
|
|
|
<div *ngIf="group.value.value.lastMessage.attachments[0].image_url">
|
|
|
|
|
<fa-icon icon="image" class="file-icon" [class.set-active-item-font-to-white]="group.value.id == idSelected"></fa-icon>
|
2021-09-27 12:09:33 +01:00
|
|
|
<span> Fotografia</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-01-13 21:24:43 +01:00
|
|
|
</div>
|
2021-03-04 15:24:47 +01:00
|
|
|
</div>
|
2021-07-22 17:11:41 +01:00
|
|
|
</div>
|
2021-03-04 15:24:47 +01:00
|
|
|
</ion-item-sliding>
|
2022-01-13 21:24:43 +01:00
|
|
|
<ion-item-sliding *ngIf="wsChatMethodsService.loadingWholeList || wsChatMethodsService.groupCount < 1">
|
2021-12-17 16:54:18 +01:00
|
|
|
<div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin">
|
|
|
|
|
<div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-group-chat-grey.svg"></ion-icon></div>
|
|
|
|
|
<div class="item-content flex-grow-1 cursor-pointer">
|
|
|
|
|
<div class="item-title-time">
|
|
|
|
|
<div class="item-title"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></div>
|
|
|
|
|
<div class="item-date"><ion-skeleton-text animated></ion-skeleton-text></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-description d-flex align-items-center">
|
|
|
|
|
<fa-icon icon="file-alt" class="file-icon"></fa-icon>
|
|
|
|
|
<ion-skeleton-text animated style="width: 95%; margin-left:5%"></ion-skeleton-text>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</ion-item-sliding>
|
2021-12-10 16:08:36 +01:00
|
|
|
|
2021-03-04 15:24:47 +01:00
|
|
|
</ion-list>
|
|
|
|
|
</div>
|
2021-12-17 16:54:18 +01:00
|
|
|
|
2021-07-22 17:11:41 +01:00
|
|
|
<!-- <button (click)="sendMsg()" style="height: 41px;">Send message</button> -->
|
2021-03-04 15:24:47 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-03-05 11:58:59 +01:00
|
|
|
<!-- Aside right -->
|
2021-03-11 16:21:09 +01:00
|
|
|
<div class="aside-content d-none flex-column height-100">
|
2021-12-22 10:31:10 +01:00
|
|
|
|
2021-07-22 17:11:41 +01:00
|
|
|
<app-empty-chat [texto]="emptyTextDescription"
|
|
|
|
|
class="height-100 flex-column"
|
2021-07-16 21:17:34 +01:00
|
|
|
[style.display]="showEmptyComponent ? 'flex' : 'none'"
|
|
|
|
|
#messagecontainer>
|
2021-04-16 11:25:10 +01:00
|
|
|
</app-empty-chat>
|
2021-12-22 10:31:10 +01:00
|
|
|
|
2021-07-22 17:11:41 +01:00
|
|
|
<app-messages class=" height-100 flex-column"
|
2021-07-26 12:12:59 +01:00
|
|
|
*ngIf="showMessages"
|
|
|
|
|
[style.display]="showMessages ? 'flex' : 'none'"
|
2021-07-26 13:01:13 +01:00
|
|
|
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
|
|
|
|
(showEmptyContainer)="showEmptyContainer()"
|
2021-08-20 11:58:28 +01:00
|
|
|
(showEmptyContainer)="showEmptyContainer()"
|
|
|
|
|
(openNewEventPage)="openNewEventPage($event)"
|
2021-07-26 13:01:13 +01:00
|
|
|
[style.display]="showMessages ? 'flex' : 'none'"
|
2021-07-26 19:31:19 +01:00
|
|
|
[roomId]="roomId"
|
|
|
|
|
[showMessages]="showMessages" #messagecontainer>
|
2021-07-26 22:51:13 +01:00
|
|
|
|
2021-04-16 11:25:10 +01:00
|
|
|
</app-messages>
|
2021-08-18 16:40:58 +01:00
|
|
|
|
2021-07-22 17:11:41 +01:00
|
|
|
<app-contacts
|
|
|
|
|
(openMessage)="openMessagesPage($event)"
|
2021-07-26 12:12:59 +01:00
|
|
|
*ngIf="showContacts"
|
2021-07-16 21:17:34 +01:00
|
|
|
[style.display]="showContacts ? 'flex' : 'none'"
|
|
|
|
|
class=" height-100 flex-column">
|
2021-04-16 11:25:10 +01:00
|
|
|
</app-contacts>
|
2021-08-18 16:40:58 +01:00
|
|
|
|
2021-07-22 17:11:41 +01:00
|
|
|
<app-new-group
|
|
|
|
|
(addGroupMessage)="openGroupContactsPage($event)"
|
2021-07-16 21:17:34 +01:00
|
|
|
[style.display]="showNewGroup ? 'flex' : 'none'"
|
|
|
|
|
class=" height-100 flex-column">
|
2021-04-16 11:25:10 +01:00
|
|
|
</app-new-group>
|
2021-08-18 16:40:58 +01:00
|
|
|
|
2021-04-16 11:25:10 +01:00
|
|
|
<app-edit-group [roomId]="roomId"
|
|
|
|
|
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
2021-07-16 21:17:34 +01:00
|
|
|
(openGroupMessage)="openGroupMessagesPage($event)"
|
2021-07-26 12:12:59 +01:00
|
|
|
*ngIf="showEditGroup"
|
2021-07-16 21:17:34 +01:00
|
|
|
[style.display]="showEditGroup ? 'flex' : 'none'"
|
|
|
|
|
class="height-100 flex-column">
|
2021-04-16 11:25:10 +01:00
|
|
|
</app-edit-group>
|
2021-08-18 16:40:58 +01:00
|
|
|
|
2021-07-22 17:11:41 +01:00
|
|
|
<app-group-contacts
|
|
|
|
|
(openGroupMessage)="openGroupMessagesPage($event)"
|
2021-07-26 12:12:59 +01:00
|
|
|
*ngIf="showGroupContacts"
|
2021-07-16 21:17:34 +01:00
|
|
|
[style.display]="showGroupContacts ? 'flex' : 'none'"
|
2021-07-22 17:11:41 +01:00
|
|
|
[roomId]="groupRoomId" class=" height-100 flex-column"
|
2021-07-16 21:17:34 +01:00
|
|
|
>
|
2021-04-16 11:25:10 +01:00
|
|
|
</app-group-contacts>
|
2021-08-18 16:40:58 +01:00
|
|
|
|
2021-04-15 23:57:14 +01:00
|
|
|
<app-group-messages
|
2021-07-26 12:12:59 +01:00
|
|
|
*ngIf="showGroupMessages"
|
2021-07-16 21:17:34 +01:00
|
|
|
[style.display]="showEmptyComponent ? 'flex' : 'none'"
|
2021-04-15 23:57:14 +01:00
|
|
|
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
|
|
|
|
(showEmptyContainer)="showEmptyContainer()"
|
2021-04-16 11:25:10 +01:00
|
|
|
(openGroupContacts)="openGroupContactsPage($event)"
|
|
|
|
|
(openEditGroupPage)="openEditGroupPage($event)"
|
2021-08-18 16:40:58 +01:00
|
|
|
(openNewEventPage)="openNewEventPage($event)"
|
2021-08-30 18:56:37 +01:00
|
|
|
(getGroups)="getGroups($event)"
|
2021-07-16 21:17:34 +01:00
|
|
|
[style.display]="showGroupMessages ? 'flex' : 'none'"
|
2021-07-22 17:11:41 +01:00
|
|
|
class=" height-100 flex-column"
|
2021-04-16 11:25:10 +01:00
|
|
|
[roomId]="roomId" #messagecontainer>
|
|
|
|
|
</app-group-messages>
|
2021-08-18 16:40:58 +01:00
|
|
|
|
|
|
|
|
<app-new-event
|
|
|
|
|
[profile]=""
|
2021-12-22 10:31:10 +01:00
|
|
|
[roomId]="groupRoomId"
|
2021-08-18 16:40:58 +01:00
|
|
|
[selectedSegment]=segment
|
|
|
|
|
[taskParticipants]="taskParticipants"
|
|
|
|
|
[taskParticipantsCc]="taskParticipantsCc"
|
|
|
|
|
[selectedDate]="eventSelectedDate"
|
|
|
|
|
[eventAttendees]="contacts"
|
|
|
|
|
(onAddEvent)="closeNewEventComponent()"
|
|
|
|
|
(openAttendeesComponent)="openAttendeesComponent($event)"
|
|
|
|
|
(cloneAllmobileComponent)="closeNewEventComponent()"
|
|
|
|
|
[style.display]="showNewEvent ? 'flex' : 'none'"
|
|
|
|
|
class=" height-100 flex-column">
|
|
|
|
|
</app-new-event>
|
|
|
|
|
|
|
|
|
|
<app-attendee-modal
|
|
|
|
|
[adding]="adding"
|
|
|
|
|
[taskParticipants]="taskParticipants"
|
|
|
|
|
[taskParticipantsCc]="taskParticipantsCc"
|
|
|
|
|
(closeComponent)="closeAttendeesComponent()"
|
|
|
|
|
(setIntervenient)="setIntervenient($event)"
|
|
|
|
|
(setIntervenientCC)="setIntervenientCC($event)"
|
|
|
|
|
(setContact)="setContact($event)"
|
|
|
|
|
[style.display]="showAttendees ? 'flex' : 'none'"
|
|
|
|
|
[footer]="true"
|
|
|
|
|
class=" height-100 flex-column">
|
|
|
|
|
</app-attendee-modal>
|
|
|
|
|
|
2021-03-04 15:24:47 +01:00
|
|
|
</div>
|
2020-10-30 15:22:35 +01:00
|
|
|
</div>
|
2020-09-10 09:48:37 +01:00
|
|
|
</ion-content>
|