mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix date
This commit is contained in:
@@ -60,7 +60,7 @@
|
|||||||
<div class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'au' && msg.t != 'ru' && msg.msg !=''" (press)="handlePress(msg._id)">
|
<div class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'au' && msg.t != 'ru' && msg.msg !=''" (press)="handlePress(msg._id)">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name ?? ""}}</ion-label>
|
<ion-label>{{msg.u.name ?? ""}}</ion-label>
|
||||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
<span class="time">{{msg.duration}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="message">
|
<div class="message">
|
||||||
<ion-label>{{msg.msg}}</ion-label>
|
<ion-label>{{msg.msg}}</ion-label>
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name ?? ""}}</ion-label>
|
<ion-label>{{msg.u.name ?? ""}}</ion-label>
|
||||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
<span class="time">{{msg.duration}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ion-label>{{msg.msg}}</ion-label>
|
<ion-label>{{msg.msg}}</ion-label>
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
<div class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru' && msg.file.type != 'application/meeting'" (press)="handlePress(msg._id)">
|
<div class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru' && msg.file.type != 'application/meeting'" (press)="handlePress(msg._id)">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name ?? ""}}</ion-label>
|
<ion-label>{{msg.u.name ?? ""}}</ion-label>
|
||||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
<span class="time">{{msg.duration}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="message">
|
<div class="message">
|
||||||
<div *ngIf="msg.attachments" class="message-attachments">
|
<div *ngIf="msg.attachments" class="message-attachments">
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' (click)="downloadFileMsg(msg)" *ngIf="msg.msg !=''">
|
<div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' (click)="downloadFileMsg(msg)" *ngIf="msg.msg !=''">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name}}</ion-label>
|
<ion-label>{{msg.u.name}}</ion-label>
|
||||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
<span class="time">{{msg.duration}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ion-label>{{msg.msg}}</ion-label>
|
<ion-label>{{msg.msg}}</ion-label>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
<!-- <div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' (click)="openPreview(msg)" *ngIf="msg.msg !=''">
|
<!-- <div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' (click)="openPreview(msg)" *ngIf="msg.msg !=''">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name}}</ion-label>
|
<ion-label>{{msg.u.name}}</ion-label>
|
||||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
<span class="time">{{msg.duration}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ion-label>{{msg.msg}}</ion-label>
|
<ion-label>{{msg.msg}}</ion-label>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' *ngIf="msg.file.type != 'application/meeting'">
|
<div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' *ngIf="msg.file.type != 'application/meeting'">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name}}</ion-label>
|
<ion-label>{{msg.u.name}}</ion-label>
|
||||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
<span class="time">{{msg.duration}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div *ngIf="msg.attachments" class="message-attachments">
|
<div *ngIf="msg.attachments" class="message-attachments">
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { capitalizeTxt } from 'src/plugin/text'
|
|||||||
import { NfService } from 'src/app/services/chat/nf.service'
|
import { NfService } from 'src/app/services/chat/nf.service'
|
||||||
import { WsChatService } from 'src/app/services/chat/ws-chat.service';
|
import { WsChatService } from 'src/app/services/chat/ws-chat.service';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
|
import { showDateDuration } from 'src/plugin/showDateDuration';
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
@@ -32,6 +33,7 @@ export class MessageService {
|
|||||||
uploadingFile = false
|
uploadingFile = false
|
||||||
errorUploadingAttachment = false
|
errorUploadingAttachment = false
|
||||||
loadHistory = false
|
loadHistory = false
|
||||||
|
duration = ''
|
||||||
|
|
||||||
constructor(private storage: Storage,
|
constructor(private storage: Storage,
|
||||||
private NfService: NfService,
|
private NfService: NfService,
|
||||||
@@ -73,6 +75,8 @@ export class MessageService {
|
|||||||
this.displayType = this.file.type.replace('application/','').toUpperCase()
|
this.displayType = this.file.type.replace('application/','').toUpperCase()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.calDateDuration()
|
||||||
}
|
}
|
||||||
|
|
||||||
private usernameToDisplayName(username) {
|
private usernameToDisplayName(username) {
|
||||||
@@ -170,4 +174,8 @@ export class MessageService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private calDateDuration(date = null) {
|
||||||
|
this.duration = showDateDuration(date || this._updatedAt);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export class RoomService {
|
|||||||
let ChatMessage = _ChatMessage.fields.args[0]
|
let ChatMessage = _ChatMessage.fields.args[0]
|
||||||
|
|
||||||
ChatMessage = this.fix_updatedAt(ChatMessage)
|
ChatMessage = this.fix_updatedAt(ChatMessage)
|
||||||
console.log('recivemessage', JSON.stringify(_ChatMessage))
|
console.log('recivemessage', ChatMessage)
|
||||||
|
|
||||||
const message = this.prepareMessage(ChatMessage)
|
const message = this.prepareMessage(ChatMessage)
|
||||||
this.lastMessage = message
|
this.lastMessage = message
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name}}</ion-label>
|
<ion-label>{{msg.u.name}}</ion-label>
|
||||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
<span class="time">{{msg.duration}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="message">
|
<div class="message">
|
||||||
<ion-label>{{msg.msg}}</ion-label>
|
<ion-label>{{msg.msg}}</ion-label>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
</mat-menu>
|
</mat-menu>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
<span class="time">{{msg.duration}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="message">
|
<div class="message">
|
||||||
<div *ngIf="msg.attachments" class="message-attachments">
|
<div *ngIf="msg.attachments" class="message-attachments">
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name}}</ion-label>
|
<ion-label>{{msg.u.name}}</ion-label>
|
||||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
<span class="time">{{msg.duration}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ion-label>{{msg.msg}}</ion-label>
|
<ion-label>{{msg.msg}}</ion-label>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name}}</ion-label>
|
<ion-label>{{msg.u.name}}</ion-label>
|
||||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
<span class="time">{{msg.duration}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ion-label>{{msg.msg}}</ion-label>
|
<ion-label>{{msg.msg}}</ion-label>
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name}} </ion-label>
|
<ion-label>{{msg.u.name}} </ion-label>
|
||||||
<span class="time">{{showDateDuration(msg.duration)}}</span>
|
<span class="time">{{msg.duration}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div *ngIf="msg.attachments" class="message-attachments">
|
<div *ngIf="msg.attachments" class="message-attachments">
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name}}</ion-label>
|
<ion-label>{{msg.u.name}}</ion-label>
|
||||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
<span class="time">{{msg.duration}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ion-label>{{msg.msg}}</ion-label>
|
<ion-label>{{msg.msg}}</ion-label>
|
||||||
|
|||||||
Reference in New Issue
Block a user