업무상태 출력하도록 수정 :: 동료그룹. 조직도

This commit is contained in:
leejinho 2020-01-06 09:26:32 +09:00
parent 5fc95cd12a
commit 0830b017df
14 changed files with 75 additions and 15 deletions

View File

@ -9,7 +9,8 @@ import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
import { import {
StatusBulkInfo, StatusBulkInfo,
TerminalStatusInfo, TerminalStatusInfo,
TerminalStatusNumber TerminalStatusNumber,
WorkStatusType
} from '@ucap-webmessenger/protocol-status'; } from '@ucap-webmessenger/protocol-status';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { Company } from '@ucap-webmessenger/api-external'; import { Company } from '@ucap-webmessenger/api-external';
@ -17,7 +18,6 @@ import { EventType, Info, EventJson } from '@ucap-webmessenger/protocol-event';
import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
import { StatusCode as ApiStatusCode } from '@ucap-webmessenger/api'; import { StatusCode as ApiStatusCode } from '@ucap-webmessenger/api';
import { StatusCode } from '@ucap-webmessenger/core'; import { StatusCode } from '@ucap-webmessenger/core';
import { WorkStatusType } from 'projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type';
@Component({ @Component({
selector: 'app-template.page', selector: 'app-template.page',

View File

@ -0,0 +1,6 @@
import { WorkStatusType } from '@ucap-webmessenger/protocol-status';
export interface CommonUserInfo {
/** 업무 상태 */
workstatus?: WorkStatusType;
}

View File

@ -2,6 +2,8 @@
* Public API Surface of ucap-webmessenger-core * Public API Surface of ucap-webmessenger-core
*/ */
export * from './lib/models/common-user-info';
export * from './lib/types/app-type.type'; export * from './lib/types/app-type.type';
export * from './lib/types/call-alarm.type'; export * from './lib/types/call-alarm.type';
export * from './lib/types/call-forward.type'; export * from './lib/types/call-forward.type';

View File

@ -11,7 +11,7 @@ import {
UserInfoSS, UserInfoSS,
DataUserResponse DataUserResponse
} from '@ucap-webmessenger/protocol-query'; } from '@ucap-webmessenger/protocol-query';
import { WorkStatusType } from 'projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type'; import { WorkStatusType } from '@ucap-webmessenger/protocol-status';
// export interface UserInfoSSForDaesang extends UserInfoSS { // export interface UserInfoSSForDaesang extends UserInfoSS {
// /****** For daesang ******/ // /****** For daesang ******/

View File

@ -1,6 +1,7 @@
import { RoleCode } from '@ucap-webmessenger/protocol-authentication'; import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
import { CommonUserInfo } from '@ucap-webmessenger/core';
export interface UserInfoDN { export interface UserInfoDN extends CommonUserInfo {
/** 사용자SEQ */ /** 사용자SEQ */
seq: number; seq: number;
/** 사용자명 */ /** 사용자명 */

View File

@ -1,7 +1,8 @@
import { EmployeeType } from '@ucap-webmessenger/protocol-room'; import { EmployeeType } from '@ucap-webmessenger/protocol-room';
import { RoleCode } from '@ucap-webmessenger/protocol-authentication'; import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
import { CommonUserInfo } from '@ucap-webmessenger/core';
export interface UserInfoF { export interface UserInfoF extends CommonUserInfo {
/** 사용자SEQ */ /** 사용자SEQ */
seq: number; seq: number;
/** 사용자명 */ /** 사용자명 */

View File

@ -1,9 +1,9 @@
import { RoleCode } from '@ucap-webmessenger/protocol-authentication'; import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
import { CallMode } from '@ucap-webmessenger/core'; import { CallMode, CommonUserInfo } from '@ucap-webmessenger/core';
import { EmployeeType } from '@ucap-webmessenger/protocol-room'; import { EmployeeType } from '@ucap-webmessenger/protocol-room';
import { WorkStatusType } from 'projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type'; import { WorkStatusType } from '@ucap-webmessenger/protocol-status';
export interface UserInfoSS { export interface UserInfoSS extends CommonUserInfo {
/** 사용자SEQ */ /** 사용자SEQ */
seq: number; seq: number;
/** 사용자명 */ /** 사용자명 */

View File

@ -15,7 +15,7 @@ import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
import { DeptSearchType } from '../types/dept-search.type'; import { DeptSearchType } from '../types/dept-search.type';
import { CallMode } from '@ucap-webmessenger/core'; import { CallMode } from '@ucap-webmessenger/core';
import { UserInfoSS } from '../models/user-info-ss'; import { UserInfoSS } from '../models/user-info-ss';
import { WorkStatusType } from 'projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type'; import { WorkStatusType } from '@ucap-webmessenger/protocol-status';
export interface DeptUserRequest extends ProtocolRequest { export interface DeptUserRequest extends ProtocolRequest {
/** DivCD(s) */ /** DivCD(s) */

View File

@ -16,5 +16,6 @@ export * from './lib/services/status-protocol.service';
export * from './lib/types/message-index.type'; export * from './lib/types/message-index.type';
export * from './lib/types/service'; export * from './lib/types/service';
export * from './lib/types/terminal-status.type'; export * from './lib/types/terminal-status.type';
export * from './lib/types/work-status.type';
export * from './lib/ucap-status-protocol.module'; export * from './lib/ucap-status-protocol.module';

View File

@ -1,7 +1,8 @@
import { RoleCode } from '@ucap-webmessenger/protocol-authentication'; import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
import { EmployeeType } from '@ucap-webmessenger/protocol-room'; import { EmployeeType } from '@ucap-webmessenger/protocol-room';
import { CommonUserInfo } from '@ucap-webmessenger/core';
export interface UserInfo { export interface UserInfo extends CommonUserInfo {
/** 사용자SEQ */ /** 사용자SEQ */
seq: number; seq: number;
/** 사용자명 */ /** 사용자명 */

View File

@ -4,6 +4,7 @@
export * from './lib/models/buddy-info'; export * from './lib/models/buddy-info';
export * from './lib/models/group-info'; export * from './lib/models/group-info';
export * from './lib/models/user-Info';
export * from './lib/protocols/buddy'; export * from './lib/protocols/buddy';
export * from './lib/protocols/group'; export * from './lib/protocols/group';
@ -14,4 +15,3 @@ export * from './lib/services/sync-protocol.service';
export * from './lib/ucap-sync-protocol.module'; export * from './lib/ucap-sync-protocol.module';
export * from './lib/types/service'; export * from './lib/types/service';
export * from './lib/types/userInfo';

View File

@ -16,7 +16,7 @@ import { FormControl } from '@angular/forms';
import { SmsUtils } from '@ucap-webmessenger/daesang'; import { SmsUtils } from '@ucap-webmessenger/daesang';
import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { SessionStorageService } from '@ucap-webmessenger/web-storage';
import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native'; import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native';
import { WorkStatusType } from 'projects/ucap-webmessenger-protocol-status/src/lib/types/work-status.type'; import { WorkStatusType } from '@ucap-webmessenger/protocol-status';
@Component({ @Component({
selector: 'ucap-profile-profile', selector: 'ucap-profile-profile',

View File

@ -23,9 +23,13 @@
</dt> </dt>
<dd class="info"> <dd class="info">
<div class="detail"> <div class="detail">
<!--morning-off:오전 afternoon-off:오후 day-off:휴가 long-time:장기 leave-of-absence:휴직-->
<div> <div>
<span class="work-status afternoon-off">오후</span> <span
*ngIf="getWorkstatusInfo('text').length > 0"
class="work-status"
[ngClass]="getWorkstatusInfo('style')"
>{{ getWorkstatusInfo('text') }}</span
>
<span class="name"> <span class="name">
<b>{{ userInfo | ucapTranslate: 'name' }}</b> <b>{{ userInfo | ucapTranslate: 'name' }}</b>
{{ userInfo | ucapTranslate: 'grade' }} {{ userInfo | ucapTranslate: 'grade' }}

View File

@ -12,7 +12,11 @@ import {
UserInfoF, UserInfoF,
UserInfoDN UserInfoDN
} from '@ucap-webmessenger/protocol-query'; } from '@ucap-webmessenger/protocol-query';
import { StatusBulkInfo, StatusInfo } from '@ucap-webmessenger/protocol-status'; import {
StatusBulkInfo,
StatusInfo,
WorkStatusType
} from '@ucap-webmessenger/protocol-status';
import { NGXLogger } from 'ngx-logger'; import { NGXLogger } from 'ngx-logger';
import { StatusCode } from '@ucap-webmessenger/core'; import { StatusCode } from '@ucap-webmessenger/core';
@ -112,4 +116,44 @@ export class UserListItemComponent implements OnInit {
this.openProfile.emit(userSeq); this.openProfile.emit(userSeq);
} }
getWorkstatusInfo(type: string): string {
let workstatus = this.userInfo.workstatus;
if (
!!this.presence &&
!!this.presence.workstatus &&
this.presence.workstatus.trim().length > 0
) {
workstatus = this.presence.workstatus;
}
let text = '';
// morning-off: 오전 afternoon-off: 오후 day-off: 휴가 long-time: 장기 leave-of-absence: 휴직
let style = '';
switch (workstatus) {
case WorkStatusType.VacationAM:
style = 'morning-off';
text = '오전';
break;
case WorkStatusType.VacationPM:
style = 'afternoon-off';
text = '오후';
break;
case WorkStatusType.VacationAll:
style = 'day-off';
text = '휴가';
break;
case WorkStatusType.LeaveOfAbsence:
style = 'leave-of-absence';
text = '휴직';
break;
case WorkStatusType.LongtermRefresh:
style = 'long-time';
text = '장기';
break;
}
return type === 'text' ? text : style;
}
} }