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