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(