From ac76cbb1c379a558eb578ee9af7c4cbdf5a980f0 Mon Sep 17 00:00:00 2001 From: leejinho Date: Sun, 15 Dec 2019 14:49:52 +0900 Subject: [PATCH] =?UTF-8?q?[=EB=8C=80=EC=83=81=ED=96=A5]=20=EA=B0=9C?= =?UTF-8?q?=EC=9D=B8=EC=A0=95=EB=B3=B4=EC=B2=98=EB=A6=AC=EB=B0=A9=EC=B9=A8?= =?UTF-8?q?=20>=20=EC=9D=B4=EC=9A=A9=20=EC=A3=BC=EC=9D=98=EC=82=AC?= =?UTF-8?q?=ED=95=AD=20=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../messenger/dialogs/account/index.ts | 3 +- .../account/notice.dialog.component.html | 16 +++++++ .../account/notice.dialog.component.scss | 22 ++++++++++ .../account/notice.dialog.component.spec.ts | 24 ++++++++++ .../account/notice.dialog.component.ts | 44 +++++++++++++++++++ .../components/login.page.component.html | 2 + .../components/login.page.component.ts | 32 +++++++++++++- .../src/lib/components/login.component.html | 6 ++- .../src/lib/components/login.component.ts | 8 ++++ 9 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.html create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.scss create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.spec.ts create mode 100644 projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.ts diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/index.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/index.ts index c56cad1c..e817f210 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/index.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/index.ts @@ -1,3 +1,4 @@ import { ChangePasswordDialogComponent } from './change-password.dialog.component'; +import { NoticeDialogComponent } from './notice.dialog.component'; -export const DIALOGS = [ChangePasswordDialogComponent]; +export const DIALOGS = [ChangePasswordDialogComponent, NoticeDialogComponent]; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.html new file mode 100644 index 00000000..37e8206f --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.html @@ -0,0 +1,16 @@ + + + {{ data.title }} + + + +
+ {{ data.message }} +
+
+ + + +
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.scss new file mode 100644 index 00000000..f038cb15 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.scss @@ -0,0 +1,22 @@ +.mat-card{ + padding:10px; + .mat-card-header{ + margin-bottom:20px; + .mat-card-title{ + margin:0 -16px; + padding-bottom:10px; + } + } + .button-farm { + text-align:right; + .mat-primary{ + margin-left:4px; + } + } +} + +form{ +.mat-form-field{ + width:100%; + } +} diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.spec.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.spec.ts new file mode 100644 index 00000000..9d3a719a --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NoticeDialogComponent } from './notice.dialog.component'; + +describe('ui::AlertDialogComponent', () => { + let component: NoticeDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [NoticeDialogComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NoticeDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.ts new file mode 100644 index 00000000..0d7f82f5 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/account/notice.dialog.component.ts @@ -0,0 +1,44 @@ +import { + Component, + OnInit, + Inject, + ViewChild, + ElementRef +} from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; + +export interface NoticeDialogData { + title: string; + message?: string; + html?: string; +} + +// tslint:disable-next-line: no-empty-interface +export interface NoticeDialogResult {} + +@Component({ + selector: 'app-notice-dialog', + templateUrl: './notice.dialog.component.html', + styleUrls: ['./notice.dialog.component.scss'] +}) +export class NoticeDialogComponent implements OnInit { + @ViewChild('messageContainer', { static: true }) + messageContainer: ElementRef; + + tempAgeLimits = []; + + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: NoticeDialogData + ) {} + + ngOnInit(): void { + if (!!this.data.html) { + this.messageContainer.nativeElement.innerHTML = this.data.html; + } + } + + onClickConfirm(): void { + this.dialogRef.close({}); + } +} diff --git a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html index 5a88ab3c..c98a96b9 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html +++ b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.html @@ -3,9 +3,11 @@ diff --git a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.ts b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.ts index 7734c421..c48530a1 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.ts +++ b/projects/ucap-webmessenger-app/src/app/pages/account/components/login.page.component.ts @@ -17,6 +17,11 @@ import { AlertDialogResult } from '@ucap-webmessenger/ui'; import { StringUtil } from '@ucap-webmessenger/core'; +import { + NoticeDialogComponent, + NoticeDialogResult, + NoticeDialogData +} from '@app/layouts/messenger/dialogs/account/notice.dialog.component'; @Component({ selector: 'app-page-account-login', @@ -151,7 +156,30 @@ export class LoginPageComponent implements OnInit, OnDestroy { ); } - onClickTemplate() { - this.router.navigate(['/template']); + onClickNoti() { + // For Daesang,, + this.dialogService.open< + NoticeDialogComponent, + NoticeDialogData, + NoticeDialogResult + >(NoticeDialogComponent, { + width: '500px', + data: { + title: '이용시 주의사항', + html: ` +

1. 메신저 계정/비밀번호를 타인에게 공유하지 않아야 합니다.

+

2. 회사 중요정보(고객정보 포함)를 업무상 필요한 인원에게 필요한 만큼만 공유해야 합니다.

+

3. 퇴근, 회의 등 자리를 비우는 경우 중요자료가 방치되지 않도록 주의하고, Clean Desk를 실천해야 합니다.

+

4. 메신저를 누군가 허락 없이 함부로 열람하고 그 내부 내용을 타인과 공유하지 않아야 합니다.

+

5. 공용PC에 메신저 사용 후 반드시 로그아웃 하시기 바랍니다.

+

6. 사내메신저는 업무용 협업도구입니다. 비업무용 소통을 자제하시기 바랍니다.

+

7. 업무상 인지한 정보(개인의 프라이버시 포함)나 일반인에게 공개되지 않은 회사기록을 통해 얻은 정보는 오직 회사의 이익을 위해서 활용하여야 하며 사외에 유출하거나 타인에게 알려주거나 업무 이외의 목적에 사용하여서는 아니 됩니다.

+` + } + }); } + + // onClickTemplate() { + // this.router.navigate(['/template']); + // } } diff --git a/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.html b/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.html index 117c81c8..9a16cba9 100644 --- a/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.html +++ b/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.html @@ -69,5 +69,9 @@ Don't have an account? Create an account - + diff --git a/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.ts b/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.ts index 0ae8d3db..76f4c967 100644 --- a/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.ts +++ b/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.ts @@ -27,6 +27,8 @@ export class LoginComponent implements OnInit { loginBtnText?: string; @Input() loginBtnEnable: boolean; + @Input() + notiText?: string; @Output() login = new EventEmitter<{ @@ -36,6 +38,8 @@ export class LoginComponent implements OnInit { rememberMe: boolean; notValid: () => void; }>(); + @Output() + notiClick = new EventEmitter(); @ViewChild('loginPw', { static: true }) loginPwElementRef: ElementRef; @@ -85,4 +89,8 @@ export class LoginComponent implements OnInit { } }); } + + onClickNoti(): void { + this.notiClick.emit(); + } }