mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
271 lines
16 KiB
HTML
271 lines
16 KiB
HTML
<ion-header class="ion-no-border">
|
|
<app-header></app-header>
|
|
</ion-header>
|
|
|
|
<ion-content class="height-100 container-wrapper">
|
|
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
|
<ion-progress-bar type="indeterminate" *ngIf="wsChatMethodsService.loadingWholeList"></ion-progress-bar>
|
|
<ion-refresher-content>
|
|
</ion-refresher-content>
|
|
</ion-refresher>
|
|
<div class="main-content d-flex height-100 border-t-radius">
|
|
<!-- Aside left -->
|
|
<div class="aside-wrapper d-flex flex-column flex-grow-1">
|
|
<!-- <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">
|
|
<button title="Nova Conversa Individual" class="btn-no-color" (click)="openContactsPage()">
|
|
<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>
|
|
</button>
|
|
<button title="Novo Grupo" class="btn-no-color" (click)="openNewGroupPage()">
|
|
<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>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<ion-toolbar>
|
|
<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>
|
|
<div class=" aside overflow-y-auto d-flex flex-wrap flex-grow-1">
|
|
<div class="width-100" [ngSwitch]="segment">
|
|
<ion-list *ngSwitchCase="'Contactos'">
|
|
<ion-item-sliding>
|
|
<div class="item item-hover width-100 d-flex ion-no-padding ion-no-margin"
|
|
*ngFor="let room of wsChatMethodsService._dm"
|
|
[class.item-active]="room.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.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 [class.highlight]="room.id =='cjFv5XfreKz5j3fWW'"
|
|
(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 >
|
|
{{room.name}}
|
|
</div>
|
|
</div>
|
|
</span>
|
|
</ion-label>
|
|
</div>
|
|
<div class="item-date" [class.item-date-active]="room.id == idSelected">{{room.duration}}</div>
|
|
</div>
|
|
<div *ngIf="room.lastMessage" class="item-description" [class.item-description-active]="room.id == idSelected">
|
|
|
|
<ion-label *ngIf="room.lastMessage && room.otherUserType == false">{{room.lastMessage.msg}}</ion-label>
|
|
<ion-label *ngIf="room.otherUserType == true">está escrever...</ion-label>
|
|
<!-- <ion-label *ngIf="room.lastMessage.file">
|
|
<fa-icon *ngIf="room.lastMessage.file.type != 'application/meeting'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="room.id == idSelected"></fa-icon>
|
|
</ion-label> -->
|
|
|
|
<div *ngIf="room.lastMessage.file">
|
|
<fa-icon *ngIf="room.lastMessage.file.type != 'application/meeting' && room.lastMessage.file.type != 'application/img' && room.lastMessage.file.type != 'application/audio'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="room.id == idSelected"></fa-icon>
|
|
<fa-icon *ngIf="room.lastMessage.file.type == 'application/audio'" icon="file-audio" class="file-icon" [class.set-active-item-font-to-white]="room.id == idSelected"></fa-icon>
|
|
<span *ngIf="room.lastMessage.file.type == 'application/audio'"> audio </span>
|
|
|
|
<fa-icon *ngIf="room.lastMessage.file.type == 'application/meeting'" icon="calendar-alt" class="file-icon" [class.set-active-item-font-to-white]="room.id == idSelected"></fa-icon>
|
|
<span> {{room.lastMessage.file.name || room.lastMessage.file.subject}}</span>
|
|
</div>
|
|
|
|
<ion-label *ngIf="room.lastMessage.attachments">
|
|
<div *ngIf="room.lastMessage.attachments[0].image_url">
|
|
<fa-icon icon="image" class="file-icon" [class.set-active-item-font-to-white]="room.id == idSelected"></fa-icon>
|
|
<span> Fotografia</span>
|
|
</div>
|
|
</ion-label>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ion-item-sliding>
|
|
<ion-item-sliding *ngIf=" wsChatMethodsService.dmCount < 1">
|
|
<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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ion-item-sliding>
|
|
</ion-list>
|
|
<ion-list *ngSwitchCase="'Grupos'">
|
|
<ion-item-sliding *ngIf="!wsChatMethodsService.loadingWholeList">
|
|
<div *ngFor="let group of wsChatMethodsService._group"
|
|
[class.item-active]="group.id ==idSelected"
|
|
class="item item-hover d-flex">
|
|
<div class="item-icon">
|
|
<!-- <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>
|
|
<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" [class.item-title-active]="group.id ==idSelected">
|
|
<ion-label>{{group.name.split('-').join(' ')}}</ion-label>
|
|
</div>
|
|
<div class="item-date" [class.item-date-active]="group.id ==idSelected" *ngIf="group.lastMessage && !group.customFields.countDownDate">{{group.duration}}</div>
|
|
<div class="item-date" [class.item-date-active]="group.id ==idSelected" *ngIf="group.customFields.countDownDate">{{countDownDate(group.customFields.countDownDate, group.id)}}</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" *ngIf="group.otherUserType == false">{{group.lastMessage.u.name}}: {{group.lastMessage.msg}} </div>
|
|
<div *ngIf="group.otherUserType == true">{{group.userThatIsTyping}} está escrever ...</div>
|
|
<div class="item-files add-ellipsis" *ngIf="group.lastMessage.file">
|
|
<fa-icon *ngIf="group.lastMessage.file.type != 'application/meeting' && group.lastMessage.file.type != 'application/audio'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="group.id == idSelected"></fa-icon>
|
|
<fa-icon *ngIf="group.lastMessage.file.type == 'application/audio'" icon="file-audio" class="file-icon" [class.set-active-item-font-to-white]="group.id == idSelected"></fa-icon>
|
|
<span *ngIf="group.lastMessage.file.type == 'application/audio'" class="item-files-title"> audio </span>
|
|
<fa-icon *ngIf="group.lastMessage.file.type == 'application/meeting'" icon="calendar-alt" class="file-icon" [class.set-active-item-font-to-white]="group.id == idSelected"></fa-icon>
|
|
<span *ngIf="group.lastMessage.file.type != 'application/audio'" class="item-files-title"> {{ group.lastMessage.attachments[0].title }}</span>
|
|
</div>
|
|
<div class="item-files" *ngIf="group.attachments">
|
|
<div *ngIf="group.value.lastMessage.attachments[0].image_url">
|
|
<fa-icon icon="image" class="file-icon" [class.set-active-item-font-to-white]="group.id == idSelected"></fa-icon>
|
|
<span> Fotografia</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ion-item-sliding>
|
|
<ion-item-sliding *ngIf="wsChatMethodsService.loadingWholeList || wsChatMethodsService.groupCount < 1">
|
|
<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>
|
|
|
|
</ion-list>
|
|
</div>
|
|
|
|
<!-- <button (click)="sendMsg()" style="height: 41px;">Send message</button> -->
|
|
</div>
|
|
</div>
|
|
<!-- Aside right -->
|
|
<div class="aside-content d-none flex-column height-100">
|
|
|
|
<app-empty-chat [texto]="emptyTextDescription"
|
|
class="height-100 flex-column"
|
|
[style.display]="showEmptyComponent ? 'flex' : 'none'"
|
|
#messagecontainer>
|
|
</app-empty-chat>
|
|
|
|
<app-messages class=" height-100 flex-column"
|
|
*ngIf="showMessages"
|
|
[style.display]="showMessages ? 'flex' : 'none'"
|
|
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
|
(showEmptyContainer)="showEmptyContainer()"
|
|
(showEmptyContainer)="showEmptyContainer()"
|
|
(openNewEventPage)="openNewEventPage($event)"
|
|
[style.display]="showMessages ? 'flex' : 'none'"
|
|
[roomId]="roomId"
|
|
[showMessages]="showMessages" #messagecontainer>
|
|
|
|
</app-messages>
|
|
|
|
<app-contacts
|
|
(openMessage)="openMessagesPage($event)"
|
|
*ngIf="showContacts"
|
|
[style.display]="showContacts ? 'flex' : 'none'"
|
|
class=" height-100 flex-column">
|
|
</app-contacts>
|
|
|
|
<app-new-group
|
|
(addGroupMessage)="openGroupContactsPage($event)"
|
|
[style.display]="showNewGroup ? 'flex' : 'none'"
|
|
class=" height-100 flex-column">
|
|
</app-new-group>
|
|
|
|
<app-edit-group [roomId]="roomId"
|
|
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
|
(openGroupMessage)="openGroupMessagesPage($event)"
|
|
*ngIf="showEditGroup"
|
|
[style.display]="showEditGroup ? 'flex' : 'none'"
|
|
class="height-100 flex-column">
|
|
</app-edit-group>
|
|
|
|
<app-group-contacts
|
|
(openGroupMessage)="openGroupMessagesPage($event)"
|
|
*ngIf="showGroupContacts"
|
|
[style.display]="showGroupContacts ? 'flex' : 'none'"
|
|
[roomId]="groupRoomId" class=" height-100 flex-column"
|
|
>
|
|
</app-group-contacts>
|
|
|
|
<app-group-messages
|
|
*ngIf="showGroupMessages"
|
|
[style.display]="showEmptyComponent ? 'flex' : 'none'"
|
|
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
|
(showEmptyContainer)="showEmptyContainer()"
|
|
(openGroupContacts)="openGroupContactsPage($event)"
|
|
(openEditGroupPage)="openEditGroupPage($event)"
|
|
(openNewEventPage)="openNewEventPage($event)"
|
|
(getGroups)="getGroups($event)"
|
|
[style.display]="showGroupMessages ? 'flex' : 'none'"
|
|
class=" height-100 flex-column"
|
|
[roomId]="roomId" #messagecontainer>
|
|
</app-group-messages>
|
|
|
|
<app-new-event
|
|
[profile]=""
|
|
[roomId]="groupRoomId"
|
|
[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>
|
|
|
|
</div>
|
|
</div>
|
|
</ion-content>
|