대화방 이름 옆에 직급 표시.(다국어 처리 안되있음)
This commit is contained in:
parent
5fe7b9cb22
commit
d8e48f7765
|
@ -98,9 +98,7 @@
|
||||||
|
|
||||||
<div class="message-main-container">
|
<div class="message-main-container">
|
||||||
<div class="message-main">
|
<div class="message-main">
|
||||||
<div class="chat-name">
|
<div class="chat-name">{{ senderName }} {{ senderGrade }}</div>
|
||||||
{{ senderName }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bubble">
|
<div class="bubble">
|
||||||
<ng-container
|
<ng-container
|
||||||
|
|
|
@ -51,6 +51,9 @@ export class MessageBoxComponent implements OnInit, AfterViewInit {
|
||||||
@Input()
|
@Input()
|
||||||
senderName: string;
|
senderName: string;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
senderGrade: string;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
profileImageRoot: string;
|
profileImageRoot: string;
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@
|
||||||
"
|
"
|
||||||
[dateChanged]="getDateSplitter(message)"
|
[dateChanged]="getDateSplitter(message)"
|
||||||
[senderName]="getUserName(message.senderSeq)"
|
[senderName]="getUserName(message.senderSeq)"
|
||||||
|
[senderGrade]="getUserGrade(message.senderSeq)"
|
||||||
[profileImageRoot]="profileImageRoot"
|
[profileImageRoot]="profileImageRoot"
|
||||||
[profileImage]="getUserProfile(message.senderSeq)"
|
[profileImage]="getUserProfile(message.senderSeq)"
|
||||||
[roomInfo]="roomInfo"
|
[roomInfo]="roomInfo"
|
||||||
|
|
|
@ -322,6 +322,19 @@ export class MessagesComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
return '(알수없는 사용자)';
|
return '(알수없는 사용자)';
|
||||||
}
|
}
|
||||||
|
getUserGrade(seq: number): string {
|
||||||
|
if (!this.userInfos) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
const userInfo: UserInfo[] = this.userInfos.filter(
|
||||||
|
user => user.seq === seq
|
||||||
|
);
|
||||||
|
if (!!userInfo && userInfo.length > 0) {
|
||||||
|
return userInfo[0].grade;
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
getUserProfile(seq: number): string {
|
getUserProfile(seq: number): string {
|
||||||
if (!this.userInfos) {
|
if (!this.userInfos) {
|
||||||
return '';
|
return '';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user