[ISSUE 208] [ISSUE 153] fixed
This commit is contained in:
parent
c44e534bfc
commit
ffbb9d84d2
|
@ -50,46 +50,37 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!isSearch" class="app-layout-chat-left-sidenav-chat-list">
|
<div *ngIf="!isSearch" class="app-layout-chat-left-sidenav-chat-list">
|
||||||
<perfect-scrollbar fxFlex="1 1 auto">
|
<virtual-scroller
|
||||||
<ucap-room-list-item
|
#chatRoomList
|
||||||
*ngFor="let room of roomList"
|
[items]="roomList"
|
||||||
[loginRes]="loginRes"
|
|
||||||
[isSelected]="(selectedRoomInfo$ | async)?.roomSeq === room.roomSeq"
|
|
||||||
[roomInfo]="room"
|
|
||||||
[roomUserInfo]="getRoomUserList(room)"
|
|
||||||
[sessionVerinfo]="sessionVerinfo"
|
|
||||||
(click)="onClickContextMenu('SELECT_ROOM', room)"
|
|
||||||
(contextmenu)="onContextMenuChat($event, room)"
|
|
||||||
class="ucap-clickable"
|
|
||||||
>
|
|
||||||
</ucap-room-list-item>
|
|
||||||
</perfect-scrollbar>
|
|
||||||
<!-- <cdk-virtual-scroll-viewport
|
|
||||||
#cvsvChatList
|
|
||||||
itemSize="60"
|
|
||||||
perfectScrollbar
|
perfectScrollbar
|
||||||
fxFlexFill
|
fxFlexFill
|
||||||
>
|
>
|
||||||
<ucap-room-list-item
|
<ucap-room-list-item
|
||||||
*cdkVirtualFor="let room of roomList"
|
*ngFor="let room of chatRoomList.viewPortItems"
|
||||||
[loginRes]="loginRes"
|
[loginRes]="loginRes"
|
||||||
|
[isSelected]="(selectedRoomInfo$ | async)?.roomSeq === room.roomSeq"
|
||||||
[roomInfo]="room"
|
[roomInfo]="room"
|
||||||
[roomUserInfo]="getRoomUserList(room)"
|
[roomUserInfo]="getRoomUserList(room)"
|
||||||
[sessionVerinfo]="sessionVerinfo"
|
[sessionVerinfo]="sessionVerinfo"
|
||||||
(click)="onClickContextMenu('SELECT_ROOM', room)"
|
(click)="onClickContextMenu('SELECT_ROOM', room)"
|
||||||
(contextmenu)="onContextMenuChat($event, room)"
|
(contextmenu)="onContextMenuChat($event, room)"
|
||||||
class="ucap-clickable"
|
class="ucap-clickable"
|
||||||
|
style="height: 60px;"
|
||||||
>
|
>
|
||||||
</ucap-room-list-item>
|
</ucap-room-list-item>
|
||||||
</cdk-virtual-scroll-viewport> -->
|
</virtual-scroller>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!!isSearch" class="app-layout-chat-left-sidenav-chat-list search">
|
<div *ngIf="!!isSearch" class="app-layout-chat-left-sidenav-chat-list search">
|
||||||
<perfect-scrollbar
|
<virtual-scroller
|
||||||
fxFlex="1 1 auto"
|
|
||||||
*ngIf="!!searchRoomList && 0 < searchRoomList.length"
|
*ngIf="!!searchRoomList && 0 < searchRoomList.length"
|
||||||
|
#chatRoomSearchList
|
||||||
|
[items]="searchRoomList"
|
||||||
|
perfectScrollbar
|
||||||
|
fxFlexFill
|
||||||
>
|
>
|
||||||
<ucap-room-list-item
|
<ucap-room-list-item
|
||||||
*ngFor="let room of searchRoomList"
|
*ngFor="let room of chatRoomSearchList.viewPortItems"
|
||||||
[loginRes]="loginRes"
|
[loginRes]="loginRes"
|
||||||
[isSelected]="(selectedRoomInfo$ | async)?.roomSeq === room.roomSeq"
|
[isSelected]="(selectedRoomInfo$ | async)?.roomSeq === room.roomSeq"
|
||||||
[roomInfo]="room"
|
[roomInfo]="room"
|
||||||
|
@ -99,22 +90,8 @@
|
||||||
(contextmenu)="onContextMenuChat($event, room)"
|
(contextmenu)="onContextMenuChat($event, room)"
|
||||||
>
|
>
|
||||||
</ucap-room-list-item>
|
</ucap-room-list-item>
|
||||||
</perfect-scrollbar>
|
</virtual-scroller>
|
||||||
<!-- <cdk-virtual-scroll-viewport
|
|
||||||
itemSize="60"
|
|
||||||
class="app-layout-chat-left-sidenav-chat-list-viewport"
|
|
||||||
>
|
|
||||||
<ucap-room-list-item
|
|
||||||
*cdkVirtualFor="let room of getRoomList()"
|
|
||||||
[loginRes]="loginRes"
|
|
||||||
[roomInfo]="room"
|
|
||||||
[roomUserInfo]="getRoomUserList(room)"
|
|
||||||
[sessionVerinfo]="sessionVerinfo"
|
|
||||||
(click)="onSelectedRoom(room)"
|
|
||||||
(contextmenu)="onContextMenuChat($event, room)"
|
|
||||||
>
|
|
||||||
</ucap-room-list-item>
|
|
||||||
</cdk-virtual-scroll-viewport> -->
|
|
||||||
<div
|
<div
|
||||||
class="no-search-result"
|
class="no-search-result"
|
||||||
fxFlexFill
|
fxFlexFill
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<ucap-organization-tree
|
<ucap-organization-tree
|
||||||
[oraganizationList]="departmentInfoList$ | async"
|
[oraganizationList]="departmentInfoList$ | async"
|
||||||
[loginRes]="loginRes"
|
[loginRes]="loginRes"
|
||||||
[activate$]="gnbMenuChangedSubject.asObservable()"
|
[activate$]="organizationTreeActivatedSubject.asObservable()"
|
||||||
(selected)="onSelectedOrganization($event)"
|
(selected)="onSelectedOrganization($event)"
|
||||||
class="tab-tree-frame"
|
class="tab-tree-frame"
|
||||||
></ucap-organization-tree>
|
></ucap-organization-tree>
|
||||||
|
|
|
@ -10,7 +10,13 @@ import {
|
||||||
ChangeDetectorRef
|
ChangeDetectorRef
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { ucapAnimations, DialogService } from '@ucap-webmessenger/ui';
|
import { ucapAnimations, DialogService } from '@ucap-webmessenger/ui';
|
||||||
import { Observable, Subscription, of, BehaviorSubject } from 'rxjs';
|
import {
|
||||||
|
Observable,
|
||||||
|
Subscription,
|
||||||
|
of,
|
||||||
|
BehaviorSubject,
|
||||||
|
combineLatest
|
||||||
|
} from 'rxjs';
|
||||||
import {
|
import {
|
||||||
DeptInfo,
|
DeptInfo,
|
||||||
QueryProtocolService,
|
QueryProtocolService,
|
||||||
|
@ -155,10 +161,10 @@ export class OrganizationComponent
|
||||||
isShowSearch = false;
|
isShowSearch = false;
|
||||||
searchUserInfos: UserInfoSS[] = [];
|
searchUserInfos: UserInfoSS[] = [];
|
||||||
|
|
||||||
gnbMenuChangedSubject: BehaviorSubject<boolean> = new BehaviorSubject<
|
organizationTreeActivatedSubject: BehaviorSubject<
|
||||||
boolean
|
boolean
|
||||||
>(false);
|
> = new BehaviorSubject<boolean>(false);
|
||||||
gnbMenuChangedSubscription: Subscription;
|
organizationTreeActivatedSubscription: Subscription;
|
||||||
|
|
||||||
/** 부서원 리스트에 virture scroll의 size 가 체킹되지 않아 강제 수행. 1번만. */
|
/** 부서원 리스트에 virture scroll의 size 가 체킹되지 않아 강제 수행. 1번만. */
|
||||||
isInitList = false;
|
isInitList = false;
|
||||||
|
@ -263,11 +269,20 @@ export class OrganizationComponent
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.gnbMenuChangedSubscription = this.store
|
this.organizationTreeActivatedSubscription = combineLatest([
|
||||||
.pipe(select(AppStore.MessengerSelector.SettingsSelector.gnbMenuIndex))
|
this.store.pipe(
|
||||||
.subscribe(menu => {
|
select(AppStore.MessengerSelector.SettingsSelector.gnbMenuIndex)
|
||||||
this.gnbMenuChangedSubject.next(menu === MainMenu.Organization);
|
),
|
||||||
});
|
this.store.pipe(
|
||||||
|
select(
|
||||||
|
AppStore.MessengerSelector.SettingsSelector.organizationTreeActivated
|
||||||
|
)
|
||||||
|
)
|
||||||
|
]).subscribe(([menu, activate]) => {
|
||||||
|
this.organizationTreeActivatedSubject.next(
|
||||||
|
menu === MainMenu.Organization || activate
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewChecked(): void {
|
ngAfterViewChecked(): void {
|
||||||
|
@ -289,8 +304,8 @@ export class OrganizationComponent
|
||||||
if (!!this.myDepartmentUserInfoListSubscription) {
|
if (!!this.myDepartmentUserInfoListSubscription) {
|
||||||
this.myDepartmentUserInfoListSubscription.unsubscribe();
|
this.myDepartmentUserInfoListSubscription.unsubscribe();
|
||||||
}
|
}
|
||||||
if (!!this.gnbMenuChangedSubscription) {
|
if (!!this.organizationTreeActivatedSubscription) {
|
||||||
this.gnbMenuChangedSubscription.unsubscribe();
|
this.organizationTreeActivatedSubscription.unsubscribe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ import { map, tap, catchError, take } from 'rxjs/operators';
|
||||||
import { Store, select } from '@ngrx/store';
|
import { Store, select } from '@ngrx/store';
|
||||||
import * as AppStore from '@app/store';
|
import * as AppStore from '@app/store';
|
||||||
import * as StatusStore from '@app/store/messenger/status';
|
import * as StatusStore from '@app/store/messenger/status';
|
||||||
|
import * as SettingsStore from '@app/store/messenger/settings';
|
||||||
|
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { Company } from '@ucap-webmessenger/api-external';
|
import { Company } from '@ucap-webmessenger/api-external';
|
||||||
|
@ -64,7 +65,6 @@ import {
|
||||||
} from '@ucap-webmessenger/ui';
|
} from '@ucap-webmessenger/ui';
|
||||||
import { TranslateService, TranslateParser } from '@ngx-translate/core';
|
import { TranslateService, TranslateParser } from '@ngx-translate/core';
|
||||||
import { environment } from '../../../../../environments/environment';
|
import { environment } from '../../../../../environments/environment';
|
||||||
import { StringUtil } from '@ucap-webmessenger/core';
|
|
||||||
|
|
||||||
export interface CreateChatDialogData {
|
export interface CreateChatDialogData {
|
||||||
type?: string;
|
type?: string;
|
||||||
|
@ -397,11 +397,17 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
|
||||||
onSelectedTabChange(tabChangeEvent: MatTabChangeEvent): void {
|
onSelectedTabChange(tabChangeEvent: MatTabChangeEvent): void {
|
||||||
this.currentTabIndex = tabChangeEvent.index;
|
this.currentTabIndex = tabChangeEvent.index;
|
||||||
|
|
||||||
if (tabChangeEvent.index === 2) {
|
if (2 === tabChangeEvent.index) {
|
||||||
this.selectedUserList = [];
|
this.selectedUserList = [];
|
||||||
} else {
|
} else {
|
||||||
this.selectedRoom = null;
|
this.selectedRoom = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.store.dispatch(
|
||||||
|
SettingsStore.organizationTreeActivated({
|
||||||
|
activate: 1 === tabChangeEvent.index
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 유저검색 */
|
/** 유저검색 */
|
||||||
|
|
|
@ -7,3 +7,8 @@ export const selectedGnbMenuIndex = createAction(
|
||||||
'[Messenger::Settings] select Gnb MenuIndex',
|
'[Messenger::Settings] select Gnb MenuIndex',
|
||||||
props<{ menuIndex: MainMenu }>()
|
props<{ menuIndex: MainMenu }>()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const organizationTreeActivated = createAction(
|
||||||
|
'[Messenger::Settings] Organization Tree Activated',
|
||||||
|
props<{ activate: boolean }>()
|
||||||
|
);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { createReducer, on } from '@ngrx/store';
|
import { createReducer, on } from '@ngrx/store';
|
||||||
import { initialState } from './state';
|
import { initialState } from './state';
|
||||||
import { selectedGnbMenuIndex } from './actions';
|
import { selectedGnbMenuIndex, organizationTreeActivated } from './actions';
|
||||||
|
|
||||||
import * as AuthenticationStore from '@app/store/account/authentication';
|
import * as AuthenticationStore from '@app/store/account/authentication';
|
||||||
|
|
||||||
|
@ -12,6 +12,12 @@ export const reducer = createReducer(
|
||||||
gnbMenuIndex: action.menuIndex
|
gnbMenuIndex: action.menuIndex
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
|
on(organizationTreeActivated, (state, action) => {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
organizationTreeActivated: action.activate
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
|
||||||
on(AuthenticationStore.logoutInitialize, (state, action) => {
|
on(AuthenticationStore.logoutInitialize, (state, action) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -5,14 +5,23 @@ import { MainMenu } from '@app/types';
|
||||||
|
|
||||||
export interface State {
|
export interface State {
|
||||||
gnbMenuIndex: MainMenu;
|
gnbMenuIndex: MainMenu;
|
||||||
|
organizationTreeActivated: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const initialState: State = {
|
export const initialState: State = {
|
||||||
gnbMenuIndex: MainMenu.Group
|
gnbMenuIndex: MainMenu.Group,
|
||||||
|
organizationTreeActivated: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export function selectors<S>(selector: Selector<any, State>) {
|
export function selectors<S>(selector: Selector<any, State>) {
|
||||||
return {
|
return {
|
||||||
gnbMenuIndex: createSelector(selector, (state: State) => state.gnbMenuIndex)
|
gnbMenuIndex: createSelector(
|
||||||
|
selector,
|
||||||
|
(state: State) => state.gnbMenuIndex
|
||||||
|
),
|
||||||
|
organizationTreeActivated: createSelector(
|
||||||
|
selector,
|
||||||
|
(state: State) => state.organizationTreeActivated
|
||||||
|
)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user