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); + } }