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