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