presence is implemented
This commit is contained in:
parent
fee7aa70b0
commit
65fa631bfa
|
@ -44,6 +44,7 @@
|
|||
<ucap-profile-user-list-item
|
||||
*ucapGroupExpansionPanelItem="let userInfo"
|
||||
[userInfo]="userInfo"
|
||||
[presence]="getStatusBulkInfo(userInfo) | async"
|
||||
(click)="onSelectBuddy(userInfo)"
|
||||
>
|
||||
</ucap-profile-user-list-item>
|
||||
|
|
|
@ -148,6 +148,17 @@ export class GroupComponent implements OnInit {
|
|||
this.logger.debug('onSelectBuddy', buddy);
|
||||
}
|
||||
|
||||
getStatusBulkInfo(buddy: UserInfo) {
|
||||
return this.store.pipe(
|
||||
select(
|
||||
AppStore.MessengerSelector.StatusSelector.selectEntitiesStatusBulkInfo
|
||||
),
|
||||
map(statusBulkInfo =>
|
||||
!!statusBulkInfo ? statusBulkInfo[buddy.seq] : undefined
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
onKeyDownEnterOrganizationTenantSearch(params: {
|
||||
companyCode: string;
|
||||
searchWord: string;
|
||||
|
|
|
@ -38,11 +38,15 @@ export function selectors<S>(selector: Selector<any, State>) {
|
|||
selectStatusBulkInfo,
|
||||
ngeSelectAllStatusBulkInfo
|
||||
),
|
||||
selectEntitiesStatusBulkInfo: createSelector(
|
||||
selectStatusBulkInfo,
|
||||
ngeSelectEntitiesStatusBulkInfo
|
||||
),
|
||||
selectStatusBulkInfo: (userSeq: number) =>
|
||||
createSelector(
|
||||
selectStatusBulkInfo,
|
||||
ngeSelectEntitiesStatusBulkInfo,
|
||||
(_, entities) => entities[userSeq]
|
||||
(_, entities) => (!!entities ? entities[userSeq] : undefined)
|
||||
)
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
<!--체크박스 보여줄때는 <div class="list-item checkbox" matRipple> 클래스에 checkbox만 추가-->
|
||||
<div class="list-item" matRipple>
|
||||
<!--pcOn , pcOut pcOff , pcOther-->
|
||||
<span class="presence pcOn" *ngIf="presence">{{ presence.pcStatus }} </span>
|
||||
<span class="presence pcOn" *ngIf="userPresence"
|
||||
>{{ userPresence.pcStatus }}
|
||||
</span>
|
||||
<dl class="item-default">
|
||||
<dt>
|
||||
<img class="thumbnail" [src]="profileImageRoot + userInfo.profileImageFile"
|
||||
onerror="this.src='assets/images/img_nophoto_50.png'" />
|
||||
<img
|
||||
class="thumbnail"
|
||||
[src]="profileImageRoot + userInfo.profileImageFile"
|
||||
onerror="this.src='assets/images/img_nophoto_50.png'"
|
||||
/>
|
||||
</dt>
|
||||
<dd class="info">
|
||||
<div class="detail">
|
||||
|
@ -17,7 +22,10 @@
|
|||
{{ userInfo.deptName }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="msg-status" *ngIf="!checkable && userInfo.intro.trim() && !compactable">
|
||||
<div
|
||||
class="msg-status"
|
||||
*ngIf="!checkable && userInfo.intro.trim() && !compactable"
|
||||
>
|
||||
{{ userInfo.intro }}
|
||||
</div>
|
||||
</dd>
|
||||
|
|
|
@ -25,12 +25,17 @@ export class UserListItemComponent implements OnInit, OnDestroy {
|
|||
@Input()
|
||||
profileImageRoot?: string;
|
||||
@Input()
|
||||
presence?: StatusBulkInfo | StatusInfo;
|
||||
set presence(value: StatusBulkInfo | StatusInfo) {
|
||||
this.logger.debug('presence', value);
|
||||
this.userPresence = value;
|
||||
}
|
||||
@Input()
|
||||
checkable = false;
|
||||
@Input()
|
||||
compactable = false;
|
||||
|
||||
userPresence: StatusBulkInfo | StatusInfo;
|
||||
|
||||
// private profileImageRootSubscription: Subscription;
|
||||
|
||||
constructor(
|
||||
|
|
Loading…
Reference in New Issue
Block a user