From 914d62d48b213208defe7273c7df89462be40879 Mon Sep 17 00:00:00 2001 From: leejh Date: Tue, 22 Oct 2019 17:49:18 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B8=B0=EB=8A=A5=EC=B6=94=EA=B0=80=20::=20?= =?UTF-8?q?=EC=A1=B0=EC=A7=81=EB=8F=84=20>=20=ED=95=98=EB=8B=A8=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20>=20=EB=8C=80=ED=99=94=20::=20=EB=8C=80=ED=99=94?= =?UTF-8?q?=EA=B0=9C=EC=84=A4=20=EA=B8=B0=EB=8A=A5=20=E3=85=8A=EA=B5=AC?= =?UTF-8?q?=E3=85=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/left-side.component.html | 5 +++- .../components/left-side.component.ts | 29 +++++++++++++++++++ .../left-sidenav/organization.component.html | 9 +++++- .../left-sidenav/organization.component.ts | 18 ++++++++++++ 4 files changed, 59 insertions(+), 2 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html index 0b828c20..d9dd91b3 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.html @@ -30,7 +30,10 @@ device_hub - + diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.ts index dd105a29..9e1ef530 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.ts @@ -12,6 +12,12 @@ import { Store, select } from '@ngrx/store'; import * as AppStore from '@app/store'; import * as ChatStore from '@app/store/messenger/chat'; +import { UserInfo } from '@ucap-webmessenger/protocol-sync'; +import { + UserInfoSS, + UserInfoF, + UserInfoDN +} from '@ucap-webmessenger/protocol-query'; @Component({ selector: 'app-layout-messenger-left-side', @@ -22,6 +28,9 @@ import * as ChatStore from '@app/store/messenger/chat'; export class LeftSideComponent implements OnInit { badgeChatUnReadCount$: Observable; + /** 조직도에서 부서원 선택 */ + selectedUserList: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[] = []; + constructor( private store: Store, private dialogService: DialogService, @@ -57,4 +66,24 @@ export class LeftSideComponent implements OnInit { } } } + + /** 조직도>부서원 :: 리스트의 checkbox 의 이벤트를 받아 선택된 유저리스트를 수집. */ + onCheckUser(params: { + isChecked: boolean; + userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN; + }) { + if (params.isChecked) { + if ( + this.selectedUserList.filter(user => user.seq === params.userInfo.seq) + .length === 0 && + params.userInfo + ) { + this.selectedUserList = [...this.selectedUserList, params.userInfo]; + } + } else { + this.selectedUserList = this.selectedUserList.filter( + item => item.seq !== params.userInfo.seq + ); + } + } } 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 3c7629cd..04f77885 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 @@ -30,6 +30,13 @@
- (하단버튼영역) + + + +
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 e40e0ecb..48bd1ee4 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 @@ -23,6 +23,7 @@ import { NGXLogger } from 'ngx-logger'; import * as AppStore from '@app/store'; import * as QueryStore from '@app/store/messenger/query'; +import * as ChatStore from '@app/store/messenger/chat'; import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { LoginInfo, KEY_LOGIN_INFO } from '@app/types'; import { take, map, tap, delay } from 'rxjs/operators'; @@ -180,4 +181,21 @@ export class OrganizationComponent implements OnInit, OnDestroy { }) { this.checkUser.emit(params); } + + onClickShowSelectedUserList() { + this.logger.debug('onClickShowSelectedUserList', this.selectedUserList); + } + onClickAddGroup() { + this.logger.debug('onClickAddGroup', this.selectedUserList); + } + onClickChatOpen() { + if (!!this.selectedUserList && this.selectedUserList.length > 0) { + const seq: number[] = []; + this.selectedUserList.map(user => seq.push(user.seq)); + this.store.dispatch(ChatStore.openRoom({ userSeqList: seq })); + } + } + onClickConference() { + this.logger.debug('onClickConference', this.selectedUserList); + } }