From d8be9275d982dc947ec1986379e2a1d8657ac188 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Wed, 2 Oct 2019 10:35:33 +0900 Subject: [PATCH] index bug fixed --- .../src/lib/models/buddy.ts | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 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 4ab20b51..789fb05a 100644 --- a/projects/ucap-webmessenger-protocol-sync/src/lib/models/buddy.ts +++ b/projects/ucap-webmessenger-protocol-sync/src/lib/models/buddy.ts @@ -81,37 +81,37 @@ export const decodeBuddyDetailData: ProtocolDecoder = ( const buddyInfos: UserInfo[] = []; message.bodyList.forEach(buddyinfo => { const info = buddyinfo.split(BodyStringDivider); - let i = 0; + buddyInfos.push({ - seq: Number(info[i]), - name: info[i++], - profileImageFile: info[i++], - grade: info[i++], - intro: info[i++], - companyCode: info[i++], - hpNumber: info[i++], - lineNumber: info[i++], - email: info[i++], - isMobile: info[i++] === 'Y' ? true : false, - deptName: 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++], - hardSadn: info[i++], - fmcSadn: info[i++], - nameEn: info[i++], - nameCn: info[i++], - gradeEn: info[i++], - gradeCn: info[i++], - deptNameEn: info[i++], - deptNameCn: info[i++], - isPrivacyAgree: info[i++] === 'Y' ? true : false, - isValidLogin: info[i++] === 'Y' ? true : false, - employeeType: info[i++] as EmployeeType, - nickName: info[i++] + seq: Number(info[0]), + name: info[1], + profileImageFile: info[2], + grade: info[3], + intro: info[4], + companyCode: info[5], + hpNumber: info[6], + lineNumber: info[7], + email: info[8], + isMobile: info[9] === 'Y' ? true : false, + deptName: info[10], + isFavorit: info[11] === 'Y' ? true : false, + isBuddy: info[12] === 'Y' ? true : false, + isActive: info[13] === 'Y' ? true : false, + roleCd: info[14], + employeeNum: info[15], + madn: info[16], + hardSadn: info[17], + fmcSadn: info[18], + nameEn: info[19], + nameCn: info[20], + gradeEn: info[21], + gradeCn: info[22], + deptNameEn: info[23], + deptNameCn: info[24], + isPrivacyAgree: info[25] === 'Y' ? true : false, + isValidLogin: info[26] === 'Y' ? true : false, + employeeType: info[27] as EmployeeType, + nickName: info[28] }); }); return {