From dc149cb4f1498e7e0cfead1267e09a8c390fa654 Mon Sep 17 00:00:00 2001 From: Park Byung Eun Date: Mon, 8 Aug 2022 06:06:53 +0000 Subject: [PATCH] =?UTF-8?q?=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/modules/user/main/compose/index.ts | 3 +- .../compose/sign-up-compose.component.html | 68 ++++++++++++++ .../main/compose/sign-up-compose.component.ts | 93 +++++++++++++++++++ src/app/modules/user/main/main.component.html | 7 +- src/app/modules/user/main/main.component.ts | 5 + 5 files changed, 174 insertions(+), 2 deletions(-) create mode 100644 src/app/modules/user/main/compose/sign-up-compose.component.html create mode 100644 src/app/modules/user/main/compose/sign-up-compose.component.ts diff --git a/src/app/modules/user/main/compose/index.ts b/src/app/modules/user/main/compose/index.ts index 848d00d..a20e24f 100644 --- a/src/app/modules/user/main/compose/index.ts +++ b/src/app/modules/user/main/compose/index.ts @@ -5,7 +5,7 @@ import { DepositHistoryComposeComponent } from './deposit-history-compose.compon import { NoticeComposeComponent } from './notice-compose.component'; import { WithdrawComposeComponent } from './withdraw-compose.component'; import { WithdrawHistoryComposeComponent } from './withdraw-history-compose.component'; - +import { SignUpComposeComponent } from './sign-up-compose.component'; export const COMPOSE = [ DepositComposeComponent, WithdrawComposeComponent, @@ -14,4 +14,5 @@ export const COMPOSE = [ DepositHistoryComposeComponent, WithdrawHistoryComposeComponent, NoticeComposeComponent, + SignUpComposeComponent, ]; diff --git a/src/app/modules/user/main/compose/sign-up-compose.component.html b/src/app/modules/user/main/compose/sign-up-compose.component.html new file mode 100644 index 0000000..00e066a --- /dev/null +++ b/src/app/modules/user/main/compose/sign-up-compose.component.html @@ -0,0 +1,68 @@ +
+ +
+
회원가입
+ +
+ + +
+ + + 아이디 + +
+
+ + + + 닉네임 + + + + + + 비밀번호 + + + + + + 비밀번호 확인 + + + + +
+
+ + + + + +
+
+
+
diff --git a/src/app/modules/user/main/compose/sign-up-compose.component.ts b/src/app/modules/user/main/compose/sign-up-compose.component.ts new file mode 100644 index 0000000..fb43b7f --- /dev/null +++ b/src/app/modules/user/main/compose/sign-up-compose.component.ts @@ -0,0 +1,93 @@ +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { MatDialogRef } from '@angular/material/dialog'; + +@Component({ + selector: 'sign-up-compose', + templateUrl: './sign-up-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class SignUpComposeComponent implements OnInit { + composeForm!: FormGroup; + copyFields: { cc: boolean; bcc: boolean } = { + cc: false, + bcc: false, + }; + quillModules: any = { + toolbar: [ + ['bold', 'italic', 'underline'], + [{ align: [] }, { list: 'ordered' }, { list: 'bullet' }], + ['clean'], + ], + }; + + /** + * Constructor + */ + constructor( + public matDialogRef: MatDialogRef, + private _formBuilder: FormBuilder + ) {} + + // ----------------------------------------------------------------------------------------------------- + // @ Lifecycle hooks + // ----------------------------------------------------------------------------------------------------- + + /** + * On init + */ + ngOnInit(): void { + // Create the form + this.composeForm = this._formBuilder.group({ + signInId: ['', [Validators.required, Validators.email]], + password: ['', [Validators.email]], + passwordConfirm: ['', [Validators.email]], + nickname: [''], + }); + } + + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + /** + * Show the copy field with the given field name + * + * @param name + */ + showCopyField(name: string): void { + // Return if the name is not one of the available names + if (name !== 'cc' && name !== 'bcc') { + return; + } + + // Show the field + this.copyFields[name] = true; + } + + /** + * Save and close + */ + saveAndClose(): void { + // Save the message as a draft + this.saveAsDraft(); + + // Close the dialog + this.matDialogRef.close(); + } + + /** + * Discard the message + */ + discard(): void {} + + /** + * Save the message as a draft + */ + saveAsDraft(): void {} + + /** + * Send the message + */ + send(): void {} +} diff --git a/src/app/modules/user/main/main.component.html b/src/app/modules/user/main/main.component.html index aa571f9..8703187 100644 --- a/src/app/modules/user/main/main.component.html +++ b/src/app/modules/user/main/main.component.html @@ -99,7 +99,12 @@ 로그인 - diff --git a/src/app/modules/user/main/main.component.ts b/src/app/modules/user/main/main.component.ts index 7b684ac..7e345e7 100644 --- a/src/app/modules/user/main/main.component.ts +++ b/src/app/modules/user/main/main.component.ts @@ -5,10 +5,12 @@ import { CustomerComposeComponent } from './compose/customer-compose.component'; import { DepositComposeComponent } from './compose/deposit-compose.component'; import { DepositHistoryComposeComponent } from './compose/deposit-history-compose.component'; import { NoticeComposeComponent } from './compose/notice-compose.component'; +import { SignUpComposeComponent } from './compose/sign-up-compose.component'; import { WithdrawComposeComponent } from './compose/withdraw-compose.component'; import { WithdrawHistoryComposeComponent } from './compose/withdraw-history-compose.component'; export enum ComposeMenuType { + signup = 'Signup', deposit = 'Deposit', withdraw = 'Withdraw', notice = 'Notice', @@ -205,6 +207,9 @@ export class MainComponent { let selectType: any; switch (composeMenuType) { + case ComposeMenuType.signup: + selectType = SignUpComposeComponent; + break; case ComposeMenuType.deposit: selectType = DepositComposeComponent; break;