source refactoring
This commit is contained in:
parent
e56b3a8c4d
commit
3df2d535eb
|
@ -85,10 +85,6 @@ export class ChatComponent implements OnInit, OnDestroy {
|
|||
})
|
||||
)
|
||||
.subscribe();
|
||||
|
||||
this.sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
|
||||
KEY_VER_INFO
|
||||
);
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
|
|
|
@ -63,10 +63,8 @@ export class OrganizationComponent implements OnInit, OnDestroy {
|
|||
selectedDepartmentProcessingSubscription: Subscription;
|
||||
selectedDepartmentName: string;
|
||||
|
||||
loginInfo = this.sessionStorageService.get<LoginInfo>(KEY_LOGIN_INFO);
|
||||
sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
|
||||
KEY_VER_INFO
|
||||
);
|
||||
loginInfo: LoginInfo;
|
||||
sessionVerinfo: VersionInfo2Response;
|
||||
|
||||
constructor(
|
||||
private store: Store<any>,
|
||||
|
@ -74,7 +72,12 @@ export class OrganizationComponent implements OnInit, OnDestroy {
|
|||
private sessionStorageService: SessionStorageService,
|
||||
private dialogService: DialogService,
|
||||
private logger: NGXLogger
|
||||
) {}
|
||||
) {
|
||||
this.loginInfo = this.sessionStorageService.get<LoginInfo>(KEY_LOGIN_INFO);
|
||||
this.sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
|
||||
KEY_VER_INFO
|
||||
);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.departmentInfoList$ = this.store.pipe(
|
||||
|
|
|
@ -83,15 +83,17 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
|
|||
private queryProtocolService: QueryProtocolService,
|
||||
private formBuilder: FormBuilder,
|
||||
private logger: NGXLogger
|
||||
) {}
|
||||
) {
|
||||
this.sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
|
||||
KEY_VER_INFO
|
||||
);
|
||||
}
|
||||
|
||||
UserSelectDialogType = UserSelectDialogType;
|
||||
|
||||
loginRes: LoginResponse;
|
||||
loginResSubscription: Subscription;
|
||||
sessionVerinfo = this.sessionStorageService.get<VersionInfo2Response>(
|
||||
KEY_VER_INFO
|
||||
);
|
||||
sessionVerinfo: VersionInfo2Response;
|
||||
|
||||
// 검색
|
||||
isShowSearch = false;
|
||||
|
|
|
@ -14,10 +14,8 @@ import {
|
|||
} from '@ucap-webmessenger/protocol-authentication';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||
import { FileInfo } from '../models/file-info.json';
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { MatMenu, MatMenuTrigger } from '@angular/material';
|
||||
|
||||
@Component({
|
||||
selector: 'ucap-chat-messages',
|
||||
|
@ -50,11 +48,7 @@ export class MessagesComponent implements OnInit {
|
|||
EventType = EventType;
|
||||
profileImageRoot: string;
|
||||
|
||||
constructor(
|
||||
private logger: NGXLogger,
|
||||
private sessionStorageService: SessionStorageService,
|
||||
private datePipe: DatePipe
|
||||
) {}
|
||||
constructor(private logger: NGXLogger, private datePipe: DatePipe) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.profileImageRoot =
|
||||
|
|
|
@ -2,7 +2,6 @@ import {
|
|||
Component,
|
||||
OnInit,
|
||||
Input,
|
||||
OnDestroy,
|
||||
Output,
|
||||
EventEmitter,
|
||||
ViewEncapsulation
|
||||
|
@ -14,12 +13,7 @@ import {
|
|||
UserInfoDN
|
||||
} from '@ucap-webmessenger/protocol-query';
|
||||
import { StatusBulkInfo, StatusInfo } from '@ucap-webmessenger/protocol-status';
|
||||
import { Store, select } from '@ngrx/store';
|
||||
import * as AppStore from '@app/store';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||
import { StatusCode } from '@ucap-webmessenger/core';
|
||||
|
||||
import { PresenceType } from '../types/presence-type.type';
|
||||
|
@ -31,7 +25,7 @@ import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
|||
styleUrls: ['./user-list-item.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class UserListItemComponent implements OnInit, OnDestroy {
|
||||
export class UserListItemComponent implements OnInit {
|
||||
@Input()
|
||||
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||
@Input()
|
||||
|
@ -58,34 +52,13 @@ export class UserListItemComponent implements OnInit, OnDestroy {
|
|||
|
||||
PresenceType = PresenceType;
|
||||
|
||||
// private profileImageRootSubscription: Subscription;
|
||||
|
||||
constructor(
|
||||
private store: Store<any>,
|
||||
private logger: NGXLogger,
|
||||
private sessionStorageService: SessionStorageService
|
||||
) {}
|
||||
constructor(private logger: NGXLogger) {}
|
||||
|
||||
ngOnInit() {
|
||||
// this.profileImageRootSubscription = this.store
|
||||
// .pipe(
|
||||
// select(AppStore.SettingSelector.VersionInfoSelector.profileImageRoot),
|
||||
// tap(profileImageRoot => {
|
||||
// this.profileImageRoot = this.profileImageRoot || profileImageRoot;
|
||||
// })
|
||||
// )
|
||||
// .subscribe();
|
||||
|
||||
this.profileImageRoot =
|
||||
this.profileImageRoot || this.sessionVerinfo.profileRoot;
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
// if (!!this.profileImageRootSubscription) {
|
||||
// this.profileImageRootSubscription.unsubscribe();
|
||||
// }
|
||||
}
|
||||
|
||||
getPresence(type: string): string {
|
||||
let status: string;
|
||||
let rtnClass = '';
|
||||
|
|
Loading…
Reference in New Issue
Block a user