조직도에 프레즌스 표현하도록 수정.
This commit is contained in:
parent
523e4c0811
commit
ac3495d011
|
@ -72,6 +72,8 @@
|
|||
<ucap-daesang-profile-user-list-item
|
||||
*ngFor="let userInfo of vsDeptUser.viewPortItems"
|
||||
[userInfo]="userInfo"
|
||||
[presence]="getStatusBulkInfo(userInfo) | async"
|
||||
[showPresence]="showPresence"
|
||||
[sessionVerinfo]="sessionVerinfo"
|
||||
[selectedUserList]="selectedUserList"
|
||||
[checkable]="!!loginRes && userInfo.seq !== loginRes.userSeq"
|
||||
|
@ -95,6 +97,8 @@
|
|||
<ucap-daesang-profile-user-list-item
|
||||
*ngFor="let userInfo of vsDeptSearchUser.viewPortItems"
|
||||
[userInfo]="userInfo"
|
||||
[presence]="getStatusBulkInfo(userInfo) | async"
|
||||
[showPresence]="showPresence"
|
||||
[checkable]="userInfo.seq !== loginRes.userSeq"
|
||||
[sessionVerinfo]="sessionVerinfo"
|
||||
[selectedUserList]="selectedUserList"
|
||||
|
|
|
@ -49,7 +49,7 @@ import {
|
|||
KEY_AUTH_INFO,
|
||||
MainMenu
|
||||
} from '@app/types';
|
||||
import { take, tap } from 'rxjs/operators';
|
||||
import { take, tap, map } from 'rxjs/operators';
|
||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||
import { Company } from '@ucap-webmessenger/api-external';
|
||||
|
@ -100,6 +100,8 @@ export class OrganizationComponent
|
|||
ignoreUserList?: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[] = [];
|
||||
@Input()
|
||||
isVisible = true;
|
||||
@Input()
|
||||
showPresence = true;
|
||||
|
||||
@Output()
|
||||
checkUser = new EventEmitter<{
|
||||
|
@ -337,6 +339,18 @@ export class OrganizationComponent
|
|||
);
|
||||
this.selectedDepartmentProcessing = false;
|
||||
|
||||
// 검색 결과에 따른 프레즌스 조회.
|
||||
const userSeqList: number[] = [];
|
||||
this.searchUserInfos.map(user => userSeqList.push(user.seq));
|
||||
if (userSeqList.length > 0) {
|
||||
this.store.dispatch(
|
||||
StatusStore.bulkInfo({
|
||||
divCd: 'orgSrch',
|
||||
userSeqs: userSeqList
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (!!this.vsDeptSearchUser) {
|
||||
this.vsDeptSearchUser.scrollToIndex(0);
|
||||
}
|
||||
|
@ -431,6 +445,20 @@ export class OrganizationComponent
|
|||
// this.logger.debug('onSelectedOrganization', datas);
|
||||
this.selectedDepartmentUserInfoList = datas.userInfos;
|
||||
|
||||
// 검색 결과에 따른 프레즌스 조회.
|
||||
const userSeqList: number[] = [];
|
||||
this.selectedDepartmentUserInfoList.map(user =>
|
||||
userSeqList.push(user.seq)
|
||||
);
|
||||
if (userSeqList.length > 0) {
|
||||
this.store.dispatch(
|
||||
StatusStore.bulkInfo({
|
||||
divCd: 'orgtrSrch',
|
||||
userSeqs: userSeqList
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (!!this.vsDeptUser) {
|
||||
this.vsDeptUser.scrollToIndex(0, true, 0, 0);
|
||||
}
|
||||
|
@ -739,6 +767,17 @@ export class OrganizationComponent
|
|||
}
|
||||
}
|
||||
|
||||
getStatusBulkInfo(buddy: UserInfo) {
|
||||
return this.store.pipe(
|
||||
select(
|
||||
AppStore.MessengerSelector.StatusSelector.selectEntitiesStatusBulkInfo
|
||||
),
|
||||
map(statusBulkInfo =>
|
||||
!!statusBulkInfo ? statusBulkInfo[buddy.seq] : undefined
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
getTooltip(userInfo: UserInfoSS): string {
|
||||
return `${
|
||||
userInfo.companyName
|
||||
|
|
|
@ -177,6 +177,7 @@
|
|||
<div class="mat-tab-frame dialog-tab-orglist">
|
||||
<app-layout-chat-left-sidenav-organization
|
||||
[isMain]="false"
|
||||
[showPresence]="false"
|
||||
[selectedUserList]="selectedUserList"
|
||||
[ignoreUserList]="data.curRoomUser"
|
||||
[isUserSelect]="true"
|
||||
|
|
|
@ -453,16 +453,16 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
|
|||
this.searchProcessing = false;
|
||||
|
||||
// 검색 결과에 따른 프레즌스 조회.
|
||||
const userSeqList: number[] = [];
|
||||
this.searchUserInfos.map(user => userSeqList.push(user.seq));
|
||||
if (userSeqList.length > 0) {
|
||||
this.store.dispatch(
|
||||
StatusStore.bulkInfo({
|
||||
divCd: 'groupSrch',
|
||||
userSeqs: userSeqList
|
||||
})
|
||||
);
|
||||
}
|
||||
// const userSeqList: number[] = [];
|
||||
// this.searchUserInfos.map(user => userSeqList.push(user.seq));
|
||||
// if (userSeqList.length > 0) {
|
||||
// this.store.dispatch(
|
||||
// StatusStore.bulkInfo({
|
||||
// divCd: 'groupSrch',
|
||||
// userSeqs: userSeqList
|
||||
// })
|
||||
// );
|
||||
// }
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ $thumbnail-msize: 40px;
|
|||
.oraganization-tab {
|
||||
.list-item {
|
||||
.presence {
|
||||
display: none;
|
||||
display: block;
|
||||
}
|
||||
.item-default {
|
||||
width: calc(100% - 30px);
|
||||
|
|
|
@ -20,6 +20,7 @@ import {
|
|||
import { NGXLogger } from 'ngx-logger';
|
||||
import { StatusCode, PresenceType } from '@ucap-webmessenger/core';
|
||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ucap-daesang-profile-user-list-item',
|
||||
|
@ -60,7 +61,10 @@ export class UserListItemComponent implements OnInit {
|
|||
|
||||
PresenceType = PresenceType;
|
||||
|
||||
constructor(private logger: NGXLogger) {}
|
||||
constructor(
|
||||
private logger: NGXLogger,
|
||||
private translateService: TranslateService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.profileImageRoot =
|
||||
|
@ -97,15 +101,32 @@ export class UserListItemComponent implements OnInit {
|
|||
return rtnClass;
|
||||
}
|
||||
getPresenceMsg(): string {
|
||||
if (
|
||||
!!this.presence &&
|
||||
!!this.presence.statusMessage &&
|
||||
this.presence.statusMessage !== '.'
|
||||
) {
|
||||
return this.presence.statusMessage;
|
||||
} else {
|
||||
return '';
|
||||
let presenceMsg = this.translateService.instant('presence.offline');
|
||||
|
||||
if (!!this.presence) {
|
||||
switch (this.presence.pcStatus) {
|
||||
case StatusCode.OnLine:
|
||||
presenceMsg = this.translateService.instant('presence.online');
|
||||
break;
|
||||
case StatusCode.Away:
|
||||
presenceMsg = this.translateService.instant('presence.away');
|
||||
break;
|
||||
case StatusCode.Busy:
|
||||
if (
|
||||
!!this.presence.statusMessage &&
|
||||
this.presence.statusMessage !== '.'
|
||||
) {
|
||||
presenceMsg = this.presence.statusMessage;
|
||||
} else {
|
||||
presenceMsg = this.translateService.instant(
|
||||
'presence.statusMessage1'
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return presenceMsg;
|
||||
}
|
||||
|
||||
/** 리스트가 checkable 할 경우 checkbox 의 change 이벤트를 상위 컴포넌트로 전달한다. */
|
||||
|
|
Loading…
Reference in New Issue
Block a user