1. 대화방 > 대화상대추가 :: 기존인원이 지워져도 데이터는 문제 없도록 수정. >>> 추후 기존인원을 뺄 수 없도록 수정해야 함.
2. 유저선택 팝업 > 그룹 선택시 그룹원 선택 되도록 수정 >>> 이벤트 꼬이는 문제가 있어 추후 해결해야함.
This commit is contained in:
parent
534e026742
commit
b3ac86e4d6
|
@ -886,13 +886,17 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
});
|
||||
|
||||
if (!!result && !!result.choice && result.choice) {
|
||||
const userSeqs: number[] = [];
|
||||
const userSeqs: number[] = this.userInfoList.map(
|
||||
userInfo => userInfo.seq
|
||||
);
|
||||
if (
|
||||
!!result.selectedUserList &&
|
||||
result.selectedUserList.length > 0
|
||||
) {
|
||||
result.selectedUserList.map(user => {
|
||||
result.selectedUserList.forEach(user => {
|
||||
if (userSeqs.indexOf(user.seq) < 0) {
|
||||
userSeqs.push(user.seq);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import {
|
|||
OnInit,
|
||||
OnDestroy,
|
||||
Output,
|
||||
EventEmitter,
|
||||
EventEmitter
|
||||
} from '@angular/core';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { Store, select } from '@ngrx/store';
|
||||
|
@ -21,13 +21,13 @@ import { DialogService } from '@ucap-webmessenger/ui';
|
|||
import {
|
||||
SelectGroupDialogComponent,
|
||||
SelectGroupDialogResult,
|
||||
SelectGroupDialogData,
|
||||
SelectGroupDialogData
|
||||
} from '../../dialogs/group/select-group.dialog.component';
|
||||
import { GroupDetailData } from '@ucap-webmessenger/protocol-sync';
|
||||
import {
|
||||
CreateChatDialogComponent,
|
||||
CreateChatDialogResult,
|
||||
CreateChatDialogData,
|
||||
CreateChatDialogData
|
||||
} from '../../dialogs/chat/create-chat.dialog.component';
|
||||
import { UserSelectDialogType } from '@app/types';
|
||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||
|
@ -36,7 +36,7 @@ import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
|||
@Component({
|
||||
selector: 'app-layout-chat-right-drawer-room-user-list',
|
||||
templateUrl: './room-user-list.component.html',
|
||||
styleUrls: ['./room-user-list.component.scss'],
|
||||
styleUrls: ['./room-user-list.component.scss']
|
||||
})
|
||||
export class RoomUserListComponent implements OnInit, OnDestroy {
|
||||
@Output()
|
||||
|
@ -105,15 +105,19 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
|
|||
title: 'Edit Chat Member',
|
||||
curRoomUser: this.userInfoList.filter(
|
||||
user => user.seq !== this.loginRes.userSeq
|
||||
),
|
||||
},
|
||||
)
|
||||
}
|
||||
});
|
||||
|
||||
if (!!result && !!result.choice && result.choice) {
|
||||
const userSeqs: number[] = [];
|
||||
const userSeqs: number[] = this.userInfoList.map(
|
||||
userInfo => userInfo.seq
|
||||
);
|
||||
if (!!result.selectedUserList && result.selectedUserList.length > 0) {
|
||||
result.selectedUserList.map(user => {
|
||||
result.selectedUserList.forEach(user => {
|
||||
if (userSeqs.indexOf(user.seq) < 0) {
|
||||
userSeqs.push(user.seq);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -125,8 +129,8 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
|
|||
RoomStore.inviteOrOpen({
|
||||
req: {
|
||||
divCd: 'Invite',
|
||||
userSeqs,
|
||||
},
|
||||
userSeqs
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
@ -141,8 +145,8 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
|
|||
>(SelectGroupDialogComponent, {
|
||||
width: '600px',
|
||||
data: {
|
||||
title: 'Group Select',
|
||||
},
|
||||
title: 'Group Select'
|
||||
}
|
||||
});
|
||||
|
||||
if (!!result && !!result.choice && result.choice) {
|
||||
|
@ -159,7 +163,7 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
|
|||
this.store.dispatch(
|
||||
SyncStore.updateGroupMember({
|
||||
oldGroup,
|
||||
trgtUserSeq,
|
||||
trgtUserSeq
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
@ -70,9 +70,9 @@
|
|||
<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
|
||||
|
@ -138,20 +138,6 @@
|
|||
<mat-icon>chat</mat-icon>
|
||||
</ng-template>
|
||||
<div>
|
||||
<!-- <cdk-virtual-scroll-viewport itemSize="20" style="height: 100%">
|
||||
<ucap-room-list-item
|
||||
*cdkVirtualFor="let room of roomList"
|
||||
[loginRes]="loginRes"
|
||||
[roomInfo]="room"
|
||||
[roomUserInfo]="getRoomUserList(room)"
|
||||
[sessionVerinfo]="sessionVerinfo"
|
||||
[checkable]="getCheckableRoom(room)"
|
||||
[isChecked]="getCheckedRoom(room)"
|
||||
[multiCheckable]="false"
|
||||
(checkRoom)="onCheckRoom($event)"
|
||||
>
|
||||
</ucap-room-list-item>
|
||||
</cdk-virtual-scroll-viewport> -->
|
||||
<ucap-room-list-item
|
||||
*ngFor="let room of roomList"
|
||||
[loginRes]="loginRes"
|
||||
|
|
|
@ -376,6 +376,7 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
}
|
||||
|
||||
/** 조직도 > 부서원 전체 선택 */
|
||||
onCheckAllUser(params: {
|
||||
isChecked: boolean;
|
||||
userInfos: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[];
|
||||
|
|
|
@ -47,27 +47,38 @@
|
|||
</mat-icon>
|
||||
</button>
|
||||
<ng-container [ngSwitch]="node.nodeType">
|
||||
<span *ngSwitchCase="NodeType.Profile">내 프로필</span>
|
||||
<span *ngSwitchCase="NodeType.Favorit"
|
||||
>즐겨찾기
|
||||
<span class="text-accent-color number"
|
||||
>({{ node.countOfChildren }}명)</span
|
||||
<span *ngSwitchCase="NodeType.Profile">
|
||||
<span class="title-name ellipsis">내 프로필</span>
|
||||
</span>
|
||||
<span *ngSwitchCase="NodeType.Favorit">
|
||||
<span class="title-name ellipsis">즐겨찾기</span>
|
||||
<span class="text-accent-color number">
|
||||
({{ node.countOfChildren }}명)</span
|
||||
></span
|
||||
>
|
||||
<span *ngSwitchCase="NodeType.Buddy">
|
||||
<span class="title-name ellipsis">{{
|
||||
node.groupDetail.name
|
||||
}}</span>
|
||||
<span class="text-accent-color number"
|
||||
>({{ node.countOfChildren }}명)</span
|
||||
<span class="text-accent-color number">
|
||||
({{ node.countOfChildren }}명)</span
|
||||
>
|
||||
</span>
|
||||
</ng-container>
|
||||
|
||||
<mat-checkbox
|
||||
*ngIf="checkable"
|
||||
#checkbox
|
||||
[checked]="getCheckedGroup(node.groupDetail)"
|
||||
(change)="onChangeCheck(checkbox.checked, node.groupDetail)"
|
||||
(click)="$event.stopPropagation()"
|
||||
class="group-check"
|
||||
>
|
||||
</mat-checkbox>
|
||||
<button
|
||||
mat-icon-button
|
||||
aria-label="group menu"
|
||||
*ngIf="node.nodeType !== NodeType.Profile"
|
||||
*ngIf="node.nodeType !== NodeType.Profile && !checkable"
|
||||
(click)="onClickMore($event, node.groupDetail)"
|
||||
class="group-menu"
|
||||
>
|
||||
|
|
|
@ -64,6 +64,11 @@
|
|||
line-height: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.group-check {
|
||||
margin-left: auto;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.group-menu {
|
||||
margin-left: auto;
|
||||
opacity: 0.6;
|
||||
|
|
|
@ -108,6 +108,8 @@ export class ExpansionPanelComponent
|
|||
return;
|
||||
}
|
||||
|
||||
this.groupList = list;
|
||||
|
||||
this.buddyNodes = [];
|
||||
|
||||
for (const item of list) {
|
||||
|
@ -179,6 +181,8 @@ export class ExpansionPanelComponent
|
|||
treeFlattener: MatTreeFlattener<GroupNode, FlatNode>;
|
||||
dataSource: VirtualScrollTreeFlatDataSource<GroupNode, FlatNode>;
|
||||
|
||||
groupList: { group: GroupDetailData; buddyList: UserInfo[] }[];
|
||||
|
||||
constructor(
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
private logger: NGXLogger
|
||||
|
@ -237,30 +241,34 @@ export class ExpansionPanelComponent
|
|||
}
|
||||
|
||||
/** 그룹리스트가 checkable 할 경우 checkbox 의 change 이벤트를 상위 컴포넌트로 전달한다. */
|
||||
onChangeCheck(
|
||||
value: boolean,
|
||||
groupBuddyList: { group: GroupDetailData; buddyList: UserInfo[] }
|
||||
) {
|
||||
onChangeCheck(value: boolean, group: GroupDetailData, nodeType: NodeType) {
|
||||
const groupInfos = this.groupList.filter(
|
||||
groupInfo => groupInfo.group.seq === group.seq
|
||||
);
|
||||
|
||||
if (groupInfos.length > 0) {
|
||||
this.checkGroup.emit({
|
||||
isChecked: value,
|
||||
groupBuddyList
|
||||
groupBuddyList: groupInfos[0]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** 그룹리스트가 checkable 할 경우 checkbox 의 isChecked 를 관장하며, 하위 부서원들의 전체선택여부를 판단한다. */
|
||||
getCheckedGroup(groupBuddy: {
|
||||
group: GroupDetailData;
|
||||
buddyList: UserInfo[];
|
||||
}) {
|
||||
if (groupBuddy.buddyList.length === 0) {
|
||||
getCheckedGroup(group: GroupDetailData) {
|
||||
if (!group || group === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (group.userSeqs.length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!!this.selectedUserList && this.selectedUserList.length > 0) {
|
||||
let allExist = true;
|
||||
groupBuddy.buddyList.some(groupUser => {
|
||||
group.userSeqs.some(seq => {
|
||||
if (
|
||||
this.selectedUserList.filter(item => item.seq === groupUser.seq)
|
||||
.length === 0
|
||||
this.selectedUserList.filter(item => item.seq === seq).length === 0
|
||||
) {
|
||||
allExist = false;
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user