From c827a9cde34e440241134b816d63133c46cedaab Mon Sep 17 00:00:00 2001 From: leejh Date: Thu, 17 Oct 2019 11:49:41 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=A0=95=20::=20=EC=83=88=EB=A1=9C?= =?UTF-8?q?=EC=9A=B4=20=EB=8C=80=ED=99=94=20=EA=B0=9C=EC=84=A4=EC=9A=A9=20?= =?UTF-8?q?=EC=9C=A0=EC=A0=80=20=EC=84=A0=ED=83=9D=20=ED=8C=9D=EC=97=85=20?= =?UTF-8?q?>=20=EC=9C=A0=EC=A0=80=EC=84=A0=ED=83=9D=20=EC=9D=B4=EB=B2=A4?= =?UTF-8?q?=ED=8A=B8=20=EB=93=B1=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dialogs/create-chat.dialog.component.html | 37 +++++++++---------- .../dialogs/create-chat.dialog.component.ts | 32 ++++++++++++++-- .../components/expansion-panel.component.html | 3 +- .../components/expansion-panel.component.ts | 13 +++++++ .../components/user-list-item.component.html | 4 +- .../components/user-list-item.component.ts | 20 +++++++++- 6 files changed, 83 insertions(+), 26 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.html index 77859748..8e632e65 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.html @@ -9,39 +9,38 @@ group - - - - - - - + + + + + + device_hub - - - + chat - - - - + +
- choiced users +
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.ts index 73c120ef..93da2500 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/create-chat.dialog.component.ts @@ -20,7 +20,12 @@ import { RoomUserDetailData, RoomUserData } from '@ucap-webmessenger/protocol-sync'; -import { DeptSearchType } from '@ucap-webmessenger/protocol-query'; +import { + DeptSearchType, + UserInfoSS, + UserInfoF, + UserInfoDN +} from '@ucap-webmessenger/protocol-query'; import { RoomInfo, UserInfoShort, @@ -70,6 +75,9 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy { roomUserShortList: RoomUserData[]; roomSubscription: Subscription; + // 수집 데이터 + selectedUserList: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[] = []; + ngOnInit() { const loginInfo = this.sessionStorageService.get(KEY_LOGIN_INFO); this.companyCode = loginInfo.companyCode; @@ -189,9 +197,25 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy { ); } + onCheckGroup(params: { isChecked: boolean; group: GroupDetailData }) { + this.logger.debug(params); + } + onCheckUser(params: { + isChecked: boolean; + userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN; + }) { + if (params.isChecked) { + this.selectedUserList.push(params.userInfo); + } else { + this.selectedUserList = this.selectedUserList.filter( + item => item.seq !== params.userInfo.seq + ); + } + } + onClickChoice(choice: boolean): void { - this.dialogRef.close({ - choice - }); + // this.dialogRef.close({ + // choice + // }); } } diff --git a/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.html b/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.html index 17a31394..061fd0ef 100644 --- a/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.html +++ b/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.html @@ -28,7 +28,8 @@ (click)="onClickMore($event, groupBuddy.group)"> more_vert - + diff --git a/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.ts b/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.ts index 82d56061..8c021912 100644 --- a/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.ts +++ b/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.ts @@ -37,6 +37,12 @@ export class ExpansionPanelComponent implements OnInit { group: GroupDetailData; }>(); + @Output() + checkGroup = new EventEmitter<{ + isChecked: boolean; + group: GroupDetailData; + }>(); + @ContentChild(ExpansionPanelItemDirective, { read: TemplateRef, static: true @@ -60,4 +66,11 @@ export class ExpansionPanelComponent implements OnInit { onClickMore(event: MouseEvent, group: GroupDetailData) { this.more.emit({ event, group }); } + + onChangeCheck(value: boolean, group: GroupDetailData) { + this.checkGroup.emit({ + isChecked: value, + group + }); + } } diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.html b/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.html index 51e1c876..72e92c65 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.html +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.html @@ -33,5 +33,7 @@ - + + diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.ts b/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.ts index b2acbc60..05a5fdca 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.ts +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.ts @@ -23,6 +23,7 @@ import { StatusCode } from '@ucap-webmessenger/core'; import { PresenceType } from '../types/presence-type.type'; import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; +import { MatCheckboxChange, MatPseudoCheckbox } from '@angular/material'; @Component({ selector: 'ucap-profile-user-list-item', @@ -42,12 +43,19 @@ export class UserListItemComponent implements OnInit, OnDestroy { @Input() checkable = false; @Input() + isChecked = false; + @Input() compactable = false; @Input() sessionVerinfo: VersionInfo2Response; - userPresence: StatusBulkInfo | StatusInfo; + @Output() + checkUser = new EventEmitter<{ + isChecked: boolean; + userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN; + }>(); + userPresence: StatusBulkInfo | StatusInfo; PresenceType = PresenceType; // private profileImageRootSubscription: Subscription; @@ -106,4 +114,14 @@ export class UserListItemComponent implements OnInit, OnDestroy { return rtnClass; } + + onChangeCheck( + value: boolean, + userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN + ) { + this.checkUser.emit({ + isChecked: value, + userInfo + }); + } }