FAB 위치 수정 :: 좀더 왼쪽으로 이동하여 그룹의 more 버튼과 겹치지 않도록 수정.

조직도 리스트의 cdk-virture-scroll 위치값 리세팅하도록 수정.
This commit is contained in:
leejinho 2019-11-22 16:15:11 +09:00
parent 4725140c11
commit 53378832ec
8 changed files with 51 additions and 18 deletions

View File

@ -145,6 +145,7 @@
> >
<app-layout-chat-left-sidenav-organization <app-layout-chat-left-sidenav-organization
[selectedUserList]="selectedUserList" [selectedUserList]="selectedUserList"
[isVisible]="currentTabLable === MainMenu.Organization"
(checkAllUser)="onCheckAllUser($event)" (checkAllUser)="onCheckAllUser($event)"
(checkUser)="onCheckUser($event)" (checkUser)="onCheckUser($event)"
(openProfile)="onClickOpenProfile($event)" (openProfile)="onClickOpenProfile($event)"

View File

@ -52,6 +52,7 @@ export class LeftSideComponent implements OnInit, OnDestroy {
>(); >();
@ViewChildren('tabs') tabs: QueryList<ElementRef<HTMLDivElement>>; @ViewChildren('tabs') tabs: QueryList<ElementRef<HTMLDivElement>>;
currentTabLable: string;
badgeChatUnReadCount: number; badgeChatUnReadCount: number;
badgeChatUnReadCountSubscription: Subscription; badgeChatUnReadCountSubscription: Subscription;
@ -81,6 +82,7 @@ export class LeftSideComponent implements OnInit, OnDestroy {
}); });
this.setFabInitial(MainMenu.Group); this.setFabInitial(MainMenu.Group);
this.currentTabLable = MainMenu.Group;
} }
ngOnDestroy(): void { ngOnDestroy(): void {
@ -158,6 +160,7 @@ export class LeftSideComponent implements OnInit, OnDestroy {
onSelectedTabChange(event: MatTabChangeEvent) { onSelectedTabChange(event: MatTabChangeEvent) {
this.setFabInitial(event.tab.ariaLabel); this.setFabInitial(event.tab.ariaLabel);
this.currentTabLable = event.tab.ariaLabel;
this.tabs.forEach(tab => { this.tabs.forEach(tab => {
if (`tabs-${event.index}` === tab.nativeElement.id) { if (`tabs-${event.index}` === tab.nativeElement.id) {

View File

@ -44,8 +44,13 @@
<div *ngIf="selectedDepartmentProcessing"> <div *ngIf="selectedDepartmentProcessing">
<mat-progress-bar mode="indeterminate"></mat-progress-bar> <mat-progress-bar mode="indeterminate"></mat-progress-bar>
</div> </div>
<div *ngIf="!isShowSearch" class="search-list"> <div class="search-list">
<cdk-virtual-scroll-viewport itemSize="20" perfectScrollbar fxFlexFill> <cdk-virtual-scroll-viewport
itemSize="80"
#cvsvDeptUser
perfectScrollbar
fxFlexFill
>
<ucap-profile-user-list-item <ucap-profile-user-list-item
*cdkVirtualFor="let userInfo of selectedDepartmentUserInfoList" *cdkVirtualFor="let userInfo of selectedDepartmentUserInfoList"
[userInfo]="userInfo" [userInfo]="userInfo"
@ -57,15 +62,15 @@
(openProfile)="onClickOpenProfile($event)" (openProfile)="onClickOpenProfile($event)"
(click)="onToggleUser(userInfo)" (click)="onToggleUser(userInfo)"
> >
Loading...
</ucap-profile-user-list-item> </ucap-profile-user-list-item>
</cdk-virtual-scroll-viewport> </cdk-virtual-scroll-viewport>
</div> </div>
<div *ngIf="isShowSearch" class="search-result"> <div *ngIf="isShowSearch" class="search-result">
<cdk-virtual-scroll-viewport <cdk-virtual-scroll-viewport
#cvsvDeptSearchUser
itemSize="20" itemSize="20"
perfectScrollbar perfectScrollbar
style="height: 100%;" fxFlexFill
> >
<ucap-profile-user-list-item <ucap-profile-user-list-item
*cdkVirtualFor="let userInfo of searchUserInfos" *cdkVirtualFor="let userInfo of searchUserInfos"

View File

@ -155,13 +155,3 @@
} }
} }
} }
::ng-deep .oraganization-tab{
.oraganization-tab-tree,
.select-list{
.ps{
.ps-content{
height:100%;
}
}
}
}

View File

@ -4,7 +4,11 @@ import {
OnDestroy, OnDestroy,
Output, Output,
EventEmitter, EventEmitter,
Input Input,
ViewChild,
AfterViewInit,
AfterContentChecked,
AfterViewChecked
} from '@angular/core'; } from '@angular/core';
import { ucapAnimations, DialogService } from '@ucap-webmessenger/ui'; import { ucapAnimations, DialogService } from '@ucap-webmessenger/ui';
import { Observable, Subscription, of } from 'rxjs'; import { Observable, Subscription, of } from 'rxjs';
@ -41,6 +45,8 @@ import {
} from '../../dialogs/group/select-group.dialog.component'; } from '../../dialogs/group/select-group.dialog.component';
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
import { Company } from '@ucap-webmessenger/api-external'; import { Company } from '@ucap-webmessenger/api-external';
import { PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
@Component({ @Component({
selector: 'app-layout-chat-left-sidenav-organization', selector: 'app-layout-chat-left-sidenav-organization',
@ -48,7 +54,8 @@ import { Company } from '@ucap-webmessenger/api-external';
styleUrls: ['./organization.component.scss'], styleUrls: ['./organization.component.scss'],
animations: ucapAnimations animations: ucapAnimations
}) })
export class OrganizationComponent implements OnInit, OnDestroy { export class OrganizationComponent
implements OnInit, OnDestroy, AfterViewChecked {
@Input() @Input()
showTitle = true; showTitle = true;
@Input() @Input()
@ -57,6 +64,8 @@ export class OrganizationComponent implements OnInit, OnDestroy {
@Input() @Input()
/** 선택된 사용자의 리스트 */ /** 선택된 사용자의 리스트 */
selectedUserList?: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[] = []; selectedUserList?: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[] = [];
@Input()
isVisible = true;
@Output() @Output()
checkUser = new EventEmitter<{ checkUser = new EventEmitter<{
@ -77,11 +86,13 @@ export class OrganizationComponent implements OnInit, OnDestroy {
UserInfo | UserInfoSS | UserInfoF | UserInfoDN UserInfo | UserInfoSS | UserInfoF | UserInfoDN
>(); >();
@ViewChild('cvsvDeptUser', { static: false })
cvsvDeptUser: CdkVirtualScrollViewport;
companyList$: Observable<Company[]>; companyList$: Observable<Company[]>;
companyCode: string; companyCode: string;
departmentInfoList$: Observable<DeptInfo[]>; departmentInfoList$: Observable<DeptInfo[]>;
selectedDepartmentUserInfoList$: Observable<UserInfoSS[]>;
selectedDepartmentUserInfoList: UserInfoSS[] = []; selectedDepartmentUserInfoList: UserInfoSS[] = [];
selectedDepartmentUserInfoListSubscription: Subscription; selectedDepartmentUserInfoListSubscription: Subscription;
selectedDepartmentStatus$: Observable<DeptUserResponse>; selectedDepartmentStatus$: Observable<DeptUserResponse>;
@ -96,6 +107,9 @@ export class OrganizationComponent implements OnInit, OnDestroy {
isShowSearch = false; isShowSearch = false;
searchUserInfos: UserInfoSS[] = []; searchUserInfos: UserInfoSS[] = [];
/** 부서원 리스트에 virture scroll의 size 가 체킹되지 않아 강제 수행. 1번만. */
isInitList = false;
constructor( constructor(
private store: Store<any>, private store: Store<any>,
private sessionStorageService: SessionStorageService, private sessionStorageService: SessionStorageService,
@ -173,6 +187,19 @@ export class OrganizationComponent implements OnInit, OnDestroy {
.subscribe(); .subscribe();
} }
ngAfterViewChecked(): void {
if (
!!this.cvsvDeptUser &&
!!this.selectedDepartmentUserInfoList &&
this.selectedDepartmentUserInfoList.length > 0 &&
!this.isInitList &&
this.isVisible
) {
this.isInitList = true;
this.cvsvDeptUser.checkViewportSize();
}
}
ngOnDestroy(): void { ngOnDestroy(): void {
if (!!this.selectedDepartmentUserInfoListSubscription) { if (!!this.selectedDepartmentUserInfoListSubscription) {
this.selectedDepartmentUserInfoListSubscription.unsubscribe(); this.selectedDepartmentUserInfoListSubscription.unsubscribe();

View File

@ -125,6 +125,7 @@
[showTitle]="false" [showTitle]="false"
[selectedUserList]="selectedUserList" [selectedUserList]="selectedUserList"
[isUserSelect]="true" [isUserSelect]="true"
[isVisible]="currentTabIndex === 1"
(checkAllUser)="onCheckAllUser($event)" (checkAllUser)="onCheckAllUser($event)"
(checkUser)="onCheckUser($event)" (checkUser)="onCheckUser($event)"
(toggleUser)="onToggleUser($event)" (toggleUser)="onToggleUser($event)"

View File

@ -110,6 +110,8 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
); );
} }
currentTabIndex: number;
UserSelectDialogType = UserSelectDialogType; UserSelectDialogType = UserSelectDialogType;
loginRes: LoginResponse; loginRes: LoginResponse;
@ -237,6 +239,8 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
if (this.data.type === UserSelectDialogType.EditChatMember) { if (this.data.type === UserSelectDialogType.EditChatMember) {
this.selectedUserList = this.data.curRoomUser; this.selectedUserList = this.data.curRoomUser;
} }
this.currentTabIndex = 0;
} }
ngOnDestroy(): void { ngOnDestroy(): void {
@ -284,6 +288,8 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
} }
onSelectedTabChange(tabChangeEvent: MatTabChangeEvent): void { onSelectedTabChange(tabChangeEvent: MatTabChangeEvent): void {
this.currentTabIndex = tabChangeEvent.index;
if (tabChangeEvent.index === 2) { if (tabChangeEvent.index === 2) {
this.selectedUserList = []; this.selectedUserList = [];
this.isShowSelectedUserList = false; this.isShowSelectedUserList = false;

View File

@ -1,7 +1,7 @@
.fab-container { .fab-container {
position: absolute; position: absolute;
bottom: 15px; bottom: 15px;
right: 15px; right: 40px;
z-index: 100; z-index: 100;
display: flex; display: flex;
flex-direction: column-reverse; flex-direction: column-reverse;