수정 :: 새로운 대화 개설용 유저 선택 팝업 > 유저선택 이벤트 등록
This commit is contained in:
parent
ac196f5053
commit
c827a9cde3
|
@ -9,39 +9,38 @@
|
||||||
<ng-template mat-tab-label>
|
<ng-template mat-tab-label>
|
||||||
<mat-icon>group</mat-icon>
|
<mat-icon>group</mat-icon>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template matTabContent>
|
|
||||||
<ucap-organization-tenant-search [companyList]="companyList$ | async" [companyCode]="companyCode"
|
<ucap-organization-tenant-search [companyList]="companyList$ | async" [companyCode]="companyCode"
|
||||||
(keyDownEnter)="onKeyDownEnterOrganizationTenantSearch($event)"></ucap-organization-tenant-search>
|
(keyDownEnter)="onKeyDownEnterOrganizationTenantSearch($event)"></ucap-organization-tenant-search>
|
||||||
<ucap-group-expansion-panel #groupExpansionPanel [groupBuddyList]="groupBuddyList$ | async"
|
<ucap-group-expansion-panel #groupExpansionPanel [groupBuddyList]="groupBuddyList$ | async"
|
||||||
[favoritBuddyList]="favoritBuddyList$ | async" [checkable]="true">
|
[favoritBuddyList]="favoritBuddyList$ | async" [checkable]="true" (checkGroup)="onCheckGroup($event)">
|
||||||
<ucap-profile-user-list-item *ucapGroupExpansionPanelItem="let userInfo" [userInfo]="userInfo"
|
<ucap-profile-user-list-item *ucapGroupExpansionPanelItem="let userInfo" [userInfo]="userInfo"
|
||||||
[sessionVerinfo]="sessionVerinfo" [checkable]="true">
|
[sessionVerinfo]="sessionVerinfo" (checkUser)="onCheckUser($event)" [checkable]="true">
|
||||||
</ucap-profile-user-list-item>
|
</ucap-profile-user-list-item>
|
||||||
</ucap-group-expansion-panel>
|
</ucap-group-expansion-panel>
|
||||||
</ng-template>
|
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab>
|
<mat-tab>
|
||||||
<ng-template mat-tab-label>
|
<ng-template mat-tab-label>
|
||||||
<mat-icon>device_hub</mat-icon>
|
<mat-icon>device_hub</mat-icon>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template matTabContent>
|
|
||||||
<app-layout-chat-left-sidenav-organization></app-layout-chat-left-sidenav-organization>
|
<app-layout-chat-left-sidenav-organization></app-layout-chat-left-sidenav-organization>
|
||||||
</ng-template>
|
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab>
|
<mat-tab>
|
||||||
<ng-template mat-tab-label>
|
<ng-template mat-tab-label>
|
||||||
<mat-icon>chat</mat-icon>
|
<mat-icon>chat</mat-icon>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template matTabContent>
|
|
||||||
<ucap-room-list-item *ngFor="let room of roomList" [loginRes]="loginRes" [roomInfo]="room"
|
<ucap-room-list-item *ngFor="let room of roomList" [loginRes]="loginRes" [roomInfo]="room"
|
||||||
[roomUserInfo]="getRoomUserList(room)" [sessionVerinfo]="sessionVerinfo">
|
[roomUserInfo]="getRoomUserList(room)" [sessionVerinfo]="sessionVerinfo">
|
||||||
</ucap-room-list-item>
|
</ucap-room-list-item>
|
||||||
</ng-template>
|
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="100px">
|
<div fxFlex="100px">
|
||||||
choiced users
|
<ul>
|
||||||
|
<li *ngFor="let userInfo of selectedUserList">
|
||||||
|
{{ userInfo.name }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<mat-card-actions class="button-farm flex-row">
|
<mat-card-actions class="button-farm flex-row">
|
||||||
|
|
|
@ -20,7 +20,12 @@ import {
|
||||||
RoomUserDetailData,
|
RoomUserDetailData,
|
||||||
RoomUserData
|
RoomUserData
|
||||||
} from '@ucap-webmessenger/protocol-sync';
|
} from '@ucap-webmessenger/protocol-sync';
|
||||||
import { DeptSearchType } from '@ucap-webmessenger/protocol-query';
|
import {
|
||||||
|
DeptSearchType,
|
||||||
|
UserInfoSS,
|
||||||
|
UserInfoF,
|
||||||
|
UserInfoDN
|
||||||
|
} from '@ucap-webmessenger/protocol-query';
|
||||||
import {
|
import {
|
||||||
RoomInfo,
|
RoomInfo,
|
||||||
UserInfoShort,
|
UserInfoShort,
|
||||||
|
@ -70,6 +75,9 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
|
||||||
roomUserShortList: RoomUserData[];
|
roomUserShortList: RoomUserData[];
|
||||||
roomSubscription: Subscription;
|
roomSubscription: Subscription;
|
||||||
|
|
||||||
|
// 수집 데이터
|
||||||
|
selectedUserList: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[] = [];
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
const loginInfo = this.sessionStorageService.get<LoginInfo>(KEY_LOGIN_INFO);
|
const loginInfo = this.sessionStorageService.get<LoginInfo>(KEY_LOGIN_INFO);
|
||||||
this.companyCode = loginInfo.companyCode;
|
this.companyCode = loginInfo.companyCode;
|
||||||
|
@ -189,9 +197,25 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onCheckGroup(params: { isChecked: boolean; group: GroupDetailData }) {
|
||||||
|
this.logger.debug(params);
|
||||||
|
}
|
||||||
|
onCheckUser(params: {
|
||||||
|
isChecked: boolean;
|
||||||
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||||
|
}) {
|
||||||
|
if (params.isChecked) {
|
||||||
|
this.selectedUserList.push(params.userInfo);
|
||||||
|
} else {
|
||||||
|
this.selectedUserList = this.selectedUserList.filter(
|
||||||
|
item => item.seq !== params.userInfo.seq
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onClickChoice(choice: boolean): void {
|
onClickChoice(choice: boolean): void {
|
||||||
this.dialogRef.close({
|
// this.dialogRef.close({
|
||||||
choice
|
// choice
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,8 @@
|
||||||
(click)="onClickMore($event, groupBuddy.group)">
|
(click)="onClickMore($event, groupBuddy.group)">
|
||||||
<mat-icon>more_vert</mat-icon>
|
<mat-icon>more_vert</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<mat-checkbox *ngIf="checkable"></mat-checkbox>
|
<mat-checkbox *ngIf="checkable" #checkbox (change)="onChangeCheck(checkbox.checked, groupBuddy.group)"
|
||||||
|
(click)="$event.stopPropagation()"></mat-checkbox>
|
||||||
</mat-panel-description>
|
</mat-panel-description>
|
||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,12 @@ export class ExpansionPanelComponent implements OnInit {
|
||||||
group: GroupDetailData;
|
group: GroupDetailData;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
@Output()
|
||||||
|
checkGroup = new EventEmitter<{
|
||||||
|
isChecked: boolean;
|
||||||
|
group: GroupDetailData;
|
||||||
|
}>();
|
||||||
|
|
||||||
@ContentChild(ExpansionPanelItemDirective, {
|
@ContentChild(ExpansionPanelItemDirective, {
|
||||||
read: TemplateRef,
|
read: TemplateRef,
|
||||||
static: true
|
static: true
|
||||||
|
@ -60,4 +66,11 @@ export class ExpansionPanelComponent implements OnInit {
|
||||||
onClickMore(event: MouseEvent, group: GroupDetailData) {
|
onClickMore(event: MouseEvent, group: GroupDetailData) {
|
||||||
this.more.emit({ event, group });
|
this.more.emit({ event, group });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onChangeCheck(value: boolean, group: GroupDetailData) {
|
||||||
|
this.checkGroup.emit({
|
||||||
|
isChecked: value,
|
||||||
|
group
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,5 +33,7 @@
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<mat-checkbox *ngIf="checkable"></mat-checkbox>
|
<mat-checkbox *ngIf="checkable" #checkbox [checked]="isChecked" (change)="onChangeCheck(checkbox.checked, userInfo)"
|
||||||
|
(click)="$event.stopPropagation()">
|
||||||
|
</mat-checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,6 +23,7 @@ import { StatusCode } from '@ucap-webmessenger/core';
|
||||||
|
|
||||||
import { PresenceType } from '../types/presence-type.type';
|
import { PresenceType } from '../types/presence-type.type';
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
|
import { MatCheckboxChange, MatPseudoCheckbox } from '@angular/material';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ucap-profile-user-list-item',
|
selector: 'ucap-profile-user-list-item',
|
||||||
|
@ -42,12 +43,19 @@ export class UserListItemComponent implements OnInit, OnDestroy {
|
||||||
@Input()
|
@Input()
|
||||||
checkable = false;
|
checkable = false;
|
||||||
@Input()
|
@Input()
|
||||||
|
isChecked = false;
|
||||||
|
@Input()
|
||||||
compactable = false;
|
compactable = false;
|
||||||
@Input()
|
@Input()
|
||||||
sessionVerinfo: VersionInfo2Response;
|
sessionVerinfo: VersionInfo2Response;
|
||||||
|
|
||||||
userPresence: StatusBulkInfo | StatusInfo;
|
@Output()
|
||||||
|
checkUser = new EventEmitter<{
|
||||||
|
isChecked: boolean;
|
||||||
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
userPresence: StatusBulkInfo | StatusInfo;
|
||||||
PresenceType = PresenceType;
|
PresenceType = PresenceType;
|
||||||
|
|
||||||
// private profileImageRootSubscription: Subscription;
|
// private profileImageRootSubscription: Subscription;
|
||||||
|
@ -106,4 +114,14 @@ export class UserListItemComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
return rtnClass;
|
return rtnClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onChangeCheck(
|
||||||
|
value: boolean,
|
||||||
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN
|
||||||
|
) {
|
||||||
|
this.checkUser.emit({
|
||||||
|
isChecked: value,
|
||||||
|
userInfo
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user