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)">
|
2023-09-19 10:21:23 +01:00
|
|
|
|
2021-01-27 16:01:49 +01:00
|
|
|
<ion-refresher-content>
|
|
|
|
|
</ion-refresher-content>
|
|
|
|
|
</ion-refresher>
|
2023-07-06 12:18:15 +01:00
|
|
|
<div class="main-content d-flex height-100 border-t-radius viewport-font-size">
|
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> -->
|
2023-01-04 12:16:44 +01:00
|
|
|
<ion-progress-bar type="indeterminate" *ngIf="ChatSystemService.loadingWholeList"></ion-progress-bar>
|
2021-03-05 16:43:07 +01:00
|
|
|
<div class="title-content">
|
|
|
|
|
<div class="div-title">
|
2023-07-06 12:18:15 +01:00
|
|
|
<ion-label class="title font-25-em">Chat</ion-label>
|
2021-03-05 16:43:07 +01:00
|
|
|
</div>
|
|
|
|
|
<div class="div-icon">
|
2022-09-26 16:16:37 +01:00
|
|
|
|
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>
|
2022-10-20 15:45:10 +01:00
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="end" src="assets/images/theme/{{ThemeService.currentTheme}}/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>
|
2022-10-20 15:45:10 +01:00
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="end" src="assets/images/theme/{{ThemeService.currentTheme}}/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>
|
2022-07-27 14:18:45 +01:00
|
|
|
|
2024-06-04 16:21:11 +01:00
|
|
|
<ion-toolbar [class.block-button]="showNewEvent || showNewGroup || showContacts">
|
|
|
|
|
<ion-segment [(ngModel)]="segment" (ionChange)="onSegmentChange()">
|
|
|
|
|
<ion-segment-button value="Contactos" class="font-14-em">
|
|
|
|
|
Conversas
|
|
|
|
|
</ion-segment-button>
|
|
|
|
|
<ion-segment-button value="Grupos" class="font-14-em">
|
|
|
|
|
Grupos
|
|
|
|
|
</ion-segment-button>
|
|
|
|
|
</ion-segment>
|
|
|
|
|
</ion-toolbar>
|
2023-09-19 10:21:23 +01:00
|
|
|
|
2024-06-04 16:21:11 +01:00
|
|
|
<div class=" aside overflow-y-auto d-flex flex-wrap flex-grow-1">
|
|
|
|
|
<div class="width-100" [ngSwitch]="segment">
|
|
|
|
|
<ion-list *ngSwitchCase="'Contactos'">
|
2024-06-05 12:25:44 +01:00
|
|
|
<ion-item-sliding >
|
|
|
|
|
<div *ngFor="let group of ChatSystemService._group"
|
|
|
|
|
|
|
|
|
|
[class.item-active]="group.id ==idSelected"
|
|
|
|
|
class="item item-hover d-flex">
|
|
|
|
|
|
|
|
|
|
<div class="item-icon">
|
|
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && group.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.id == idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-group-chat-40-hover.svg"></ion-icon>
|
|
|
|
|
</div>
|
|
|
|
|
<div (click)="openGroupMessagesPage(group.id)" class="item-content flex-grow-1 cursor-pointer">
|
|
|
|
|
<div class="item-title-time">
|
|
|
|
|
<div class="item-title add-ellipsis" [class.item-title-active]="group.id ==idSelected">
|
|
|
|
|
<p class="font-15-em add-ellipsis mb-0 white-space-nowrap" [class.bold-message]="group.messageUnread == true">{{group.name.split('-').join(' ')}}</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-date font-13-em" [class.item-date-active]="group.id ==idSelected" *ngIf="group.lastMessage && !group.customFields.countDownDate">{{group.duration }}</div>
|
|
|
|
|
<div class="item-date font-13-em" [class.item-date-active]="group.id ==idSelected" *ngIf="group.customFields.countDownDate">{{group.countDownTime }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div *ngIf="group.lastMessage" class="item-description d-flex align-items-center" [class.item-description-active]="group.id ==idSelected">
|
|
|
|
|
<div class="item-message font-13-em add-ellipsis white-space-nowrap" *ngIf="group.otherUserType == false">{{group.lastMessage.u.name}} <span *ngIf="group.lastMessage.u.name">:</span> {{group.lastMessage.msg}} </div>
|
|
|
|
|
<div class="font-13-em" *ngIf="group.otherUserType == true">{{group.userThatIsTyping}} está escrever ...</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</ion-item-sliding>
|
|
|
|
|
</ion-list>
|
|
|
|
|
<ion-list *ngSwitchCase="'Grupos'">
|
2024-06-04 16:21:11 +01:00
|
|
|
<ion-item-sliding>
|
|
|
|
|
<div class="item item-hover width-100 d-flex ion-no-padding ion-no-margin"
|
|
|
|
|
*ngFor="let room of (items$ | async)"
|
|
|
|
|
[class.item-active]="room.id == idSelected">
|
|
|
|
|
<div class="item-icon">
|
|
|
|
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && room.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.id == idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-chat-40-hover.svg"></ion-icon>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
(click)="openMessagesPage(room.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.id == idSelected">
|
|
|
|
|
<ion-label >
|
|
|
|
|
<span >
|
|
|
|
|
<div >
|
|
|
|
|
<div class="font-15-em" [class.bold-message]="true">
|
|
|
|
|
{{room.roomName}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</span>
|
|
|
|
|
</ion-label>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="item-date font-13-em" [class.item-date-active]="room.id == idSelected">{{room.duration}}</div> -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div *ngIf="room.lastMessage" class="item-description d-flex align-items-center" [class.item-description-active]="room.id ==idSelected">
|
|
|
|
|
<div class="item-message font-13-em add-ellipsis white-space-nowrap" *ngIf="room.otherUserType == false"> {{room.lastMessage.msg}} </div>
|
|
|
|
|
<div class="font-13-em" *ngIf="room.otherUserType == true">está escrever ...</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</ion-item-sliding>
|
|
|
|
|
</ion-list>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- <button (click)="sendMsg()" style="height: 41px;">Send message</button> -->
|
|
|
|
|
</div>
|
2021-03-04 15:24:47 +01:00
|
|
|
</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"
|
2023-08-14 12:15:18 +01:00
|
|
|
[style.display]="showEmptyComponent && !showContacts && !showNewGroup && !showEditGroup && !showGroupContacts && !showGroupMessages && !showNewEvent ? 'flex' : 'none'"
|
2021-07-16 21:17:34 +01:00
|
|
|
#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)"
|
2022-10-11 14:18:55 +01:00
|
|
|
(backToChat)="backToChat($event)"
|
2022-07-27 16:12:46 +01:00
|
|
|
(emptyTextDescriptionOpen)="emptyTextDescriptionOpen()"
|
2022-10-13 14:37:03 +01:00
|
|
|
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
2021-07-26 12:12:59 +01:00
|
|
|
*ngIf="showContacts"
|
2022-10-11 14:18:55 +01:00
|
|
|
[roomId]="roomId"
|
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)"
|
2022-10-11 14:18:55 +01:00
|
|
|
[roomId]="roomId"
|
|
|
|
|
(backToChat)="backToChat($event)"
|
2022-07-27 16:12:46 +01:00
|
|
|
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
2022-09-28 16:33:13 +01:00
|
|
|
*ngIf="showNewGroup"
|
2023-09-19 10:21:23 +01:00
|
|
|
class=" height-100 flex-column d-flex">
|
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"
|
2022-10-13 14:37:03 +01:00
|
|
|
(backToChat)="backToChat($event)"
|
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
|
2022-09-30 15:13:36 +01:00
|
|
|
*ngIf="showGroupMessages && ChatSystemService.deleteRecently(roomId) == false"
|
2022-07-04 14:08:51 +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
|
2022-08-01 16:20:26 +01:00
|
|
|
*ngIf="showNewEvent"
|
2021-08-18 16:40:58 +01:00
|
|
|
[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"
|
2022-08-04 16:39:38 +01:00
|
|
|
(onAddEvent)="closeNewEventComponentAndOpenChat($event)"
|
2022-12-16 15:44:52 +01:00
|
|
|
(openAttendeesComponent)="openAttendeesComponent($event)"
|
2022-10-03 11:02:32 +01:00
|
|
|
(backToChat)="backToChat($event)"
|
2021-08-18 16:40:58 +01:00
|
|
|
[style.display]="showNewEvent ? 'flex' : 'none'"
|
|
|
|
|
class=" height-100 flex-column">
|
|
|
|
|
</app-new-event>
|
|
|
|
|
<app-attendee-modal
|
|
|
|
|
[adding]="adding"
|
|
|
|
|
[taskParticipants]="taskParticipants"
|
|
|
|
|
[taskParticipantsCc]="taskParticipantsCc"
|
2022-12-16 15:44:52 +01:00
|
|
|
(closeComponent)="openNewEventPage()"
|
2021-08-18 16:40:58 +01:00
|
|
|
(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>
|