From 1d30d3568474a27b5e03eabbafac2431858497bd Mon Sep 17 00:00:00 2001 From: leejinho Date: Thu, 23 Jan 2020 13:07:13 +0900 Subject: [PATCH] =?UTF-8?q?#=20=EC=9D=B4=EC=8A=88=EC=B2=98=EB=A6=AC=20179?= =?UTF-8?q?=20=EC=A1=B0=EC=A7=81=EB=8F=84=20=EC=A0=84=EC=B2=B4=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=20=ED=9B=84=20=EA=B7=B8=EB=A3=B9=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EC=8B=9C=20=EC=A0=84=EC=B2=B4=20=EC=84=A0=ED=83=9D=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C=20=EB=82=A8=EC=95=84=EC=9E=88=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../left-sidenav/organization.component.ts | 34 ++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) 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 ae643136..331fc941 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 @@ -6,7 +6,8 @@ import { EventEmitter, Input, ViewChild, - AfterViewChecked + AfterViewChecked, + ChangeDetectorRef } from '@angular/core'; import { ucapAnimations, DialogService } from '@ucap-webmessenger/ui'; import { Observable, Subscription, of } from 'rxjs'; @@ -158,6 +159,7 @@ export class OrganizationComponent private queryProtocolService: QueryProtocolService, private dialogService: DialogService, private translateService: TranslateService, + private changeDetectorRef: ChangeDetectorRef, private logger: NGXLogger ) { this.loginInfo = this.sessionStorageService.get(KEY_LOGIN_INFO); @@ -374,13 +376,15 @@ export class OrganizationComponent if ( !compareList || compareList.length === 0 || - compareList.filter( - item => - !( - this.selectedUserList.filter(user => user.seq === item.seq).length > - 0 - ) - ).length > 0 + compareList + .filter(item => item.seq !== this.loginRes.userSeq) + .filter( + item => + !( + this.selectedUserList.filter(user => user.seq === item.seq) + .length > 0 + ) + ).length > 0 ) { return false; } else { @@ -418,6 +422,8 @@ export class OrganizationComponent : this.selectedDepartmentUserInfoList ).filter(user => user.seq !== this.loginRes.userSeq) }); + + this.changeDetectorRef.detectChanges(); } /** 리스트가 checkable 할 경우 checkbox 의 change 이벤트를 상위 컴포넌트로 전달한다. */ @@ -507,10 +513,22 @@ export class OrganizationComponent const seq: number[] = []; this.selectedUserList.map(user => seq.push(user.seq)); this.store.dispatch(ChatStore.openRoom({ userSeqList: seq })); + + // 상위 컴포넌트의 selectedUserList clear. + this.checkAllUser.emit({ + isChecked: false, + userInfos: this.selectedUserList + }); } } onClickConference() { this.logger.debug('onClickConference', this.selectedUserList); + + // 상위 컴포넌트의 selectedUserList clear. + this.checkAllUser.emit({ + isChecked: false, + userInfos: this.selectedUserList + }); } onContextMenuOrgUser(