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