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