기능추가 :: 조직도 > 하단버튼 > 대화 :: 대화개설 기능 ㅊ구ㅏ.
This commit is contained in:
parent
3d219837bd
commit
914d62d48b
|
@ -30,7 +30,10 @@
|
|||
<ng-template mat-tab-label>
|
||||
<mat-icon>device_hub</mat-icon>
|
||||
</ng-template>
|
||||
<app-layout-chat-left-sidenav-organization></app-layout-chat-left-sidenav-organization>
|
||||
<app-layout-chat-left-sidenav-organization
|
||||
[selectedUserList]="selectedUserList"
|
||||
(checkUser)="onCheckUser($event)"
|
||||
></app-layout-chat-left-sidenav-organization>
|
||||
</mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>
|
||||
|
|
|
@ -12,6 +12,12 @@ import { Store, select } from '@ngrx/store';
|
|||
|
||||
import * as AppStore from '@app/store';
|
||||
import * as ChatStore from '@app/store/messenger/chat';
|
||||
import { UserInfo } from '@ucap-webmessenger/protocol-sync';
|
||||
import {
|
||||
UserInfoSS,
|
||||
UserInfoF,
|
||||
UserInfoDN
|
||||
} from '@ucap-webmessenger/protocol-query';
|
||||
|
||||
@Component({
|
||||
selector: 'app-layout-messenger-left-side',
|
||||
|
@ -22,6 +28,9 @@ import * as ChatStore from '@app/store/messenger/chat';
|
|||
export class LeftSideComponent implements OnInit {
|
||||
badgeChatUnReadCount$: Observable<number>;
|
||||
|
||||
/** 조직도에서 부서원 선택 */
|
||||
selectedUserList: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[] = [];
|
||||
|
||||
constructor(
|
||||
private store: Store<any>,
|
||||
private dialogService: DialogService,
|
||||
|
@ -57,4 +66,24 @@ export class LeftSideComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 조직도>부서원 :: 리스트의 checkbox 의 이벤트를 받아 선택된 유저리스트를 수집. */
|
||||
onCheckUser(params: {
|
||||
isChecked: boolean;
|
||||
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||
}) {
|
||||
if (params.isChecked) {
|
||||
if (
|
||||
this.selectedUserList.filter(user => user.seq === params.userInfo.seq)
|
||||
.length === 0 &&
|
||||
params.userInfo
|
||||
) {
|
||||
this.selectedUserList = [...this.selectedUserList, params.userInfo];
|
||||
}
|
||||
} else {
|
||||
this.selectedUserList = this.selectedUserList.filter(
|
||||
item => item.seq !== params.userInfo.seq
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,13 @@
|
|||
</div>
|
||||
</div>
|
||||
<div *ngIf="!isUserSelect" class="btn-box">
|
||||
(하단버튼영역)
|
||||
<button mat-stroked-button (click)="onClickShowSelectedUserList()">
|
||||
선택<span *ngIf="selectedUserList.length > 0"
|
||||
>({{ selectedUserList.length }})</span
|
||||
>
|
||||
</button>
|
||||
<button mat-stroked-button (click)="onClickAddGroup()">그룹에 추가</button>
|
||||
<button mat-stroked-button (click)="onClickChatOpen()">대화</button>
|
||||
<button mat-stroked-button (click)="onClickConference()">화상회의</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -23,6 +23,7 @@ import { NGXLogger } from 'ngx-logger';
|
|||
|
||||
import * as AppStore from '@app/store';
|
||||
import * as QueryStore from '@app/store/messenger/query';
|
||||
import * as ChatStore from '@app/store/messenger/chat';
|
||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||
import { LoginInfo, KEY_LOGIN_INFO } from '@app/types';
|
||||
import { take, map, tap, delay } from 'rxjs/operators';
|
||||
|
@ -180,4 +181,21 @@ export class OrganizationComponent implements OnInit, OnDestroy {
|
|||
}) {
|
||||
this.checkUser.emit(params);
|
||||
}
|
||||
|
||||
onClickShowSelectedUserList() {
|
||||
this.logger.debug('onClickShowSelectedUserList', this.selectedUserList);
|
||||
}
|
||||
onClickAddGroup() {
|
||||
this.logger.debug('onClickAddGroup', this.selectedUserList);
|
||||
}
|
||||
onClickChatOpen() {
|
||||
if (!!this.selectedUserList && this.selectedUserList.length > 0) {
|
||||
const seq: number[] = [];
|
||||
this.selectedUserList.map(user => seq.push(user.seq));
|
||||
this.store.dispatch(ChatStore.openRoom({ userSeqList: seq }));
|
||||
}
|
||||
}
|
||||
onClickConference() {
|
||||
this.logger.debug('onClickConference', this.selectedUserList);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user