From 593b67d4e130964895eaadb3686eafc2e595c5c0 Mon Sep 17 00:00:00 2001 From: Park Byung Eun Date: Sun, 21 Aug 2022 01:22:27 +0000 Subject: [PATCH] =?UTF-8?q?game=20main=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app.routing.ts | 39 ++- src/app/core/auth/guards/noAuth.guard.ts | 2 +- .../main/compose/comp-compose.component.html | 123 +++++++ .../main/compose/comp-compose.component.ts | 94 +++++ .../compose/customer-compose.component.html | 123 +++++++ .../compose/customer-compose.component.ts | 93 +++++ .../compose/deposit-compose.component.html | 123 +++++++ .../main/compose/deposit-compose.component.ts | 94 +++++ .../deposit-history-compose.component.html | 123 +++++++ .../deposit-history-compose.component.ts | 94 +++++ src/app/modules/game/main/compose/index.ts | 20 ++ .../compose/notice-compose.component.html | 123 +++++++ .../main/compose/notice-compose.component.ts | 94 +++++ .../compose/sign-in-compose.component.html | 65 ++++ .../main/compose/sign-in-compose.component.ts | 99 ++++++ .../compose/sign-up-compose.component.html | 280 +++++++++++++++ .../main/compose/sign-up-compose.component.ts | 226 ++++++++++++ .../compose/withdraw-compose.component.html | 123 +++++++ .../compose/withdraw-compose.component.ts | 94 +++++ .../withdraw-history-compose.component.html | 123 +++++++ .../withdraw-history-compose.component.ts | 94 +++++ src/app/modules/game/main/main.component.html | 327 ++++++++++++++++++ src/app/modules/game/main/main.component.ts | 244 +++++++++++++ src/app/modules/game/main/main.module.ts | 44 +++ 24 files changed, 2845 insertions(+), 19 deletions(-) create mode 100644 src/app/modules/game/main/compose/comp-compose.component.html create mode 100644 src/app/modules/game/main/compose/comp-compose.component.ts create mode 100644 src/app/modules/game/main/compose/customer-compose.component.html create mode 100644 src/app/modules/game/main/compose/customer-compose.component.ts create mode 100644 src/app/modules/game/main/compose/deposit-compose.component.html create mode 100644 src/app/modules/game/main/compose/deposit-compose.component.ts create mode 100644 src/app/modules/game/main/compose/deposit-history-compose.component.html create mode 100644 src/app/modules/game/main/compose/deposit-history-compose.component.ts create mode 100644 src/app/modules/game/main/compose/index.ts create mode 100644 src/app/modules/game/main/compose/notice-compose.component.html create mode 100644 src/app/modules/game/main/compose/notice-compose.component.ts create mode 100644 src/app/modules/game/main/compose/sign-in-compose.component.html create mode 100644 src/app/modules/game/main/compose/sign-in-compose.component.ts create mode 100644 src/app/modules/game/main/compose/sign-up-compose.component.html create mode 100644 src/app/modules/game/main/compose/sign-up-compose.component.ts create mode 100644 src/app/modules/game/main/compose/withdraw-compose.component.html create mode 100644 src/app/modules/game/main/compose/withdraw-compose.component.ts create mode 100644 src/app/modules/game/main/compose/withdraw-history-compose.component.html create mode 100644 src/app/modules/game/main/compose/withdraw-history-compose.component.ts create mode 100644 src/app/modules/game/main/main.component.html create mode 100644 src/app/modules/game/main/main.component.ts create mode 100644 src/app/modules/game/main/main.module.ts diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts index ff79203..f60625a 100644 --- a/src/app/app.routing.ts +++ b/src/app/app.routing.ts @@ -119,22 +119,25 @@ export const appRoutes: Route[] = [ // }, // Admin routes - // { - // path: '', - // canActivate: [AuthGuard], - // canActivateChild: [AuthGuard], - // component: LayoutComponent, - // resolve: { - // initialData: InitialDataResolver, - // }, - // children: [ - // { - // path: 'main', - // loadChildren: () => - // import('app/modules/user/main/main.module').then( - // (m: any) => m.MainModule - // ), - // }, - // ], - // }, + { + path: '', + canActivate: [AuthGuard], + canActivateChild: [AuthGuard], + component: LayoutComponent, + data: { + layout: 'empty', + }, + resolve: { + initialData: InitialDataResolver, + }, + children: [ + { + path: 'game', + loadChildren: () => + import('app/modules/game/main/main.module').then( + (m: any) => m.GameMainModule + ), + }, + ], + }, ]; diff --git a/src/app/core/auth/guards/noAuth.guard.ts b/src/app/core/auth/guards/noAuth.guard.ts index b135ce4..229208b 100644 --- a/src/app/core/auth/guards/noAuth.guard.ts +++ b/src/app/core/auth/guards/noAuth.guard.ts @@ -85,7 +85,7 @@ export class NoAuthGuard implements CanActivate, CanActivateChild, CanLoad { // If the user is authenticated... if (authenticated) { // Redirect to the root - this._router.navigate(['']); + this._router.navigate(['game']); // Prevent the access return of(false); diff --git a/src/app/modules/game/main/compose/comp-compose.component.html b/src/app/modules/game/main/compose/comp-compose.component.html new file mode 100644 index 0000000..a8b20be --- /dev/null +++ b/src/app/modules/game/main/compose/comp-compose.component.html @@ -0,0 +1,123 @@ +
+ +
+
Comp
+ +
+ + +
+ + + To + +
+ + Cc + + + Bcc + +
+
+ + + + Cc + + + + + + Bcc + + + + + + Subject + + + + + + + +
+
+ + + + + + + + +
+ +
+ + + + + + +
+
+
+
diff --git a/src/app/modules/game/main/compose/comp-compose.component.ts b/src/app/modules/game/main/compose/comp-compose.component.ts new file mode 100644 index 0000000..4e4171d --- /dev/null +++ b/src/app/modules/game/main/compose/comp-compose.component.ts @@ -0,0 +1,94 @@ +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { MatDialogRef } from '@angular/material/dialog'; + +@Component({ + selector: 'comp-compose', + templateUrl: './comp-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class CompComposeComponent 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({ + to: ['', [Validators.required, Validators.email]], + cc: ['', [Validators.email]], + bcc: ['', [Validators.email]], + subject: [''], + body: ['', [Validators.required]], + }); + } + + // ----------------------------------------------------------------------------------------------------- + // @ 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/game/main/compose/customer-compose.component.html b/src/app/modules/game/main/compose/customer-compose.component.html new file mode 100644 index 0000000..85d12de --- /dev/null +++ b/src/app/modules/game/main/compose/customer-compose.component.html @@ -0,0 +1,123 @@ +
+ +
+
customer
+ +
+ + +
+ + + To + +
+ + Cc + + + Bcc + +
+
+ + + + Cc + + + + + + Bcc + + + + + + Subject + + + + + + + +
+
+ + + + + + + + +
+ +
+ + + + + + +
+
+
+
diff --git a/src/app/modules/game/main/compose/customer-compose.component.ts b/src/app/modules/game/main/compose/customer-compose.component.ts new file mode 100644 index 0000000..1f37b46 --- /dev/null +++ b/src/app/modules/game/main/compose/customer-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: 'customer-compose', + templateUrl: './customer-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class CustomerComposeComponent 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({ + to: ['', [Validators.required, Validators.email]], + cc: ['', [Validators.email]], + bcc: ['', [Validators.email]], + subject: [''], + body: ['', [Validators.required]], + }); + } + + // ----------------------------------------------------------------------------------------------------- + // @ 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/game/main/compose/deposit-compose.component.html b/src/app/modules/game/main/compose/deposit-compose.component.html new file mode 100644 index 0000000..114eb35 --- /dev/null +++ b/src/app/modules/game/main/compose/deposit-compose.component.html @@ -0,0 +1,123 @@ +
+ +
+
deposit
+ +
+ + +
+ + + To + +
+ + Cc + + + Bcc + +
+
+ + + + Cc + + + + + + Bcc + + + + + + Subject + + + + + + + +
+
+ + + + + + + + +
+ +
+ + + + + + +
+
+
+
diff --git a/src/app/modules/game/main/compose/deposit-compose.component.ts b/src/app/modules/game/main/compose/deposit-compose.component.ts new file mode 100644 index 0000000..d56e036 --- /dev/null +++ b/src/app/modules/game/main/compose/deposit-compose.component.ts @@ -0,0 +1,94 @@ +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { MatDialogRef } from '@angular/material/dialog'; + +@Component({ + selector: 'deposit-compose', + templateUrl: './deposit-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class DepositComposeComponent 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({ + to: ['', [Validators.required, Validators.email]], + cc: ['', [Validators.email]], + bcc: ['', [Validators.email]], + subject: [''], + body: ['', [Validators.required]], + }); + } + + // ----------------------------------------------------------------------------------------------------- + // @ 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/game/main/compose/deposit-history-compose.component.html b/src/app/modules/game/main/compose/deposit-history-compose.component.html new file mode 100644 index 0000000..9a8f338 --- /dev/null +++ b/src/app/modules/game/main/compose/deposit-history-compose.component.html @@ -0,0 +1,123 @@ +
+ +
+
Deposit History
+ +
+ + +
+ + + To + +
+ + Cc + + + Bcc + +
+
+ + + + Cc + + + + + + Bcc + + + + + + Subject + + + + + + + +
+
+ + + + + + + + +
+ +
+ + + + + + +
+
+
+
diff --git a/src/app/modules/game/main/compose/deposit-history-compose.component.ts b/src/app/modules/game/main/compose/deposit-history-compose.component.ts new file mode 100644 index 0000000..380d329 --- /dev/null +++ b/src/app/modules/game/main/compose/deposit-history-compose.component.ts @@ -0,0 +1,94 @@ +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { MatDialogRef } from '@angular/material/dialog'; + +@Component({ + selector: 'deposit-history-compose', + templateUrl: './deposit-history-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class DepositHistoryComposeComponent 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({ + to: ['', [Validators.required, Validators.email]], + cc: ['', [Validators.email]], + bcc: ['', [Validators.email]], + subject: [''], + body: ['', [Validators.required]], + }); + } + + // ----------------------------------------------------------------------------------------------------- + // @ 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/game/main/compose/index.ts b/src/app/modules/game/main/compose/index.ts new file mode 100644 index 0000000..7d9ad72 --- /dev/null +++ b/src/app/modules/game/main/compose/index.ts @@ -0,0 +1,20 @@ +import { CompComposeComponent } from './comp-compose.component'; +import { CustomerComposeComponent } from './customer-compose.component'; +import { DepositComposeComponent } from './deposit-compose.component'; +import { DepositHistoryComposeComponent } from './deposit-history-compose.component'; +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'; +import { SignInComposeComponent } from './sign-in-compose.component'; +export const COMPOSE = [ + DepositComposeComponent, + WithdrawComposeComponent, + CompComposeComponent, + CustomerComposeComponent, + DepositHistoryComposeComponent, + WithdrawHistoryComposeComponent, + NoticeComposeComponent, + SignUpComposeComponent, + SignInComposeComponent, +]; diff --git a/src/app/modules/game/main/compose/notice-compose.component.html b/src/app/modules/game/main/compose/notice-compose.component.html new file mode 100644 index 0000000..bea4966 --- /dev/null +++ b/src/app/modules/game/main/compose/notice-compose.component.html @@ -0,0 +1,123 @@ +
+ +
+
Notice
+ +
+ + +
+ + + To + +
+ + Cc + + + Bcc + +
+
+ + + + Cc + + + + + + Bcc + + + + + + Subject + + + + + + + +
+
+ + + + + + + + +
+ +
+ + + + + + +
+
+
+
diff --git a/src/app/modules/game/main/compose/notice-compose.component.ts b/src/app/modules/game/main/compose/notice-compose.component.ts new file mode 100644 index 0000000..265a577 --- /dev/null +++ b/src/app/modules/game/main/compose/notice-compose.component.ts @@ -0,0 +1,94 @@ +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { MatDialogRef } from '@angular/material/dialog'; + +@Component({ + selector: 'notice-compose', + templateUrl: './notice-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class NoticeComposeComponent 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({ + to: ['', [Validators.required, Validators.email]], + cc: ['', [Validators.email]], + bcc: ['', [Validators.email]], + subject: [''], + body: ['', [Validators.required]], + }); + } + + // ----------------------------------------------------------------------------------------------------- + // @ 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/game/main/compose/sign-in-compose.component.html b/src/app/modules/game/main/compose/sign-in-compose.component.html new file mode 100644 index 0000000..fc7fedc --- /dev/null +++ b/src/app/modules/game/main/compose/sign-in-compose.component.html @@ -0,0 +1,65 @@ +
+ +
+
로그인
+ +
+ + {{ alert.message }} + + +
+ + + 아이디 + +
+
+ + + + 비밀번호 + + + + +
+
+ + + + + +
+
+
+
diff --git a/src/app/modules/game/main/compose/sign-in-compose.component.ts b/src/app/modules/game/main/compose/sign-in-compose.component.ts new file mode 100644 index 0000000..42564ad --- /dev/null +++ b/src/app/modules/game/main/compose/sign-in-compose.component.ts @@ -0,0 +1,99 @@ +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { MatDialogRef } from '@angular/material/dialog'; +import { FuseAlertType } from '@fuse/components/alert'; +import { AuthService } from 'app/core/auth/auth.service'; + +@Component({ + selector: 'sign-in-compose', + templateUrl: './sign-in-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class SignInComposeComponent implements OnInit { + signInComposeForm!: FormGroup; + + alert: { type: FuseAlertType; message: string } = { + type: 'success', + message: '로그인이 성공하였습니다.', + }; + + showAlert: boolean = false; + + /** + * Constructor + */ + constructor( + public matDialogRef: MatDialogRef, + private _formBuilder: FormBuilder, + private _authService: AuthService + ) {} + + // ----------------------------------------------------------------------------------------------------- + // @ Lifecycle hooks + // ----------------------------------------------------------------------------------------------------- + + /** + * On init + */ + ngOnInit(): void { + // Create the form + this.signInComposeForm = this._formBuilder.group({ + username: ['', [Validators.required]], + password: ['', [Validators.required]], + }); + } + + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + /** + * 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 { + // Return if the form is invalid + if (this.signInComposeForm?.invalid) { + return; + } + + // Disable the form + this.signInComposeForm?.disable(); + + // Sign in + this._authService + .signIn(this.signInComposeForm?.value) + .then(() => { + console.log(); + this.showAlert = true; + }) + .catch((e) => { + this.showAlert = true; + this.alert = { type: 'error', message: '등록에 실패하였습니다.' }; + // Re-enable the form + this.signInComposeForm?.enable(); + + // Reset the form + }); + } +} diff --git a/src/app/modules/game/main/compose/sign-up-compose.component.html b/src/app/modules/game/main/compose/sign-up-compose.component.html new file mode 100644 index 0000000..3277942 --- /dev/null +++ b/src/app/modules/game/main/compose/sign-up-compose.component.html @@ -0,0 +1,280 @@ +
+ +
+
회원가입
+ +
+ + + {{ alert.message }} + + +
+
+
+ +
+ + + + 추천인 코드 + + + 추천인 코드는 필수 입력입니다. + + + 추천인 코드는 필수 입력입니다. + + + + +
+ +
+
+ + + 아이디 + + + 아이디는 필수 입력입니다. + + + 아이디가 중복됩니다. + + + + + + + 닉네임 + + + 닉네임은 필수 입력입니다. + + + 닉네임이 중복됩니다. + + +
+
+ +
+
+ + + 비밀번호 + + + 비밀번호는 필수 입력입니다. + + + + + + 비밀번호 확인 + + + 비밀번호 확인은 필수 입력입니다. + + + 비밀번호가 동일하지 않습니다. + + +
+
+
+
+ + + 출금비밀번호 + + + 출금 비밀번호는 필수 입력입니다. + + + + + + 전화번호 + + + 전화번호는 필수 입력입니다. + + +
+
+
+
+ + + 은행명 + + + {{ bank.getName() }} + + + + + 은행명은 필수 입력입니다. + + + + + + 계좌번호 + + + 계좌번호는 필수 입력입니다. + + +
+
+
+
+ + + 예금주 + + + 예금주는 필수 입력입니다. + + +
+
+ +
+
+ + + + + +
+
+
+
+
+
+
diff --git a/src/app/modules/game/main/compose/sign-up-compose.component.ts b/src/app/modules/game/main/compose/sign-up-compose.component.ts new file mode 100644 index 0000000..0df472c --- /dev/null +++ b/src/app/modules/game/main/compose/sign-up-compose.component.ts @@ -0,0 +1,226 @@ +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { + AbstractControl, + FormBuilder, + FormGroup, + ValidatorFn, + Validators, +} from '@angular/forms'; +import { MatDialogRef } from '@angular/material/dialog'; +import { fuseAnimations } from '@fuse/animations'; +import { FuseAlertType } from '@fuse/components/alert'; +import { BankService } from 'app/modules/polyglot/bank/services/bank.service'; +import { IdentityService } from 'app/modules/polyglot/identity/services/identity.service'; +import { MemberService } from 'app/modules/polyglot/member/services/member.service'; +import { MemberReferrerService } from 'app/modules/polyglot/member_referrer/services/member_referrer.service'; +import { + CreateMemberRequest, + CreateMemberResponse, +} from 'app/modules/proto/c2se/member_pb'; +import { Bank } from 'app/modules/proto/models/bank_pb'; + +@Component({ + selector: 'sign-up-compose', + templateUrl: './sign-up-compose.component.html', + encapsulation: ViewEncapsulation.None, + animations: fuseAnimations, +}) +export class SignUpComposeComponent implements OnInit { + signupComposeForm!: FormGroup; + + isSendDisable = false; + banks!: Bank[]; + + alert: { type: FuseAlertType; message: string } = { + type: 'success', + message: '등록이 성공하였습니다.', + }; + + showAlert: boolean = false; + + /** + * Constructor + */ + constructor( + public matDialogRef: MatDialogRef, + private _formBuilder: FormBuilder, + private _identityService: IdentityService, + private _memberService: MemberService, + private _memberReferrerService: MemberReferrerService, + private _bankService: BankService + ) {} + + // ----------------------------------------------------------------------------------------------------- + // @ Lifecycle hooks + // ----------------------------------------------------------------------------------------------------- + + /** + * On init + */ + ngOnInit(): void { + this._bankService + .listBanks() + .then((result) => { + this.banks = result.getBanksList(); + }) + .catch((reson) => console.log(reson)); + + // Create the form + this.signupComposeForm = this._formBuilder.group({ + referalCode: ['maejang0lvl1', [Validators.required]], + username: ['', [Validators.required]], + nickname: ['', Validators.required], + password: ['1234', [Validators.required]], + passwordConfirm: [ + '1234', + [Validators.required, this.checkSameForPassword()], + ], + exchangePassword: ['1234', [Validators.required]], + mobilePhoneNumber: ['01012345678', [Validators.required]], + bankId: ['', [Validators.required]], + accountNumber: ['123123123', [Validators.required]], + accountHolder: ['', [Validators.required]], + }); + } + + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + /** + * 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 { + if (!this.signupComposeForm?.valid) { + return; + } + + this.isSendDisable = true; + + const { + referalCode, + username, + nickname, + password, + passwordConfirm, + exchangePassword, + mobilePhoneNumber, + bankId, + accountNumber, + accountHolder, + } = this.signupComposeForm?.value; + + let bank_account = new CreateMemberRequest.BankAccount(); + bank_account.setBankId(bankId); + bank_account.setName(accountHolder); + bank_account.setAccountNumber(accountNumber); + bank_account.setExchangePassword(exchangePassword); + + const member = new CreateMemberRequest(); + + member.setSiteId('d7cbae26-53b6-4cb1-85a4-66b956cbe1d4'); + member.setUsername(username); + member.setPassword(password); + member.setMemberClassId('4598f07a-86d1-42a4-b038-25706683a7cd'); + member.setMemberLevelId('c56231ac-2120-4a81-a30a-5d41fafb6c57'); + member.setReferrerMemberUsername(referalCode); + member.setNickname(nickname); + member.setMobilePhoneNumber(mobilePhoneNumber); + member.setBankAccount(bank_account); + + this._memberService + .createMember(member) + .then((res: CreateMemberResponse.Result) => { + console.log(res.getMember()); + this.showAlert = true; + }) + .catch((e) => { + this.showAlert = true; + this.alert = { type: 'error', message: '등록에 실패하였습니다.' }; + }) + .finally(() => setTimeout(() => this.close(), 5000)); + } + + __checkReferrerCode(event: FocusEvent): void { + const code = this.signupComposeForm.get('referalCode')?.value; + this._memberReferrerService.getMemberReferrerByCode(code).then((result) => { + if (!result) { + this.signupComposeForm + ?.get('referalCode') + ?.setErrors({ notExistReferalCode: true }); + } + }); + } + + __checkUsernameDuplicate(event: FocusEvent): void { + const username = this.signupComposeForm?.get('username')?.value; + // console.log(event, '::', username); + this._identityService + .checkUsernameForDuplication(username) + .then((isUse: boolean) => { + if (!!isUse) { + this.signupComposeForm + ?.get('username') + ?.setErrors({ usernameDuplicate: true }); + } + // this._changeDetectorRef.markForCheck(); + }); + } + + __checkNickname(event: FocusEvent): void { + const nickname = this.signupComposeForm?.get('nickname')?.value; + + this._identityService + .checkNicknameForDuplication(nickname) + .then((isUse: boolean) => { + if (!!isUse) { + this.signupComposeForm + ?.get('nickname') + ?.setErrors({ nicknameDuplicate: true }); + } + // this._changeDetectorRef.markForCheck(); + }); + } + + close(): void { + this.matDialogRef.close({ + choice: true, + }); + } + + private checkSameForPassword(): ValidatorFn { + return (control: AbstractControl): { [key: string]: any } | null => { + if (!control || !control.value || control.value === '') { + return null; + } + const password = this.signupComposeForm?.get('password')?.value as string; + const passwordConfirm = control.value as string; + + if (password !== passwordConfirm) { + return { passwordNotMatch: true }; + } + return null; + }; + } +} diff --git a/src/app/modules/game/main/compose/withdraw-compose.component.html b/src/app/modules/game/main/compose/withdraw-compose.component.html new file mode 100644 index 0000000..4789dc2 --- /dev/null +++ b/src/app/modules/game/main/compose/withdraw-compose.component.html @@ -0,0 +1,123 @@ +
+ +
+
Withdraw
+ +
+ + +
+ + + To + +
+ + Cc + + + Bcc + +
+
+ + + + Cc + + + + + + Bcc + + + + + + Subject + + + + + + + +
+
+ + + + + + + + +
+ +
+ + + + + + +
+
+
+
diff --git a/src/app/modules/game/main/compose/withdraw-compose.component.ts b/src/app/modules/game/main/compose/withdraw-compose.component.ts new file mode 100644 index 0000000..51a1295 --- /dev/null +++ b/src/app/modules/game/main/compose/withdraw-compose.component.ts @@ -0,0 +1,94 @@ +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { MatDialogRef } from '@angular/material/dialog'; + +@Component({ + selector: 'withdraw-compose', + templateUrl: './withdraw-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class WithdrawComposeComponent 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({ + to: ['', [Validators.required, Validators.email]], + cc: ['', [Validators.email]], + bcc: ['', [Validators.email]], + subject: [''], + body: ['', [Validators.required]], + }); + } + + // ----------------------------------------------------------------------------------------------------- + // @ 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/game/main/compose/withdraw-history-compose.component.html b/src/app/modules/game/main/compose/withdraw-history-compose.component.html new file mode 100644 index 0000000..5eb6d19 --- /dev/null +++ b/src/app/modules/game/main/compose/withdraw-history-compose.component.html @@ -0,0 +1,123 @@ +
+ +
+
Withdraw History
+ +
+ + +
+ + + To + +
+ + Cc + + + Bcc + +
+
+ + + + Cc + + + + + + Bcc + + + + + + Subject + + + + + + + +
+
+ + + + + + + + +
+ +
+ + + + + + +
+
+
+
diff --git a/src/app/modules/game/main/compose/withdraw-history-compose.component.ts b/src/app/modules/game/main/compose/withdraw-history-compose.component.ts new file mode 100644 index 0000000..31e50d7 --- /dev/null +++ b/src/app/modules/game/main/compose/withdraw-history-compose.component.ts @@ -0,0 +1,94 @@ +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { MatDialogRef } from '@angular/material/dialog'; + +@Component({ + selector: 'withdraw-history-compose', + templateUrl: './withdraw-history-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class WithdrawHistoryComposeComponent 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({ + to: ['', [Validators.required, Validators.email]], + cc: ['', [Validators.email]], + bcc: ['', [Validators.email]], + subject: [''], + body: ['', [Validators.required]], + }); + } + + // ----------------------------------------------------------------------------------------------------- + // @ 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/game/main/main.component.html b/src/app/modules/game/main/main.component.html new file mode 100644 index 0000000..be4496d --- /dev/null +++ b/src/app/modules/game/main/main.component.html @@ -0,0 +1,327 @@ +
+ +
+
+ +
+ + +
+ +
+ + + + + + + +
+ +
+ + + +
+
+ + +
+
+ +
+
+ + + + +
실시간출금
+
+ Create and edit projects, upload images via drag drop, add + categories, add custom fields, create interactive forms and more. +
+
+
+ + + + + +
실시간입금
+
+ Search and filter within the projects, categories and custom + fields. Save search and filter details for easy access. +
+
+
+ + + + +
공지사항
+
+ +
+
+ +
+
+
{{ scheduleItem.title }}
+
+ +
+ +
+ {{ scheduleItem.time }} +
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+ +
+ +
+
diff --git a/src/app/modules/game/main/main.component.ts b/src/app/modules/game/main/main.component.ts new file mode 100644 index 0000000..46cf8d2 --- /dev/null +++ b/src/app/modules/game/main/main.component.ts @@ -0,0 +1,244 @@ +import { Component, ViewEncapsulation } from '@angular/core'; +import { MatDialog } from '@angular/material/dialog'; +import { CompComposeComponent } from './compose/comp-compose.component'; +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 { SignInComposeComponent } from './compose/sign-in-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 { + signOut = 'signOut', + deposit = 'Deposit', + withdraw = 'Withdraw', + notice = 'Notice', + comp = 'Comp', + customer = 'Customer', + depositHistory = 'DepositHistory', + withdrawHistory = 'WithdrawHistory', +} + +@Component({ + selector: 'main', + templateUrl: './main.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class GameMainComponent { + composeMenuType = ComposeMenuType; + + components = [ + { + id: 'ag(1)', + name: '에볼루션', + summary: 'Evolution', + exampleSpecs: { + prefix: 'autocomplete-', + }, + additionalApiDocs: [ + { + name: 'Testing', + path: 'material-autocomplete-testing.html', + }, + ], + }, + { + id: 'allbet', + name: '프라그메틱', + summary: 'PragmaticPlay.', + exampleSpecs: { + prefix: 'badge-', + }, + additionalApiDocs: [ + { + name: 'Testing', + path: 'material-badge-testing.html', + }, + ], + }, + { + id: 'elysium', + name: '드림게이밍', + summary: 'DreamGaming', + exampleSpecs: { + prefix: 'bottom-sheet-', + }, + additionalApiDocs: [ + { + name: 'Testing', + path: 'material-bottom-sheet-testing.html', + }, + ], + }, + { + id: 'elysium', + name: '마이크로게이밍', + summary: 'MicroGaming', + exampleSpecs: { + prefix: 'button-', + exclude: ['button-toggle-'], + }, + additionalApiDocs: [ + { + name: 'Testing', + path: 'material-button-testing.html', + }, + ], + }, + { + id: 'evolution', + name: '오리엔탈플러스', + summary: 'OrientalPlus', + exampleSpecs: { + prefix: 'button-toggle-', + }, + additionalApiDocs: [ + { + name: 'Testing', + path: 'material-button-toggle-testing.html', + }, + ], + }, + { + id: 'ezugi', + name: '아시안게이밍', + summary: 'AsiaGaming', + exampleSpecs: { + prefix: 'card-', + }, + additionalApiDocs: [ + { + name: 'Testing', + path: 'material-card-testing.html', + }, + ], + }, + { + id: 'ezugi', + name: 'CQ9LIVE', + summary: 'CQ9LIVE', + exampleSpecs: { + prefix: 'checkbox-', + }, + additionalApiDocs: [ + { + name: 'Testing', + path: 'material-checkbox-testing.html', + }, + ], + }, + { + id: 'ezugi', + name: '이주기', + summary: 'Ezugi', + exampleSpecs: { + prefix: 'chips-', + }, + additionalApiDocs: [ + { + name: 'Testing', + path: 'material-chips-testing.html', + }, + ], + }, + + // { + // id: 'ezugi', + // name: '비보카지노', + // summary: 'VIVO', + // exampleSpecs: { + // prefix: 'core-', + // }, + // additionalApiDocs: [ + // { + // name: 'Testing', + // path: 'material-core-testing.html', + // }, + // ], + // }, + ]; + + data = { + schedule: { + today: [ + { + title: '계좌 등록 안내', + time: '2022-06-08', + }, + { + title: '오토프로그램 이용 안냐', + time: '2022-06-08', + }, + { + title: '입출금 규정 안내', + time: '2022-06-08', + }, + { + title: '원피(가상계좌)사용 안내', + time: '2022-06-08', + }, + { + title: '입금문의 안내(필독)', + time: '2022-06-08', + }, + ], + }, + }; + /** + * Constructor + */ + constructor(private _matDialog: MatDialog) {} + + /** + * Track by function for ngFor loops + * + * @param index + * @param item + */ + trackByFn(index: number, item: any): any { + return item.id || index; + } + + /** + * @param composeMenuType + */ + __onClickCompose(composeMenuType: ComposeMenuType): void { + let selectType: any; + + switch (composeMenuType) { + case ComposeMenuType.signOut: + // selectType = SignInComposeComponent; + return; + break; + case ComposeMenuType.deposit: + selectType = DepositComposeComponent; + break; + case ComposeMenuType.withdraw: + selectType = WithdrawComposeComponent; + break; + case ComposeMenuType.notice: + selectType = NoticeComposeComponent; + break; + case ComposeMenuType.comp: + selectType = CompComposeComponent; + break; + case ComposeMenuType.customer: + selectType = CustomerComposeComponent; + break; + case ComposeMenuType.depositHistory: + selectType = DepositHistoryComposeComponent; + break; + case ComposeMenuType.withdrawHistory: + selectType = WithdrawHistoryComposeComponent; + break; + } + + const dialogRef = this._matDialog.open(selectType); + + dialogRef.afterClosed().subscribe((result) => { + console.log('Compose dialog was closed!'); + }); + } +} diff --git a/src/app/modules/game/main/main.module.ts b/src/app/modules/game/main/main.module.ts new file mode 100644 index 0000000..65fc68a --- /dev/null +++ b/src/app/modules/game/main/main.module.ts @@ -0,0 +1,44 @@ +import { NgModule } from '@angular/core'; +import { Route, RouterModule } from '@angular/router'; +import { MatButtonModule } from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatTabsModule } from '@angular/material/tabs'; +import { MatInputModule } from '@angular/material/input'; +import { MatDialogModule } from '@angular/material/dialog'; +import { MatSelectModule } from '@angular/material/select'; + +import { FuseCardModule } from '@fuse/components/card'; +import { SharedModule } from 'app/shared/shared.module'; + +import { GameMainComponent } from 'app/modules/game/main/main.component'; + +import { FuseAlertModule } from '@fuse/components/alert'; + +import { COMPOSE } from './compose'; + +const mainRoutes: Route[] = [ + { + path: '', + component: GameMainComponent, + }, +]; + +@NgModule({ + declarations: [GameMainComponent, COMPOSE], + imports: [ + RouterModule.forChild(mainRoutes), + MatButtonModule, + MatIconModule, + MatFormFieldModule, + MatTabsModule, + MatInputModule, + MatDialogModule, + MatSelectModule, + FuseCardModule, + SharedModule, + + FuseAlertModule, + ], +}) +export class GameMainModule {}