From f1e789cbb6cc8734441088e7e03f0d5687631c41 Mon Sep 17 00:00:00 2001 From: leejinho Date: Thu, 26 Mar 2020 14:54:00 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=EB=A1=9C=EA=B9=85=20=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ucap-webmessenger-electron/src/index.ts | 21 +++++++++++++++++-- .../src/lib/components/chat.component.ts | 4 +++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/electron-projects/ucap-webmessenger-electron/src/index.ts b/electron-projects/ucap-webmessenger-electron/src/index.ts index 2784fe61..ad714b2f 100644 --- a/electron-projects/ucap-webmessenger-electron/src/index.ts +++ b/electron-projects/ucap-webmessenger-electron/src/index.ts @@ -7,7 +7,8 @@ import { shell, dialog, BrowserWindow, - clipboard + clipboard, + crashReporter } from 'electron'; import path from 'path'; import fse from 'fs-extra'; @@ -133,6 +134,12 @@ function getUptimeInSeconds() { return (now() - launchTime) / 1000; } +crashReporter.start({ + productName: app.name, + companyName: app.getVersion(), + submitURL: 'https//localhost' +}); + process.on('uncaughtException', (error: Error) => { // error = withSourceMappedStack(error); // reportError(error, getExtraErrorContext()); @@ -212,6 +219,7 @@ function createWindow() { } window.onClose(() => { + process.crash(); appWindow = null; if (!__DARWIN__ && !preventQuit) { app.quit(); @@ -671,9 +679,18 @@ ipcMain.on( properties: ['openDirectory'] }) .then(value => { - event.returnValue = value.filePaths[0]; + if (!!value) { + event.returnValue = value.filePaths[0]; + } else { + log.error( + '[IpcMain / SelectDirectory]', + 'Value is null or undefined' + ); + event.returnValue = undefined; + } }) .catch(reason => { + log.error('[IpcMain / SelectDirectory]', reason); event.returnValue = undefined; }); } diff --git a/projects/ucap-webmessenger-ui-settings/src/lib/components/chat.component.ts b/projects/ucap-webmessenger-ui-settings/src/lib/components/chat.component.ts index 410ef913..e71f9d0c 100644 --- a/projects/ucap-webmessenger-ui-settings/src/lib/components/chat.component.ts +++ b/projects/ucap-webmessenger-ui-settings/src/lib/components/chat.component.ts @@ -62,7 +62,9 @@ export class ChatComponent implements OnInit { this.emit({ ...this.setting, downloadPath: path }); } }) - .catch(reason => {}); + .catch(reason => { + this.nativeService.appLogging(reason); + }); } private emit(setting: ChatSetting) { From dcee3f117f8b678cc11f7c6128c7091c30e42d4f Mon Sep 17 00:00:00 2001 From: leejinho Date: Thu, 26 Mar 2020 14:54:29 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=EB=B0=B1=EA=B7=B8=EB=9D=BC=EC=9A=B4?= =?UTF-8?q?=EB=93=9C=20=EC=83=81=ED=99=A9=EC=8B=9C=20=EB=85=B8=ED=8B=B0=20?= =?UTF-8?q?=ED=8C=9D=EC=97=85,=20=EB=B8=94=EB=A7=81=ED=81=AC=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/AppWindow.ts | 7 ++++--- .../src/app/services/notification.service.ts | 19 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts index d0196aa4..134bf0fa 100644 --- a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts +++ b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts @@ -88,6 +88,10 @@ export class AppWindow { // windows Focus or Blur state detacted. this.window.on(ElectronBrowserWindowChannel.Focus, () => { + if (__WIN32__) { + this.window.flashFrame(false); + } + this.window.webContents.send( WindowStateChannel.FocuseChanged, ElectronBrowserWindowChannel.Focus @@ -122,9 +126,6 @@ export class AppWindow { this.window.hide(); // } }); - this.window.on(ElectronBrowserWindowChannel.Focus, e => { - this.window.flashFrame(false); - }); } if (__WIN32__) { diff --git a/projects/ucap-webmessenger-app/src/app/services/notification.service.ts b/projects/ucap-webmessenger-app/src/app/services/notification.service.ts index 335b1586..68db247f 100644 --- a/projects/ucap-webmessenger-app/src/app/services/notification.service.ts +++ b/projects/ucap-webmessenger-app/src/app/services/notification.service.ts @@ -286,16 +286,15 @@ export class AppNotificationService { doNoti = false; } - // // 포커스 아웃일때 무조건 노티. - // // Case 1 : 단순 포커스 아웃. - // // Case 2 : hidden 시 포커스 인 상태이지만 위에서 필터링 됨. - // console.log(windowState); - // if ( - // windowState.windowFocusState !== - // ElectronBrowserWindowChannel.Focus - // ) { - // doNoti = true; - // } + // 포커스 아웃일때 무조건 노티. + // Case 1 : 단순 포커스 아웃. + // Case 2 : hidden 시 포커스 인 상태이지만 위에서 필터링 됨. + if ( + windowState.windowFocusState !== + ElectronBrowserWindowChannel.Focus + ) { + doNoti = true; + } // 방별 알림이 꺼져 있으면 노티 안함. > 우선순위 최상위. if ( From b0eb19e82e6e16bcf2641853d5d7f6c5eab9d246 Mon Sep 17 00:00:00 2001 From: leejinho Date: Thu, 26 Mar 2020 15:37:07 +0900 Subject: [PATCH 3/5] =?UTF-8?q?ERP=20weblink=20=EC=97=B0=EB=8F=99=EC=8B=9C?= =?UTF-8?q?=20=EC=82=AC=EB=B2=88=20uppercase=20=ED=9B=84=20=EC=95=94?= =?UTF-8?q?=ED=98=B8=ED=99=94=20=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/services/daesang-cipher.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/ucap-webmessenger-daesang/src/lib/services/daesang-cipher.service.ts b/projects/ucap-webmessenger-daesang/src/lib/services/daesang-cipher.service.ts index d5d81d96..fb231098 100644 --- a/projects/ucap-webmessenger-daesang/src/lib/services/daesang-cipher.service.ts +++ b/projects/ucap-webmessenger-daesang/src/lib/services/daesang-cipher.service.ts @@ -53,7 +53,8 @@ export class DaesangCipherService { encryptForSapErp(pvUserKey: string, employeeNum: string): string { // const txt = '20200221090321_asdfghjk'; // 1QgLAiLqJ6Uo6bE4Qk1o3Yd6mfqxXSnmqXX%2FXLL7DoA%3D // const txt = '20200221101444_asdfghjk'; // Lz1TIdGTQQMui%2BBHMdj8fatYYhXbwJEL%2BJ91C7jUWEs%3D - const str = moment().format('YYYYMMDDHHmmss') + '_' + employeeNum; + const str = + moment().format('YYYYMMDDHHmmss') + '_' + employeeNum.toUpperCase(); const secretKeyToByteArray: Buffer = Buffer.from(pvUserKey, 'utf8').slice( 0, 16 From 35a7aff698a73c4d68f73fd795bf92f1288f4b00 Mon Sep 17 00:00:00 2001 From: leejinho Date: Thu, 26 Mar 2020 15:45:59 +0900 Subject: [PATCH 4/5] =?UTF-8?q?1:1=20=EB=8C=80=ED=99=94=EB=B0=A9=EC=9D=B4?= =?UTF-8?q?=EB=A9=B0=20=EB=8C=80=ED=99=94=EB=B0=A9=EB=AA=85=EC=9D=B4=20?= =?UTF-8?q?=EC=A7=80=EC=A0=95=EB=90=98=EC=A7=80=20=EC=95=8A=EC=95=98?= =?UTF-8?q?=EC=9D=84=20=EA=B2=BD=EC=9A=B0=EC=97=90=20=EB=8C=80=ED=99=94?= =?UTF-8?q?=EB=B0=A9=EB=AA=85=EC=97=90=20"=EC=9D=B4=EB=A6=84=20=EC=A7=81?= =?UTF-8?q?=EA=B8=89=20=EB=82=B4=EC=84=A0=20=EB=AA=A8=EB=B0=94=EC=9D=BC"?= =?UTF-8?q?=20=EB=A1=9C=20=ED=91=9C=ED=98=84=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/messages.component.html | 30 ++++++++++++ .../components/messages.component.scss | 8 ++++ .../components/messages.component.ts | 46 ++++++++++++++++++- .../components/main.page.component.html | 1 + 4 files changed, 84 insertions(+), 1 deletion(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html index 2774fbf6..20681eae 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html @@ -91,6 +91,36 @@ {{ getRoomNameByRoomUser(_roomUserInfos) }} + + + {{ getSingleRoomUserInfosGrade(_roomUserInfos) }} + + + / {{ getSingleRoomUserInfosLineNumber(_roomUserInfos) }} + + + / {{ getSingleRoomUserInfosHpNumber(_roomUserInfos) }} + + diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss index 72bde422..61e48675 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss @@ -77,6 +77,14 @@ font-size: 0.94rem; line-height: normal; @include ellipsis(1); + + .more-info { + font-size: 0.9rem; + color: #656565; + .callable { + cursor: pointer; + } + } } .room-type { font-size: 0.9rem; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts index 935fb921..edd74ac7 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts @@ -27,7 +27,8 @@ import { AlertSnackbarComponent, AlertSnackbarData, TranslateService as UiTranslateService, - TranslatePipe as UiTranslatePipe + TranslatePipe as UiTranslatePipe, + StringFormatterPhonePipe } from '@ucap-webmessenger/ui'; import { Store, select } from '@ngrx/store'; import { NGXLogger } from 'ngx-logger'; @@ -143,6 +144,7 @@ import { EventDownloadRequest } from '@ucap-webmessenger/api-message'; import moment from 'moment'; +import { start } from 'repl'; @Component({ selector: 'app-layout-messenger-messages', @@ -158,6 +160,8 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { }>(); @Output() closeRightDrawer = new EventEmitter(); + @Output() + sendCall = new EventEmitter(); @ViewChild('chatSearch', { static: false }) private chatSearch: SearchComponent; @@ -534,6 +538,46 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { return roomName; } + getSingleRoomUserInfosGrade(roomUserInfos: any[]) { + if (roomUserInfos.length > 0) { + return new UiTranslatePipe( + this.uiTranslateService, + this.changeDetectorRef + ).transform(roomUserInfos, 'grade', ','); + } + return ''; + } + getSingleRoomUserInfosLineNumber(roomUserInfos: any[]) { + if ( + roomUserInfos.length > 0 && + !!roomUserInfos[0].lineNumber && + roomUserInfos[0].lineNumber.trim().length > 0 + ) { + return `${new StringFormatterPhonePipe().transform( + roomUserInfos[0].lineNumber + )}`; + } + } + getSingleRoomUserInfosHpNumber(roomUserInfos: any[]) { + if ( + roomUserInfos.length > 0 && + !!roomUserInfos[0].hpNumber && + roomUserInfos[0].hpNumber.trim().length > 0 + ) { + return `${new StringFormatterPhonePipe().transform( + roomUserInfos[0].hpNumber + )}`; + } + } + + onClickSendClickToCall(type: string) { + if(type === 'LINE') { + this.sendCall.emit(this._roomUserInfos[0].lineNumber); + } else if(type === 'MOBILE') { + this.sendCall.emit(this._roomUserInfos[0].hpNumber); + } + } + /** 대화전송 가능한 방인지 판단 */ getEnableSend() { if (!this.roomInfoSubject.value) { diff --git a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.html b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.html index 7a85bfed..3c72fa64 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.html +++ b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.html @@ -32,6 +32,7 @@ *ngIf="!!(this.selectedChat$ | async)" (openProfile)="onClickOpenProfile($event)" (closeRightDrawer)="onCloseRightDrawer()" + (sendCall)="sendClickToCall($event)" >