From 715850bfed14fa13f13661bba5ccca8a3bbedaab Mon Sep 17 00:00:00 2001 From: leejinho Date: Fri, 14 Feb 2020 10:30:27 +0900 Subject: [PATCH] =?UTF-8?q?#=20=EC=9D=B4=EC=8A=88=EC=B2=98=EB=A6=AC=20255,?= =?UTF-8?q?=20258,=20259,=20260?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../left-sidenav/organization.component.html | 2 +- .../left-sidenav/organization.component.ts | 8 +++- .../chat/create-chat.dialog.component.html | 2 +- .../src/app/store/messenger/event/effects.ts | 2 +- .../src/app/store/messenger/room/effects.ts | 5 ++- .../src/app/store/messenger/sync/effects.ts | 45 ++++++++++++------- .../message-box/mass.component.html | 2 +- .../message-box/sticker.component.html | 2 +- 8 files changed, 44 insertions(+), 24 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html index 472b97b0..b01b9f76 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html @@ -1,4 +1,4 @@ -
+

{{ 'organization.chart' | translate }}

diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts index d4a247ad..18340d9a 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts @@ -93,7 +93,7 @@ export class OrganizationComponent orgUserContextMenuPosition = { x: '0px', y: '0px' }; @Input() - showTitle = true; + isMain = true; @Input() /** 사용자 선택용으로 사용시 true 로 유입 */ isUserSelect = false; @@ -651,7 +651,11 @@ export class OrganizationComponent event.preventDefault(); event.stopPropagation(); - if (!this.loginRes || userInfo.seq === this.loginRes.userSeq) { + if ( + !this.isMain || + !this.loginRes || + userInfo.seq === this.loginRes.userSeq + ) { return; } diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html index 560a5ac1..39ccb89a 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html @@ -175,7 +175,7 @@
{ - // return inviteSuccess(res); + // Sync + this.store.dispatch(inviteSuccess(res)); + + // RoomInfo const loginInfo = this.sessionStorageService.get( KEY_LOGIN_INFO ); diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts index 4b300784..d4a27c30 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts @@ -223,29 +223,42 @@ export class Effects { case SSVC_TYPE_SYNC_ROOM_USER: { const roomUserData = res as RoomUserData; - if (!roomUserInfoMap[roomUserData.roomSeq]) { - roomUserInfoMap[roomUserData.roomSeq] = { - userInfoList: [], - userInfoShortList: [] - }; + if ( + roomList.length > 0 && + roomList.filter(r => r.roomSeq === roomUserData.roomSeq) + .length > 0 + ) { + if (!roomUserInfoMap[roomUserData.roomSeq]) { + roomUserInfoMap[roomUserData.roomSeq] = { + userInfoList: [], + userInfoShortList: [] + }; + } + roomUserInfoMap[ + roomUserData.roomSeq + ].userInfoShortList.push(...roomUserData.userInfos); } - roomUserInfoMap[ - roomUserData.roomSeq - ].userInfoShortList.push(...roomUserData.userInfos); } break; case SSVC_TYPE_SYNC_ROOM_USER2: { const roomUserDetailData = res as RoomUserDetailData; - if (!roomUserInfoMap[roomUserDetailData.roomSeq]) { - roomUserInfoMap[roomUserDetailData.roomSeq] = { - userInfoList: [], - userInfoShortList: [] - }; + if ( + roomList.length > 0 && + roomList.filter( + r => r.roomSeq === roomUserDetailData.roomSeq + ).length > 0 + ) { + if (!roomUserInfoMap[roomUserDetailData.roomSeq]) { + roomUserInfoMap[roomUserDetailData.roomSeq] = { + userInfoList: [], + userInfoShortList: [] + }; + } + roomUserInfoMap[ + roomUserDetailData.roomSeq + ].userInfoList.push(...roomUserDetailData.userInfos); } - roomUserInfoMap[ - roomUserDetailData.roomSeq - ].userInfoList.push(...roomUserDetailData.userInfos); } break; case SSVC_TYPE_SYNC_ROOM_RES: diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass.component.html index 5422db79..6d5ff6b1 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass.component.html @@ -1,7 +1,7 @@
{{ message.sendDate | ucapDate: 'YYYY.MM.DD a hh:mm' }} diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/sticker.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/sticker.component.html index 4add2d59..1a653b7b 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/sticker.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/sticker.component.html @@ -8,7 +8,7 @@