회원가입 페이지 추가
This commit is contained in:
parent
968f0cee87
commit
dc149cb4f1
|
@ -5,7 +5,7 @@ import { DepositHistoryComposeComponent } from './deposit-history-compose.compon
|
||||||
import { NoticeComposeComponent } from './notice-compose.component';
|
import { NoticeComposeComponent } from './notice-compose.component';
|
||||||
import { WithdrawComposeComponent } from './withdraw-compose.component';
|
import { WithdrawComposeComponent } from './withdraw-compose.component';
|
||||||
import { WithdrawHistoryComposeComponent } from './withdraw-history-compose.component';
|
import { WithdrawHistoryComposeComponent } from './withdraw-history-compose.component';
|
||||||
|
import { SignUpComposeComponent } from './sign-up-compose.component';
|
||||||
export const COMPOSE = [
|
export const COMPOSE = [
|
||||||
DepositComposeComponent,
|
DepositComposeComponent,
|
||||||
WithdrawComposeComponent,
|
WithdrawComposeComponent,
|
||||||
|
@ -14,4 +14,5 @@ export const COMPOSE = [
|
||||||
DepositHistoryComposeComponent,
|
DepositHistoryComposeComponent,
|
||||||
WithdrawHistoryComposeComponent,
|
WithdrawHistoryComposeComponent,
|
||||||
NoticeComposeComponent,
|
NoticeComposeComponent,
|
||||||
|
SignUpComposeComponent,
|
||||||
];
|
];
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
<div class="flex flex-col max-w-240 md:min-w-160 max-h-screen -m-6">
|
||||||
|
<!-- Header -->
|
||||||
|
<div
|
||||||
|
class="flex flex-0 items-center justify-between h-16 pr-3 sm:pr-5 pl-6 sm:pl-8 bg-primary text-on-primary"
|
||||||
|
>
|
||||||
|
<div class="text-lg font-medium">회원가입</div>
|
||||||
|
<button mat-icon-button (click)="saveAndClose()" [tabIndex]="-1">
|
||||||
|
<mat-icon
|
||||||
|
class="text-current"
|
||||||
|
[svgIcon]="'heroicons_outline:x'"
|
||||||
|
></mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Compose form -->
|
||||||
|
<form
|
||||||
|
class="flex flex-col flex-auto p-6 sm:p-8 overflow-y-auto"
|
||||||
|
[formGroup]="composeForm"
|
||||||
|
>
|
||||||
|
<!-- 아이디 -->
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-label>아이디</mat-label>
|
||||||
|
<input matInput [formControlName]="'signInId'" />
|
||||||
|
<div class="copy-fields-toggles" matSuffix></div>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<!-- 닉네임 -->
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-label>닉네임</mat-label>
|
||||||
|
<input matInput [formControlName]="'nickname'" />
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<!-- 비밀번호 -->
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-label>비밀번호</mat-label>
|
||||||
|
<input matInput [formControlName]="'password'" />
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<!-- 비밀번호 확인 -->
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-label>비밀번호 확인</mat-label>
|
||||||
|
<input matInput [formControlName]="'passwordConfirm'" />
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<!-- Actions -->
|
||||||
|
<div
|
||||||
|
class="flex flex-col sm:flex-row sm:items-center justify-between mt-4 sm:mt-6"
|
||||||
|
style="align-items: center"
|
||||||
|
>
|
||||||
|
<div class="flex items-center mt-4 sm:mt-0">
|
||||||
|
<!-- Discard -->
|
||||||
|
<button class="ml-auto sm:ml-0" mat-stroked-button (click)="discard()">
|
||||||
|
취소
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- Send -->
|
||||||
|
<button
|
||||||
|
class="order-first sm:order-last"
|
||||||
|
mat-flat-button
|
||||||
|
[color]="'primary'"
|
||||||
|
(click)="send()"
|
||||||
|
>
|
||||||
|
회원가입
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
|
@ -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<SignUpComposeComponent>,
|
||||||
|
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 {}
|
||||||
|
}
|
|
@ -99,7 +99,12 @@
|
||||||
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
|
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
|
||||||
<span class="ml-2 mr-1">로그인</span>
|
<span class="ml-2 mr-1">로그인</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="ml-4" mat-flat-button [color]="'primary'">
|
<button
|
||||||
|
class="ml-4"
|
||||||
|
mat-flat-button
|
||||||
|
[color]="'primary'"
|
||||||
|
(click)="__onClickCompose(composeMenuType.signup)"
|
||||||
|
>
|
||||||
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
|
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
|
||||||
<span class="ml-2 mr-1">회원가입</span>
|
<span class="ml-2 mr-1">회원가입</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -5,10 +5,12 @@ import { CustomerComposeComponent } from './compose/customer-compose.component';
|
||||||
import { DepositComposeComponent } from './compose/deposit-compose.component';
|
import { DepositComposeComponent } from './compose/deposit-compose.component';
|
||||||
import { DepositHistoryComposeComponent } from './compose/deposit-history-compose.component';
|
import { DepositHistoryComposeComponent } from './compose/deposit-history-compose.component';
|
||||||
import { NoticeComposeComponent } from './compose/notice-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 { WithdrawComposeComponent } from './compose/withdraw-compose.component';
|
||||||
import { WithdrawHistoryComposeComponent } from './compose/withdraw-history-compose.component';
|
import { WithdrawHistoryComposeComponent } from './compose/withdraw-history-compose.component';
|
||||||
|
|
||||||
export enum ComposeMenuType {
|
export enum ComposeMenuType {
|
||||||
|
signup = 'Signup',
|
||||||
deposit = 'Deposit',
|
deposit = 'Deposit',
|
||||||
withdraw = 'Withdraw',
|
withdraw = 'Withdraw',
|
||||||
notice = 'Notice',
|
notice = 'Notice',
|
||||||
|
@ -205,6 +207,9 @@ export class MainComponent {
|
||||||
let selectType: any;
|
let selectType: any;
|
||||||
|
|
||||||
switch (composeMenuType) {
|
switch (composeMenuType) {
|
||||||
|
case ComposeMenuType.signup:
|
||||||
|
selectType = SignUpComposeComponent;
|
||||||
|
break;
|
||||||
case ComposeMenuType.deposit:
|
case ComposeMenuType.deposit:
|
||||||
selectType = DepositComposeComponent;
|
selectType = DepositComposeComponent;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user