유저선택 팝업 선택 안되는 버그 수정.
This commit is contained in:
parent
1edba79352
commit
2dc7c0da57
|
@ -149,6 +149,7 @@
|
|||
[selectedUserList]="selectedUserList"
|
||||
(checkAllUser)="onCheckAllUser($event)"
|
||||
(checkUser)="onCheckUser($event)"
|
||||
(toggleUser)="onToggleUser($event)"
|
||||
class="organization-side"
|
||||
></app-layout-chat-left-sidenav-organization>
|
||||
</div>
|
||||
|
|
|
@ -245,6 +245,18 @@ export class LeftSideComponent implements OnInit {
|
|||
);
|
||||
}
|
||||
}
|
||||
onToggleUser(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) {
|
||||
if (
|
||||
this.selectedUserList.filter(user => user.seq === userInfo.seq).length ===
|
||||
0
|
||||
) {
|
||||
this.selectedUserList = [...this.selectedUserList, userInfo];
|
||||
} else {
|
||||
this.selectedUserList = this.selectedUserList.filter(
|
||||
item => item.seq !== userInfo.seq
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/** FAB */
|
||||
onClickFab(params: { btn: any }) {
|
||||
|
|
|
@ -54,20 +54,11 @@
|
|||
[selectedUserList]="selectedUserList"
|
||||
[isChecked]="getCheckedUser(userInfo)"
|
||||
(checkUser)="onCheckUser($event)"
|
||||
(click)="onToggleUser(userInfo)"
|
||||
>
|
||||
Loading...
|
||||
</ucap-profile-user-list-item>
|
||||
</cdk-virtual-scroll-viewport>
|
||||
<!-- <ucap-profile-user-list-item
|
||||
*ngFor="let userInfo of selectedDepartmentUserInfoList$ | async"
|
||||
[userInfo]="userInfo"
|
||||
[checkable]="true"
|
||||
[sessionVerinfo]="sessionVerinfo"
|
||||
[selectedUserList]="selectedUserList"
|
||||
[isChecked]="getCheckedUser(userInfo)"
|
||||
(checkUser)="onCheckUser($event)"
|
||||
>
|
||||
</ucap-profile-user-list-item> -->
|
||||
</div>
|
||||
<div *ngIf="isShowSearch" class="search-result">
|
||||
<cdk-virtual-scroll-viewport
|
||||
|
@ -83,6 +74,7 @@
|
|||
[selectedUserList]="selectedUserList"
|
||||
[isChecked]="getCheckedUser(userInfo)"
|
||||
(checkUser)="onCheckUser($event)"
|
||||
(click)="onToggleUser(userInfo)"
|
||||
>
|
||||
</ucap-profile-user-list-item>
|
||||
</cdk-virtual-scroll-viewport>
|
||||
|
|
|
@ -64,6 +64,10 @@ export class OrganizationComponent implements OnInit, OnDestroy {
|
|||
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||
}>();
|
||||
@Output()
|
||||
toggleUser = new EventEmitter<
|
||||
UserInfo | UserInfoSS | UserInfoF | UserInfoDN
|
||||
>();
|
||||
@Output()
|
||||
checkAllUser = new EventEmitter<{
|
||||
isChecked: boolean;
|
||||
userInfos: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[];
|
||||
|
@ -321,6 +325,9 @@ export class OrganizationComponent implements OnInit, OnDestroy {
|
|||
}) {
|
||||
this.checkUser.emit(params);
|
||||
}
|
||||
onToggleUser(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) {
|
||||
this.toggleUser.emit(userInfo);
|
||||
}
|
||||
|
||||
onClickShowSelectedUserList() {
|
||||
this.logger.debug('onClickShowSelectedUserList', this.selectedUserList);
|
||||
|
|
|
@ -67,14 +67,12 @@
|
|||
[style.display]="isShowSearch ? 'none' : 'block'"
|
||||
class="list-panel"
|
||||
>
|
||||
<perfect-scrollbar>
|
||||
<ucap-group-expansion-panel
|
||||
#groupExpansionPanel
|
||||
[groupBuddyList]="groupBuddyList$ | async"
|
||||
[favoritBuddyList]="favoritBuddyList$ | async"
|
||||
[selectedUserList]="selectedUserList"
|
||||
[checkable]="true"
|
||||
(checkGroup)="onCheckGroup($event)"
|
||||
class="group-expansion"
|
||||
>
|
||||
<ucap-profile-user-list-item
|
||||
|
@ -84,12 +82,12 @@
|
|||
[selectedUserList]="selectedUserList"
|
||||
[isChecked]="getCheckedUser(userInfo)"
|
||||
[checkable]="true"
|
||||
(checkUser)="onCheckUser($event)"
|
||||
[inTree]="true"
|
||||
(click)="onToggleUser(userInfo)"
|
||||
class="list-item-frame"
|
||||
>
|
||||
</ucap-profile-user-list-item>
|
||||
</ucap-group-expansion-panel>
|
||||
</perfect-scrollbar>
|
||||
</div>
|
||||
<div
|
||||
[style.display]="isShowSearch ? 'block' : 'none'"
|
||||
|
@ -112,6 +110,7 @@
|
|||
[isChecked]="getCheckedUser(userInfo)"
|
||||
[checkable]="true"
|
||||
(checkUser)="onCheckUser($event)"
|
||||
(click)="onToggleUser(userInfo)"
|
||||
>
|
||||
</ucap-profile-user-list-item>
|
||||
</div>
|
||||
|
@ -128,6 +127,7 @@
|
|||
[isUserSelect]="true"
|
||||
(checkAllUser)="onCheckAllUser($event)"
|
||||
(checkUser)="onCheckUser($event)"
|
||||
(toggleUser)="onToggleUser($event)"
|
||||
class="dialog-org"
|
||||
>
|
||||
</app-layout-chat-left-sidenav-organization>
|
||||
|
|
|
@ -407,6 +407,19 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
|
|||
item => item.seq !== params.userInfo.seq
|
||||
);
|
||||
}
|
||||
console.log(this.selectedUserList);
|
||||
}
|
||||
onToggleUser(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) {
|
||||
if (
|
||||
this.selectedUserList.filter(user => user.seq === userInfo.seq).length ===
|
||||
0
|
||||
) {
|
||||
this.selectedUserList = [...this.selectedUserList, userInfo];
|
||||
} else {
|
||||
this.selectedUserList = this.selectedUserList.filter(
|
||||
item => item.seq !== userInfo.seq
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/** 대화방 > 대화방 선택 :: 해당 팝업에서는 대화방을 중복 선택하지 않는다 */
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#checkbox
|
||||
[checked]="isChecked"
|
||||
(change)="onChangeCheck(checkbox.checked, userInfo)"
|
||||
(click)="$event.stopPropagation()"
|
||||
(click)="onClickCheck($event)"
|
||||
>
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
|
|
|
@ -43,6 +43,9 @@ export class UserListItemComponent implements OnInit {
|
|||
@Input()
|
||||
/** 선택된 사용자의 리스트 */
|
||||
selectedUserList?: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[] = [];
|
||||
@Input()
|
||||
/** event bubbling fixed in custom tree */
|
||||
inTree = false;
|
||||
|
||||
@Output()
|
||||
checkUser = new EventEmitter<{
|
||||
|
@ -102,6 +105,11 @@ export class UserListItemComponent implements OnInit {
|
|||
userInfo
|
||||
});
|
||||
}
|
||||
onClickCheck(event: MouseEvent) {
|
||||
if (!this.inTree) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
}
|
||||
|
||||
onClickOpenProfile(
|
||||
event: MouseEvent,
|
||||
|
|
Loading…
Reference in New Issue
Block a user