2020-09-10 09:48:37 +01:00
|
|
|
<ion-header>
|
2020-12-16 15:07:28 +01:00
|
|
|
<app-header></app-header>
|
|
|
|
|
</ion-header>
|
|
|
|
|
<ion-header class="ion-no-border">
|
|
|
|
|
<ion-toolbar class="bg-blue">
|
|
|
|
|
<div class="main-header">
|
|
|
|
|
<div class="title-content">
|
|
|
|
|
<div class="div-title">
|
|
|
|
|
<ion-label class="title">Chat</ion-label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="div-icon">
|
2020-12-21 16:37:44 +01:00
|
|
|
<ion-icon slot="end" (click)="newGroup()" src="assets/images/icons-chat-new-group.svg" ></ion-icon>
|
|
|
|
|
<ion-icon slot="end" (click)="selectContact()" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
|
2020-12-16 15:07:28 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-09-10 09:48:37 +01:00
|
|
|
</ion-toolbar>
|
|
|
|
|
</ion-header>
|
|
|
|
|
|
|
|
|
|
<ion-content>
|
2020-12-16 15:07:28 +01:00
|
|
|
<div class="main-content">
|
2020-10-30 15:22:35 +01:00
|
|
|
<ion-toolbar >
|
|
|
|
|
<ion-segment [(ngModel)]="segment" (ionChange)="onSegmentChange()">
|
|
|
|
|
<ion-segment-button value="Contactos">
|
|
|
|
|
Contactos
|
|
|
|
|
</ion-segment-button>
|
|
|
|
|
<ion-segment-button value="Grupos">
|
|
|
|
|
Grupos
|
|
|
|
|
</ion-segment-button>
|
|
|
|
|
</ion-segment>
|
|
|
|
|
</ion-toolbar>
|
2020-12-16 15:07:28 +01:00
|
|
|
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
|
|
|
|
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
|
|
|
|
</ion-refresher>
|
2020-10-30 15:22:35 +01:00
|
|
|
<div [ngSwitch]="segment">
|
2020-12-16 15:07:28 +01:00
|
|
|
<ion-list *ngSwitchCase="'Contactos'">
|
2020-10-30 15:22:35 +01:00
|
|
|
<ion-item-group>
|
|
|
|
|
<ion-item-sliding>
|
2021-01-13 10:02:30 +01:00
|
|
|
<!-- <ion-item *ngFor="let user of userConnectedList" (click)="openMessages()">
|
2020-10-30 15:22:35 +01:00
|
|
|
<ion-icon slot="start" src="assets/images/icons-chat-chat-40.svg" class="iconschatchat-40"></ion-icon>
|
|
|
|
|
<div>
|
2020-11-03 11:52:21 +01:00
|
|
|
<h3>{{user.name}}</h3>
|
2020-10-30 15:22:35 +01:00
|
|
|
<p>Podemos marcar reunião para amanha</p>
|
|
|
|
|
</div>
|
2021-01-13 10:02:30 +01:00
|
|
|
</ion-item> -->
|
|
|
|
|
<div *ngFor="let dm of userDirectMessages" class="item">
|
2020-12-21 16:37:44 +01:00
|
|
|
<div class="item-icon">
|
|
|
|
|
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon>
|
|
|
|
|
</div>
|
2021-01-13 10:02:30 +01:00
|
|
|
<div (click)="openMessages(dm)" class="item-content">
|
2020-12-21 16:37:44 +01:00
|
|
|
<div class="item-title-time">
|
|
|
|
|
<div class="item-title">
|
2021-01-13 10:02:30 +01:00
|
|
|
<ion-label *ngFor="let user of dm.usernames">
|
|
|
|
|
<span *ngIf="user !=loggedUser.me.username">
|
|
|
|
|
{{user}}
|
|
|
|
|
</span>
|
|
|
|
|
</ion-label>
|
2020-12-21 16:37:44 +01:00
|
|
|
</div>
|
2021-01-13 10:02:30 +01:00
|
|
|
<div class="item-date">{{dm.lastMessage._updatedAt | date: 'HH:mm'}}</div>
|
2020-12-21 16:37:44 +01:00
|
|
|
</div>
|
|
|
|
|
<div class="item-description">
|
2021-01-13 10:02:30 +01:00
|
|
|
<ion-label>{{dm.lastMessage.msg}}</ion-label>
|
2020-12-21 16:37:44 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-12-29 12:40:19 +01:00
|
|
|
</div>
|
2021-01-13 10:02:30 +01:00
|
|
|
<!-- <div class="item">
|
2020-12-29 12:40:19 +01:00
|
|
|
<div class="item-icon">
|
|
|
|
|
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon>
|
|
|
|
|
</div>
|
2020-12-30 11:13:50 +01:00
|
|
|
<div (click)="openMessages()" class="item-content">
|
2020-12-29 12:40:19 +01:00
|
|
|
<div class="item-title-time">
|
|
|
|
|
<div class="item-title">
|
2021-01-04 12:00:04 +01:00
|
|
|
<ion-label>Secretário para o sector Agricola</ion-label>
|
2020-12-29 12:40:19 +01:00
|
|
|
</div>
|
2020-12-30 11:13:50 +01:00
|
|
|
<div class="item-date">15:00</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-description">
|
|
|
|
|
<p>Podemos marcar reunião para amanha</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item">
|
|
|
|
|
<div class="item-icon">
|
|
|
|
|
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon>
|
|
|
|
|
</div>
|
|
|
|
|
<div (click)="openMessages()" class="item-content">
|
|
|
|
|
<div class="item-title-time">
|
|
|
|
|
<div class="item-title">
|
2021-01-04 12:00:04 +01:00
|
|
|
<ion-label>Secretário para o sector Adminstrativo</ion-label>
|
2020-12-30 11:13:50 +01:00
|
|
|
</div>
|
|
|
|
|
<div class="item-date">15:00</div>
|
2020-12-29 12:40:19 +01:00
|
|
|
</div>
|
|
|
|
|
<div class="item-description">
|
2020-12-30 11:13:50 +01:00
|
|
|
<p>Podemos marcar reunião para amanha</p>
|
2020-12-29 12:40:19 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-01-13 10:02:30 +01:00
|
|
|
</div> -->
|
2020-10-30 15:22:35 +01:00
|
|
|
</ion-item-sliding>
|
|
|
|
|
</ion-item-group>
|
|
|
|
|
</ion-list>
|
|
|
|
|
<ion-list *ngSwitchCase="'Grupos'" >
|
|
|
|
|
<ion-item-group>
|
|
|
|
|
<ion-item-sliding>
|
2021-01-13 10:02:30 +01:00
|
|
|
<!-- <ion-item *ngFor="let group of allGroups">
|
2020-10-30 15:22:35 +01:00
|
|
|
<ion-icon slot="start" src="assets/images/icons-chat-group-chat-40.svg" class="iconschatgroup-chat-40"></ion-icon>
|
|
|
|
|
<div>
|
2020-11-03 11:52:21 +01:00
|
|
|
<h3>{{group.name}}</h3>
|
2020-10-30 15:22:35 +01:00
|
|
|
<p>Grande momento.</p>
|
|
|
|
|
</div>
|
2021-01-13 10:02:30 +01:00
|
|
|
</ion-item> -->
|
|
|
|
|
<div *ngFor="let group of allGroups" class="item">
|
2021-01-04 12:00:04 +01:00
|
|
|
<div class="item-icon">
|
|
|
|
|
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon>
|
|
|
|
|
</div>
|
2021-01-19 16:10:40 +01:00
|
|
|
<div (click)="openGroupMessages(group)" class="item-content">
|
2021-01-04 12:00:04 +01:00
|
|
|
<div class="item-title-time">
|
|
|
|
|
<div class="item-title">
|
2021-01-13 10:02:30 +01:00
|
|
|
<ion-label>{{group.name}}</ion-label>
|
2021-01-04 12:00:04 +01:00
|
|
|
</div>
|
2021-01-19 16:10:40 +01:00
|
|
|
<div class="item-date" *ngIf="group.lastMessage">{{group.lastMessage._updatedAt | date: 'HH:mm'}}</div>
|
2021-01-04 12:00:04 +01:00
|
|
|
</div>
|
2021-01-19 16:10:40 +01:00
|
|
|
<div class="item-description" *ngIf="group.lastMessage">
|
2021-01-13 10:02:30 +01:00
|
|
|
<ion-label>{{group.lastMessage.u.name}}: {{group.lastMessage.msg}}</ion-label>
|
2021-01-04 12:00:04 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-01-13 10:02:30 +01:00
|
|
|
<!-- <div class="item">
|
2020-12-21 16:37:44 +01:00
|
|
|
<div class="item-icon">
|
|
|
|
|
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon>
|
|
|
|
|
</div>
|
2020-12-28 10:11:00 +01:00
|
|
|
<div (click)="openGroupMessages()" class="item-content">
|
2020-12-21 16:37:44 +01:00
|
|
|
<div class="item-title-time">
|
|
|
|
|
<div class="item-title">
|
|
|
|
|
<ion-label>Secretário para o sector Produtivo</ion-label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-date">15:00</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-description">
|
|
|
|
|
<p>Podemos marcar reunião para amanha</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-01-13 10:02:30 +01:00
|
|
|
</div> -->
|
2020-10-30 15:22:35 +01:00
|
|
|
</ion-item-sliding>
|
|
|
|
|
</ion-item-group>
|
|
|
|
|
|
|
|
|
|
</ion-list>
|
|
|
|
|
</div>
|
2020-12-16 15:07:28 +01:00
|
|
|
</div>
|
2020-09-10 09:48:37 +01:00
|
|
|
</ion-content>
|
2020-10-30 15:22:35 +01:00
|
|
|
|
2020-12-28 10:11:00 +01:00
|
|
|
|