From 41890118e3af0456ae46a95d37d7ab2dcd40b9be Mon Sep 17 00:00:00 2001 From: Richard Park Date: Wed, 25 Sep 2019 16:12:28 +0900 Subject: [PATCH] bug fixed --- .../src/lib/models/buddy.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/projects/ucap-webmessenger-protocol-sync/src/lib/models/buddy.ts b/projects/ucap-webmessenger-protocol-sync/src/lib/models/buddy.ts index 390ca5fa..06f6687c 100644 --- a/projects/ucap-webmessenger-protocol-sync/src/lib/models/buddy.ts +++ b/projects/ucap-webmessenger-protocol-sync/src/lib/models/buddy.ts @@ -80,6 +80,7 @@ export const decodeBuddyDetailData: ProtocolDecoder = ( const buddyInfos: UserInfo[] = []; message.bodyList.forEach(buddyinfo => { const info = buddyinfo.split(BodyStringDivider); + console.log('buddyinfo', info); let i = 0; buddyInfos.push({ seq: info[i], @@ -91,11 +92,11 @@ export const decodeBuddyDetailData: ProtocolDecoder = ( hpNumber: info[i++], lineNumber: info[i++], email: info[i++], - isMobile: info[i++], + isMobile: info[i++] === 'Y' ? true : false, deptName: info[i++], - isFavorit: info[i++], - isBuddy: info[i++], - isActive: info[i++], + isFavorit: info[i++] === 'Y' ? true : false, + isBuddy: info[i++] === 'Y' ? true : false, + isActive: info[i++] === 'Y' ? true : false, roleCd: info[i++], employeeNum: info[i++], madn: info[i++], @@ -107,8 +108,8 @@ export const decodeBuddyDetailData: ProtocolDecoder = ( gradeCn: info[i++], deptNameEn: info[i++], deptNameCn: info[i++], - isPrivacyAgree: info[i++], - isValidLogin: info[i++], + isPrivacyAgree: info[i++] === 'Y' ? true : false, + isValidLogin: info[i++] === 'Y' ? true : false, employeeType: info[i++], nickName: info[i++] });