This commit is contained in:
leejinho 2020-01-31 15:25:28 +09:00
parent 7438d1d691
commit 9916344911
5 changed files with 45 additions and 1 deletions

View File

@ -48,8 +48,18 @@ export const reducer = createReducer(
}), }),
on(statusSuccess, (state, action) => { on(statusSuccess, (state, action) => {
const statusBulkInfoState: StatusBulkInfo = {
...state.statusBulkInfo.entities[action.res.SENDER_SEQ],
pcStatus: action.res.statusType,
statusMessage: action.res.statusMessage
};
return { return {
...state, ...state,
statusBulkInfo: adapterStatusBulkInfo.updateOne(
{ id: action.res.SENDER_SEQ, changes: statusBulkInfoState },
{ ...state.statusBulkInfo }
),
myStatus: { myStatus: {
...state.myStatus, ...state.myStatus,
pcStatus: action.res.statusType, pcStatus: action.res.statusType,

View File

@ -1,7 +1,13 @@
<!--체크박스 보여줄때는 <div class="list-item checkbox" matRipple> 클래스에 checkbox만 추가--> <!--체크박스 보여줄때는 <div class="list-item checkbox" matRipple> 클래스에 checkbox만 추가-->
<div class="list-item checkbox" *ngIf="userInfo" matRipple> <div class="list-item checkbox" *ngIf="userInfo" matRipple>
<!--pcOn , pcOut pcOff , pcOther--> <!--pcOn , pcOut pcOff , pcOther-->
<span class="presence" [ngClass]="getPresence(PresenceType.PC)"> </span> <span
class="presence"
[ngClass]="getPresence(PresenceType.PC)"
[matTooltip]="getPresenceMsg()"
matTooltipPosition="after"
>
</span>
<dl class="item-default"> <dl class="item-default">
<dt> <dt>
<div class="thumbnail-mask"> <div class="thumbnail-mask">

View File

@ -96,6 +96,17 @@ export class UserListItemComponent implements OnInit {
return rtnClass; return rtnClass;
} }
getPresenceMsg(): string {
if (
!!this.presence &&
!!this.presence.statusMessage &&
this.presence.statusMessage !== '.'
) {
return this.presence.statusMessage;
} else {
return '';
}
}
/** 리스트가 checkable 할 경우 checkbox 의 change 이벤트를 상위 컴포넌트로 전달한다. */ /** 리스트가 checkable 할 경우 checkbox 의 change 이벤트를 상위 컴포넌트로 전달한다. */
onChangeCheck( onChangeCheck(

View File

@ -32,6 +32,8 @@
<span <span
class="presence" class="presence"
[ngClass]="getPresence(element, PresenceType.PC)" [ngClass]="getPresence(element, PresenceType.PC)"
[matTooltip]="getPresenceMsg(element)"
matTooltipPosition="after"
></span> ></span>
<span class="thumbnail-mask"> <span class="thumbnail-mask">
<img <img

View File

@ -130,6 +130,21 @@ export class IntegratedSearchComponent implements OnInit {
return rtnClass; return rtnClass;
} }
getPresenceMsg(userInfo: UserInfoSS): string {
const presences = this.presence.filter(p => p.userSeq === userInfo.seq);
if (!!presences && presences.length > 0) {
const presence = presences[0];
if (
!!presence &&
!!presence.statusMessage &&
presence.statusMessage !== '.'
) {
return presence.statusMessage;
}
}
return '';
}
getWorkstatusInfo(userInfo: UserInfoSS, type: string): string { getWorkstatusInfo(userInfo: UserInfoSS, type: string): string {
let workstatus = userInfo.workstatus; let workstatus = userInfo.workstatus;