팝업 닫는 로직 통합에 의한 불필요 소스 제거.
This commit is contained in:
parent
ad78e23303
commit
b58e52325d
|
@ -15,9 +15,6 @@ import { FileDownloadItem } from '@ucap-webmessenger/api';
|
||||||
import { CommonApiService } from '@ucap-webmessenger/api-common';
|
import { CommonApiService } from '@ucap-webmessenger/api-common';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { FileProtocolService } from '@ucap-webmessenger/protocol-file';
|
import { FileProtocolService } from '@ucap-webmessenger/protocol-file';
|
||||||
import { select, Store } from '@ngrx/store';
|
|
||||||
import { Subscription } from 'rxjs';
|
|
||||||
import * as AppStore from '@app/store';
|
|
||||||
|
|
||||||
export interface FileViewerDialogData {
|
export interface FileViewerDialogData {
|
||||||
fileInfo: FileEventJson;
|
fileInfo: FileEventJson;
|
||||||
|
@ -35,8 +32,6 @@ export interface FileViewerDialogResult {}
|
||||||
styleUrls: ['./file-viewer.dialog.component.scss']
|
styleUrls: ['./file-viewer.dialog.component.scss']
|
||||||
})
|
})
|
||||||
export class FileViewerDialogComponent implements OnInit, OnDestroy {
|
export class FileViewerDialogComponent implements OnInit, OnDestroy {
|
||||||
loginResSubscription: Subscription;
|
|
||||||
|
|
||||||
fileInfo: FileEventJson;
|
fileInfo: FileEventJson;
|
||||||
downloadUrl: string;
|
downloadUrl: string;
|
||||||
userSeq: number;
|
userSeq: number;
|
||||||
|
@ -56,7 +51,6 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy {
|
||||||
private snackBarService: SnackBarService,
|
private snackBarService: SnackBarService,
|
||||||
private commonApiService: CommonApiService,
|
private commonApiService: CommonApiService,
|
||||||
private fileProtocolService: FileProtocolService,
|
private fileProtocolService: FileProtocolService,
|
||||||
private store: Store<any>,
|
|
||||||
private logger: NGXLogger
|
private logger: NGXLogger
|
||||||
) {
|
) {
|
||||||
this.fileInfo = data.fileInfo;
|
this.fileInfo = data.fileInfo;
|
||||||
|
@ -76,24 +70,9 @@ export class FileViewerDialogComponent implements OnInit, OnDestroy {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {}
|
||||||
this.loginResSubscription = this.store
|
|
||||||
.pipe(
|
|
||||||
select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
|
|
||||||
tap(loginRes => {
|
|
||||||
if (!loginRes) {
|
|
||||||
this.onClosedViewer();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
.subscribe();
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {}
|
||||||
if (!!this.loginResSubscription) {
|
|
||||||
this.loginResSubscription.unsubscribe();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onDownload(fileDownloadItem: FileDownloadItem): void {
|
onDownload(fileDownloadItem: FileDownloadItem): void {
|
||||||
this.commonApiService
|
this.commonApiService
|
||||||
|
|
|
@ -174,10 +174,6 @@ export class CreateChatDialogComponent implements OnInit, OnDestroy {
|
||||||
.pipe(
|
.pipe(
|
||||||
select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
|
select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
|
||||||
tap(loginRes => {
|
tap(loginRes => {
|
||||||
if (!loginRes) {
|
|
||||||
this.onClickCancel();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loginRes = loginRes;
|
this.loginRes = loginRes;
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
import { Component, OnInit, Inject, OnDestroy } from '@angular/core';
|
import { Component, OnInit, Inject, OnDestroy } from '@angular/core';
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||||
import { NoticeList } from '@ucap-webmessenger/api-message';
|
import { NoticeList } from '@ucap-webmessenger/api-message';
|
||||||
import { Subscription } from 'rxjs';
|
|
||||||
import { select, Store } from '@ngrx/store';
|
|
||||||
import { tap } from 'rxjs/operators';
|
|
||||||
import * as AppStore from '@app/store';
|
|
||||||
|
|
||||||
export interface NoticeDetailDialogData {
|
export interface NoticeDetailDialogData {
|
||||||
notice: NoticeList;
|
notice: NoticeList;
|
||||||
|
@ -18,35 +14,17 @@ export interface NoticeDetailDialogResult {}
|
||||||
styleUrls: ['./notice-detail.dialog.component.scss']
|
styleUrls: ['./notice-detail.dialog.component.scss']
|
||||||
})
|
})
|
||||||
export class NoticeDetailDialogComponent implements OnInit, OnDestroy {
|
export class NoticeDetailDialogComponent implements OnInit, OnDestroy {
|
||||||
loginResSubscription: Subscription;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialogRef: MatDialogRef<
|
public dialogRef: MatDialogRef<
|
||||||
NoticeDetailDialogData,
|
NoticeDetailDialogData,
|
||||||
NoticeDetailDialogResult
|
NoticeDetailDialogResult
|
||||||
>,
|
>,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: NoticeDetailDialogData,
|
@Inject(MAT_DIALOG_DATA) public data: NoticeDetailDialogData
|
||||||
private store: Store<any>
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {}
|
||||||
this.loginResSubscription = this.store
|
|
||||||
.pipe(
|
|
||||||
select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
|
|
||||||
tap(loginRes => {
|
|
||||||
if (!loginRes) {
|
|
||||||
this.onClickConfirm();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
.subscribe();
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {}
|
||||||
if (!!this.loginResSubscription) {
|
|
||||||
this.loginResSubscription.unsubscribe();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onClickConfirm(): void {
|
onClickConfirm(): void {
|
||||||
this.dialogRef.close();
|
this.dialogRef.close();
|
||||||
|
|
|
@ -119,10 +119,6 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
|
||||||
.pipe(
|
.pipe(
|
||||||
select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
|
select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
|
||||||
tap(loginRes => {
|
tap(loginRes => {
|
||||||
if (!loginRes) {
|
|
||||||
this.onClose();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loginRes = loginRes;
|
this.loginRes = loginRes;
|
||||||
if (!!loginRes && loginRes.userSeq === this.data.userInfo.seq) {
|
if (!!loginRes && loginRes.userSeq === this.data.userInfo.seq) {
|
||||||
this.isMe = true;
|
this.isMe = true;
|
||||||
|
|
|
@ -86,9 +86,6 @@ export class IntegratedSearchDialogComponent implements OnInit, OnDestroy {
|
||||||
.pipe(
|
.pipe(
|
||||||
select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
|
select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
|
||||||
tap(loginRes => {
|
tap(loginRes => {
|
||||||
if (!loginRes) {
|
|
||||||
this.onCancel();
|
|
||||||
}
|
|
||||||
this.loginRes = loginRes;
|
this.loginRes = loginRes;
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user