From 704ecb61ca76145590913e98a59b879f592b586c Mon Sep 17 00:00:00 2001 From: leejinho Date: Fri, 27 Dec 2019 16:34:38 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EC=A0=95=EB=A0=AC=EA=B8=B0=EB=8A=A5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/store/messenger/query/reducers.ts | 13 +++- .../src/lib/protocols/buddy.ts | 4 +- .../src/lib/types/userInfo.ts | 61 ++++++++++--------- .../components/expansion-panel.component.ts | 10 ++- 4 files changed, 56 insertions(+), 32 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/query/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/query/reducers.ts index 8238fd93..c6e3f073 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/query/reducers.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/query/reducers.ts @@ -35,9 +35,20 @@ export const reducer = createReducer( }), on(deptUserSuccess, (state, action) => { + const userList = action.userInfos.sort((a, b) => + a.order < b.order + ? -1 + : a.order > b.order + ? 1 + : a.name < b.name + ? -1 + : a.name > b.name + ? 1 + : 0 + ); return { ...state, - selectedDepartmentUserInfoList: action.userInfos, + selectedDepartmentUserInfoList: userList, selectedDepartmentStatus: action.res, selectedDepartmentProcessing: false }; diff --git a/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/buddy.ts b/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/buddy.ts index d5cf714a..1586fe62 100644 --- a/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/buddy.ts +++ b/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/buddy.ts @@ -104,7 +104,9 @@ export const decodeBuddyDetailData: ProtocolDecoder = ( isPrivacyAgree: info[25] === 'Y' ? true : false, isValidLogin: info[26] === 'Y' ? true : false, employeeType: info[27] as EmployeeType, - nickName: info[28] + nickName: info[28], + + order: info[29] }); }); return decodeProtocolMessage(message, { diff --git a/projects/ucap-webmessenger-protocol-sync/src/lib/types/userInfo.ts b/projects/ucap-webmessenger-protocol-sync/src/lib/types/userInfo.ts index 634d26b2..a6f3edec 100644 --- a/projects/ucap-webmessenger-protocol-sync/src/lib/types/userInfo.ts +++ b/projects/ucap-webmessenger-protocol-sync/src/lib/types/userInfo.ts @@ -2,62 +2,65 @@ import { RoleCode } from '@ucap-webmessenger/protocol-authentication'; import { EmployeeType } from '@ucap-webmessenger/protocol-room'; export interface UserInfo { - // 사용자SEQ + /** 사용자SEQ */ seq: number; - // 사용자명 + /** 사용자명 */ name: string; - // 사진파일 + /** 사진파일 */ profileImageFile: string; - // 직급 + /** 직급 */ grade: string; - // 업무소개 + /** 업무소개 */ intro: string; - // 기관코드 + /** 기관코드 */ companyCode: string; - // 핸드폰번호 + /** 핸드폰번호 */ hpNumber: string; - // 내선번호 + /** 내선번호 */ lineNumber: string; - // 이메일 + /** 이메일 */ email: string; - // 모바일YN + /** 모바일YN */ isMobile: boolean; - // 부서명 + /** 부서명 */ deptName: string; - // 즐.찾 여부 + /** 즐.찾 여부 */ isFavorit: boolean; - // 친구여부 + /** 친구여부 */ isBuddy: boolean; - // ActiveYN + /** ActiveYN */ isActive: boolean; - // 역할코드 + /** 역할코드 */ roleCd: RoleCode; - // 사번 + /** 사번 */ employeeNum: string; - // MADN + /** MADN */ madn: string; - // HARDPHONE_SADN + /** HARDPHONE_SADN */ hardSadn: string; - // FMC_SADN + /** FMC_SADN */ fmcSadn: string; - // 사용자명(영어) + /** 사용자명(영어) */ nameEn: string; - // 사용자명(중국어) + /** 사용자명(중국어) */ nameCn: string; - // 직급(영어) + /** 직급(영어) */ gradeEn: string; - // 직급(중국어) + /** 직급(중국어) */ gradeCn: string; - // 부서명(영어) + /** 부서명(영어) */ deptNameEn: string; - // 부서명(중국어) + /** 부서명(중국어) */ deptNameCn: string; - // 이용약관동의여부YN + /** 이용약관동의여부YN */ isPrivacyAgree: boolean; - // 유효접속여부YN + /** 유효접속여부YN */ isValidLogin: boolean; - // 임직원유형(s) + /** 임직원유형(s) */ employeeType: EmployeeType; - // 별명 + /** 별명 */ nickName: string; + + /** 조회순서 */ + order?: string; } diff --git a/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.ts b/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.ts index 981a53d1..e4e05178 100644 --- a/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.ts +++ b/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.ts @@ -127,7 +127,15 @@ export class ExpansionPanelComponent }; item.buddyList.sort((a, b) => - a.name < b.name ? -1 : a.name > b.name ? 1 : 0 + a.order < b.order + ? -1 + : a.order > b.order + ? 1 + : a.name < b.name + ? -1 + : a.name > b.name + ? 1 + : 0 ); item.buddyList.forEach(userInfo => {