diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts index 333ef40e..9072f145 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/profile/profile.dialog.component.ts @@ -543,7 +543,10 @@ export class ProfileDialogComponent implements OnInit, OnDestroy { ); let elephantUrl = links[0].url - .replace(/(\(%USER_PASS%\))/g, appUserInfo.loginPw) // exchange USER_PASS params + .replace( + /(\(%USER_PASS%\))/g, + encodeURIComponent(appUserInfo.loginPw) + ) // exchange USER_PASS params .replace('kind%3D3', 'kind%3D2'); // change value of 'kind' elephantUrl += '%26empno%3D' + this.userInfo.employeeNum + ','; // add parameter of 'empno' diff --git a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts index 8829f193..9b72055b 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts @@ -258,9 +258,9 @@ export class TopBarComponent implements OnInit, OnDestroy { ); const WebLinkMailCnt = link[0]; - const loginPw = appUserInfo.loginPw; + const loginPw = encodeURIComponent(appUserInfo.loginPw); const loginPw2 = this.loginInfo.loginPw; - const loginId = this.loginInfo.loginId; + const loginId = encodeURIComponent(this.loginInfo.loginId); const token = loginRes.tokenString; const url = WebLinkMailCnt.url @@ -268,6 +268,15 @@ export class TopBarComponent implements OnInit, OnDestroy { .replace(/(\(%USER_ID%\))/g, loginId) .replace(/(\(%USER_PASS%\))/g, loginPw); + this.daesangApiService + .retrieveMailCount(url) + .pipe( + take(1), + map(res => (this.webLinkBadgeMail = res.count)), + catchError(error => of(this.logger.log(error))) + ) + .subscribe(); + // interval if (!this.webLinkbadgeEmailCountInterval) { this.webLinkbadgeEmailCountInterval = setInterval(() => { this.daesangApiService @@ -294,9 +303,9 @@ export class TopBarComponent implements OnInit, OnDestroy { ); const WebLinkPaymentCnt = link[0]; - const loginPw = appUserInfo.loginPw; + const loginPw = encodeURIComponent(appUserInfo.loginPw); const loginPw2 = this.loginInfo.loginPw; - const loginId = this.loginInfo.loginId; + const loginId = encodeURIComponent(this.loginInfo.loginId); const token = loginRes.tokenString; const url = WebLinkPaymentCnt.url @@ -422,9 +431,9 @@ export class TopBarComponent implements OnInit, OnDestroy { environment.customConfig.appKey ); - const loginPw = appUserInfo.loginPw; + const loginPw = encodeURIComponent(appUserInfo.loginPw); const loginPw2 = this.loginInfo.loginPw; - const loginId = this.loginInfo.loginId; + const loginId = encodeURIComponent(this.loginInfo.loginId); const token = this.loginRes.tokenString; const erpPw = this.daesangCipherService.encryptForSapErp( 'aes256-daesang-key!!',