mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -65,6 +65,7 @@ interface FirstUnread {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface Message {
|
export interface Message {
|
||||||
|
customFields:any;
|
||||||
_id: string;
|
_id: string;
|
||||||
rid: string;
|
rid: string;
|
||||||
msg: string;
|
msg: string;
|
||||||
|
|||||||
@@ -118,30 +118,29 @@
|
|||||||
(click)="openGroupMessagesPage(group.value.id)" class="item-content flex-grow-1 cursor-pointer">
|
(click)="openGroupMessagesPage(group.value.id)" class="item-content flex-grow-1 cursor-pointer">
|
||||||
<div class="item-title-time">
|
<div class="item-title-time">
|
||||||
<div class="item-title" [class.item-title-active]="group.value.id ==idSelected">
|
<div class="item-title" [class.item-title-active]="group.value.id ==idSelected">
|
||||||
{{group.value.name.split('-').join(' ')}}
|
<ion-label>{{group.value.name.split('-').join(' ')}}</ion-label>
|
||||||
<ion-label>{{group.value.name.split('-').join(' ')}}</ion-label>TT
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="item-date" [class.item-date-active]="group.value.id ==idSelected" *ngIf="group.value.lastMessage && !group.customFields.countDownDate">{{group.value.duration}}</div>
|
<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> -->
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div *ngIf="group.value.lastMessage" class="item-description d-flex align-items-center" [class.item-description-active]="group.value.id ==idSelected">
|
<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.lastMessage.msg}} </div>
|
<div class="item-message">{{group.value.lastMessage.u.name}}: {{group.value.lastMessage.msg}} </div>
|
||||||
<div class="item-files add-ellipsis" *ngIf="group.value.lastMessage.file">
|
<div class="item-files add-ellipsis" *ngIf="group.value.file">
|
||||||
<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="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>
|
<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>
|
||||||
<span class="item-files-title"> {{group.value.lastMessage.file.name || group.value.lastMessage.file.subject}}</span>
|
<span class="item-files-title"> {{group.value.lastMessage.file.name || group.value.file.subject}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-files" *ngIf="group.value.lastMessage.attachments">
|
<div class="item-files" *ngIf="group.value.attachments">
|
||||||
<div *ngIf="group.value.value.lastMessage.attachments[0].image_url">
|
<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>
|
<fa-icon icon="image" class="file-icon" [class.set-active-item-font-to-white]="group.value.id == idSelected"></fa-icon>
|
||||||
<span> Fotografia</span>
|
<span> Fotografia</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-item-sliding>
|
</ion-item-sliding>
|
||||||
<ion-item-sliding *ngIf="wsChatMethodsService.loadingWholeList || wsChatMethodsService.groupCount">
|
<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 *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-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-content flex-grow-1 cursor-pointer">
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { chatHistory, ChatMessage, File } from 'src/app/models/chatMethod'
|
|||||||
})
|
})
|
||||||
export class MessageService {
|
export class MessageService {
|
||||||
|
|
||||||
|
customFields
|
||||||
channels = []
|
channels = []
|
||||||
mentions = []
|
mentions = []
|
||||||
msg = ''
|
msg = ''
|
||||||
@@ -20,7 +21,8 @@ export class MessageService {
|
|||||||
|
|
||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
setData({channels, mentions, msg ,rid ,ts, u, _id, _updatedAt, file, attachments}:Message) {
|
setData({customFields, channels, mentions, msg ,rid ,ts, u, _id, _updatedAt, file, attachments}:Message) {
|
||||||
|
this.customFields = customFields
|
||||||
this.channels = channels
|
this.channels = channels
|
||||||
this.mentions = mentions
|
this.mentions = mentions
|
||||||
this.msg = msg
|
this.msg = msg
|
||||||
|
|||||||
@@ -14,8 +14,9 @@ export class RoomService {
|
|||||||
lastMessage: MessageService;
|
lastMessage: MessageService;
|
||||||
|
|
||||||
chatUser: ChatUserService[] = []
|
chatUser: ChatUserService[] = []
|
||||||
|
customFields:any;
|
||||||
id = ''
|
id = ''
|
||||||
name = 'teste'
|
name = ''
|
||||||
_updatedAt = {}
|
_updatedAt = {}
|
||||||
private hasLoadHistory = false
|
private hasLoadHistory = false
|
||||||
duration = ''
|
duration = ''
|
||||||
@@ -27,7 +28,8 @@ export class RoomService {
|
|||||||
private MessageService: MessageService,
|
private MessageService: MessageService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
setData({id, name, lastMessage, _updatedAt}) {
|
setData({customFields, id, name, lastMessage, _updatedAt}) {
|
||||||
|
this.customFields = customFields
|
||||||
this.id = id
|
this.id = id
|
||||||
this.name = name
|
this.name = name
|
||||||
this.lastMessage = lastMessage
|
this.lastMessage = lastMessage
|
||||||
|
|||||||
@@ -47,10 +47,11 @@ export class WsChatMethodsService {
|
|||||||
|
|
||||||
room = new RoomService(this.WsChatService, new MessageService())
|
room = new RoomService(this.WsChatService, new MessageService())
|
||||||
room.setData({
|
room.setData({
|
||||||
|
customFields: roomData.customFields,
|
||||||
id: this.getRoomId(roomData),
|
id: this.getRoomId(roomData),
|
||||||
name: this.getRoomName(roomData),
|
name: this.getRoomName(roomData),
|
||||||
lastMessage: this.getRoomLastMessage(roomData),
|
lastMessage: this.getRoomLastMessage(roomData),
|
||||||
_updatedAt: roomData._updatedAt['$date']
|
_updatedAt: new Date(roomData._updatedAt['$date'])
|
||||||
})
|
})
|
||||||
|
|
||||||
room.receiveMessage()
|
room.receiveMessage()
|
||||||
|
|||||||
Reference in New Issue
Block a user