game main추가

This commit is contained in:
Park Byung Eun 2022-08-21 01:22:27 +00:00
parent 9d17726f92
commit 593b67d4e1
24 changed files with 2845 additions and 19 deletions

View File

@ -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
),
},
],
},
];

View File

@ -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);

View File

@ -0,0 +1,123 @@
<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">Comp</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"
>
<!-- To -->
<mat-form-field>
<mat-label>To</mat-label>
<input matInput [formControlName]="'to'" />
<div class="copy-fields-toggles" matSuffix>
<span
class="text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.cc"
(click)="showCopyField('cc')"
>
Cc
</span>
<span
class="ml-2 text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.bcc"
(click)="showCopyField('bcc')"
>
Bcc
</span>
</div>
</mat-form-field>
<!-- Cc -->
<mat-form-field *ngIf="copyFields.cc">
<mat-label>Cc</mat-label>
<input matInput [formControlName]="'cc'" />
</mat-form-field>
<!-- Bcc -->
<mat-form-field *ngIf="copyFields.bcc">
<mat-label>Bcc</mat-label>
<input matInput [formControlName]="'bcc'" />
</mat-form-field>
<!-- Subject -->
<mat-form-field>
<mat-label>Subject</mat-label>
<input matInput [formControlName]="'subject'" />
</mat-form-field>
<!-- Body -->
<!-- <quill-editor
class="mt-2"
[formControlName]="'body'"
[modules]="quillModules"
></quill-editor> -->
<!-- Actions -->
<div
class="flex flex-col sm:flex-row sm:items-center justify-between mt-4 sm:mt-6"
>
<div class="-ml-2">
<!-- Attach file -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:paper-clip'"
></mat-icon>
</button>
<!-- Insert link -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:link'"
></mat-icon>
</button>
<!-- Insert emoji -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:emoji-happy'"
></mat-icon>
</button>
<!-- Insert image -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:photograph'"
></mat-icon>
</button>
</div>
<div class="flex items-center mt-4 sm:mt-0">
<!-- Discard -->
<button class="ml-auto sm:ml-0" mat-stroked-button (click)="discard()">
Discard
</button>
<!-- Save as draft -->
<button class="sm:mx-3" mat-stroked-button (click)="saveAsDraft()">
<span>Save as draft</span>
</button>
<!-- Send -->
<button
class="order-first sm:order-last"
mat-flat-button
[color]="'primary'"
(click)="send()"
>
Send
</button>
</div>
</div>
</form>
</div>

View File

@ -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<CompComposeComponent>,
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 {}
}

View File

@ -0,0 +1,123 @@
<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">customer</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"
>
<!-- To -->
<mat-form-field>
<mat-label>To</mat-label>
<input matInput [formControlName]="'to'" />
<div class="copy-fields-toggles" matSuffix>
<span
class="text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.cc"
(click)="showCopyField('cc')"
>
Cc
</span>
<span
class="ml-2 text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.bcc"
(click)="showCopyField('bcc')"
>
Bcc
</span>
</div>
</mat-form-field>
<!-- Cc -->
<mat-form-field *ngIf="copyFields.cc">
<mat-label>Cc</mat-label>
<input matInput [formControlName]="'cc'" />
</mat-form-field>
<!-- Bcc -->
<mat-form-field *ngIf="copyFields.bcc">
<mat-label>Bcc</mat-label>
<input matInput [formControlName]="'bcc'" />
</mat-form-field>
<!-- Subject -->
<mat-form-field>
<mat-label>Subject</mat-label>
<input matInput [formControlName]="'subject'" />
</mat-form-field>
<!-- Body -->
<!-- <quill-editor
class="mt-2"
[formControlName]="'body'"
[modules]="quillModules"
></quill-editor> -->
<!-- Actions -->
<div
class="flex flex-col sm:flex-row sm:items-center justify-between mt-4 sm:mt-6"
>
<div class="-ml-2">
<!-- Attach file -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:paper-clip'"
></mat-icon>
</button>
<!-- Insert link -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:link'"
></mat-icon>
</button>
<!-- Insert emoji -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:emoji-happy'"
></mat-icon>
</button>
<!-- Insert image -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:photograph'"
></mat-icon>
</button>
</div>
<div class="flex items-center mt-4 sm:mt-0">
<!-- Discard -->
<button class="ml-auto sm:ml-0" mat-stroked-button (click)="discard()">
Discard
</button>
<!-- Save as draft -->
<button class="sm:mx-3" mat-stroked-button (click)="saveAsDraft()">
<span>Save as draft</span>
</button>
<!-- Send -->
<button
class="order-first sm:order-last"
mat-flat-button
[color]="'primary'"
(click)="send()"
>
Send
</button>
</div>
</div>
</form>
</div>

View File

@ -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<CustomerComposeComponent>,
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 {}
}

View File

@ -0,0 +1,123 @@
<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">deposit</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"
>
<!-- To -->
<mat-form-field>
<mat-label>To</mat-label>
<input matInput [formControlName]="'to'" />
<div class="copy-fields-toggles" matSuffix>
<span
class="text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.cc"
(click)="showCopyField('cc')"
>
Cc
</span>
<span
class="ml-2 text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.bcc"
(click)="showCopyField('bcc')"
>
Bcc
</span>
</div>
</mat-form-field>
<!-- Cc -->
<mat-form-field *ngIf="copyFields.cc">
<mat-label>Cc</mat-label>
<input matInput [formControlName]="'cc'" />
</mat-form-field>
<!-- Bcc -->
<mat-form-field *ngIf="copyFields.bcc">
<mat-label>Bcc</mat-label>
<input matInput [formControlName]="'bcc'" />
</mat-form-field>
<!-- Subject -->
<mat-form-field>
<mat-label>Subject</mat-label>
<input matInput [formControlName]="'subject'" />
</mat-form-field>
<!-- Body -->
<!-- <quill-editor
class="mt-2"
[formControlName]="'body'"
[modules]="quillModules"
></quill-editor> -->
<!-- Actions -->
<div
class="flex flex-col sm:flex-row sm:items-center justify-between mt-4 sm:mt-6"
>
<div class="-ml-2">
<!-- Attach file -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:paper-clip'"
></mat-icon>
</button>
<!-- Insert link -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:link'"
></mat-icon>
</button>
<!-- Insert emoji -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:emoji-happy'"
></mat-icon>
</button>
<!-- Insert image -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:photograph'"
></mat-icon>
</button>
</div>
<div class="flex items-center mt-4 sm:mt-0">
<!-- Discard -->
<button class="ml-auto sm:ml-0" mat-stroked-button (click)="discard()">
Discard
</button>
<!-- Save as draft -->
<button class="sm:mx-3" mat-stroked-button (click)="saveAsDraft()">
<span>Save as draft</span>
</button>
<!-- Send -->
<button
class="order-first sm:order-last"
mat-flat-button
[color]="'primary'"
(click)="send()"
>
Send
</button>
</div>
</div>
</form>
</div>

View File

@ -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<DepositComposeComponent>,
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 {}
}

View File

@ -0,0 +1,123 @@
<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">Deposit History</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"
>
<!-- To -->
<mat-form-field>
<mat-label>To</mat-label>
<input matInput [formControlName]="'to'" />
<div class="copy-fields-toggles" matSuffix>
<span
class="text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.cc"
(click)="showCopyField('cc')"
>
Cc
</span>
<span
class="ml-2 text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.bcc"
(click)="showCopyField('bcc')"
>
Bcc
</span>
</div>
</mat-form-field>
<!-- Cc -->
<mat-form-field *ngIf="copyFields.cc">
<mat-label>Cc</mat-label>
<input matInput [formControlName]="'cc'" />
</mat-form-field>
<!-- Bcc -->
<mat-form-field *ngIf="copyFields.bcc">
<mat-label>Bcc</mat-label>
<input matInput [formControlName]="'bcc'" />
</mat-form-field>
<!-- Subject -->
<mat-form-field>
<mat-label>Subject</mat-label>
<input matInput [formControlName]="'subject'" />
</mat-form-field>
<!-- Body -->
<!-- <quill-editor
class="mt-2"
[formControlName]="'body'"
[modules]="quillModules"
></quill-editor> -->
<!-- Actions -->
<div
class="flex flex-col sm:flex-row sm:items-center justify-between mt-4 sm:mt-6"
>
<div class="-ml-2">
<!-- Attach file -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:paper-clip'"
></mat-icon>
</button>
<!-- Insert link -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:link'"
></mat-icon>
</button>
<!-- Insert emoji -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:emoji-happy'"
></mat-icon>
</button>
<!-- Insert image -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:photograph'"
></mat-icon>
</button>
</div>
<div class="flex items-center mt-4 sm:mt-0">
<!-- Discard -->
<button class="ml-auto sm:ml-0" mat-stroked-button (click)="discard()">
Discard
</button>
<!-- Save as draft -->
<button class="sm:mx-3" mat-stroked-button (click)="saveAsDraft()">
<span>Save as draft</span>
</button>
<!-- Send -->
<button
class="order-first sm:order-last"
mat-flat-button
[color]="'primary'"
(click)="send()"
>
Send
</button>
</div>
</div>
</form>
</div>

View File

@ -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<DepositHistoryComposeComponent>,
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 {}
}

View File

@ -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,
];

View File

@ -0,0 +1,123 @@
<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">Notice</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"
>
<!-- To -->
<mat-form-field>
<mat-label>To</mat-label>
<input matInput [formControlName]="'to'" />
<div class="copy-fields-toggles" matSuffix>
<span
class="text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.cc"
(click)="showCopyField('cc')"
>
Cc
</span>
<span
class="ml-2 text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.bcc"
(click)="showCopyField('bcc')"
>
Bcc
</span>
</div>
</mat-form-field>
<!-- Cc -->
<mat-form-field *ngIf="copyFields.cc">
<mat-label>Cc</mat-label>
<input matInput [formControlName]="'cc'" />
</mat-form-field>
<!-- Bcc -->
<mat-form-field *ngIf="copyFields.bcc">
<mat-label>Bcc</mat-label>
<input matInput [formControlName]="'bcc'" />
</mat-form-field>
<!-- Subject -->
<mat-form-field>
<mat-label>Subject</mat-label>
<input matInput [formControlName]="'subject'" />
</mat-form-field>
<!-- Body -->
<!-- <quill-editor
class="mt-2"
[formControlName]="'body'"
[modules]="quillModules"
></quill-editor> -->
<!-- Actions -->
<div
class="flex flex-col sm:flex-row sm:items-center justify-between mt-4 sm:mt-6"
>
<div class="-ml-2">
<!-- Attach file -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:paper-clip'"
></mat-icon>
</button>
<!-- Insert link -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:link'"
></mat-icon>
</button>
<!-- Insert emoji -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:emoji-happy'"
></mat-icon>
</button>
<!-- Insert image -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:photograph'"
></mat-icon>
</button>
</div>
<div class="flex items-center mt-4 sm:mt-0">
<!-- Discard -->
<button class="ml-auto sm:ml-0" mat-stroked-button (click)="discard()">
Discard
</button>
<!-- Save as draft -->
<button class="sm:mx-3" mat-stroked-button (click)="saveAsDraft()">
<span>Save as draft</span>
</button>
<!-- Send -->
<button
class="order-first sm:order-last"
mat-flat-button
[color]="'primary'"
(click)="send()"
>
Send
</button>
</div>
</div>
</form>
</div>

View File

@ -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<NoticeComposeComponent>,
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 {}
}

View File

@ -0,0 +1,65 @@
<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>
<fuse-alert
class="mt-8 -mb-4"
*ngIf="showAlert"
[appearance]="'outline'"
[showIcon]="false"
[type]="alert.type"
[@shake]="alert.type === 'error'"
>
{{ alert.message }}
</fuse-alert>
<!-- Compose form -->
<form
class="flex flex-col flex-auto p-6 sm:p-8 overflow-y-auto"
[formGroup]="signInComposeForm"
>
<!-- 아이디 -->
<mat-form-field>
<mat-label>아이디</mat-label>
<input matInput [formControlName]="'username'" />
<div class="copy-fields-toggles" matSuffix></div>
</mat-form-field>
<!-- 비밀번호 -->
<mat-form-field>
<mat-label>비밀번호</mat-label>
<input matInput [formControlName]="'password'" />
</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>

View File

@ -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<SignInComposeComponent>,
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
});
}
}

View File

@ -0,0 +1,280 @@
<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>
<fuse-alert
class="mt-8 -mb-4"
*ngIf="showAlert"
[appearance]="'outline'"
[showIcon]="false"
[type]="alert.type"
[@shake]="alert.type === 'error'"
>
{{ alert.message }}
</fuse-alert>
<div class="flex-auto p-6 sm:p-10">
<div class="max-w-3xl">
<div class="flex flex-col p-8 pt-0">
<!-- Compose form -->
<form
class="flex flex-col items-start overflow-y-auto"
[formGroup]="signupComposeForm"
>
<!-- 아이디 -->
<mat-form-field class="w-full mt-6">
<mat-label>추천인 코드</mat-label>
<input
matInput
[formControlName]="'referalCode'"
(focusout)="__checkReferrerCode($event)"
/>
<mat-error
*ngIf="
signupComposeForm?.get('referalCode')?.hasError('required')
"
>
추천인 코드는 필수 입력입니다.
</mat-error>
<mat-error
*ngIf="
signupComposeForm
?.get('referalCode')
?.hasError('notExistReferalCode')
"
>
추천인 코드는 필수 입력입니다.
</mat-error>
</mat-form-field>
<!-- Divider -->
<div class="w-full mt-8 mb-7 border-b"></div>
<div class="flex flex-col w-full">
<div class="flex items-center w-full mt-6">
<!-- Icon name -->
<mat-form-field class="w-1/2 pr-2">
<mat-label>아이디</mat-label>
<input
matInput
[formControlName]="'username'"
(focusout)="__checkUsernameDuplicate($event)"
/>
<mat-error
*ngIf="
signupComposeForm?.get('username')?.hasError('required')
"
>
아이디는 필수 입력입니다.
</mat-error>
<mat-error
*ngIf="
signupComposeForm
?.get('username')
?.hasError('usernameDuplicate')
"
>
아이디가 중복됩니다.
</mat-error>
</mat-form-field>
<!-- Icon color -->
<!-- 닉네임 -->
<mat-form-field class="w-1/2 pl-2">
<mat-label>닉네임</mat-label>
<input
matInput
[formControlName]="'nickname'"
(focusout)="__checkNickname($event)"
/>
<mat-error
*ngIf="
signupComposeForm?.get('nickname')?.hasError('required')
"
>
닉네임은 필수 입력입니다.
</mat-error>
<mat-error
*ngIf="
signupComposeForm
?.get('nickname')
?.hasError('nicknameDuplicate')
"
>
닉네임이 중복됩니다.
</mat-error>
</mat-form-field>
</div>
</div>
<div class="flex flex-col w-full">
<div class="flex items-center w-full mt-6">
<!-- 비밀번호 -->
<mat-form-field class="w-1/2 pr-2">
<mat-label>비밀번호</mat-label>
<input matInput [formControlName]="'password'" />
<mat-error
*ngIf="
signupComposeForm?.get('password')?.hasError('required')
"
>
비밀번호는 필수 입력입니다.
</mat-error>
</mat-form-field>
<!-- 비밀번호 확인 -->
<mat-form-field class="w-1/2 pl-2">
<mat-label>비밀번호 확인</mat-label>
<input matInput [formControlName]="'passwordConfirm'" />
<mat-error
*ngIf="
signupComposeForm
?.get('passwordConfirm')
?.hasError('required')
"
>
비밀번호 확인은 필수 입력입니다.
</mat-error>
<mat-error
*ngIf="
signupComposeForm
?.get('passwordConfirm')
?.hasError('passwordNotMatch')
"
>
비밀번호가 동일하지 않습니다.
</mat-error>
</mat-form-field>
</div>
</div>
<div class="flex flex-col w-full">
<div class="flex items-center w-full mt-6">
<!-- 출금비밀번호 -->
<mat-form-field class="w-1/2 pr-2">
<mat-label>출금비밀번호</mat-label>
<input matInput [formControlName]="'exchangePassword'" />
<mat-error
*ngIf="
signupComposeForm
?.get('exchangePassword')
?.hasError('required')
"
>
출금 비밀번호는 필수 입력입니다.
</mat-error>
</mat-form-field>
<!-- 전화번호 -->
<mat-form-field class="w-1/2 pl-2">
<mat-label>전화번호</mat-label>
<input matInput [formControlName]="'mobilePhoneNumber'" />
<mat-error
*ngIf="
signupComposeForm
?.get('mobilePhoneNumber')
?.hasError('required')
"
>
전화번호는 필수 입력입니다.
</mat-error>
</mat-form-field>
</div>
</div>
<div class="flex flex-col w-full">
<div class="flex items-center w-full mt-6">
<!-- 은행명 -->
<mat-form-field class="w-1/2 pr-2">
<mat-label>은행명</mat-label>
<mat-select
[formControlName]="'bankId'"
placeholder="은행 선택"
>
<mat-option *ngFor="let bank of banks" [value]="bank.getId()">
{{ bank.getName() }}
</mat-option>
<!-- <mat-option [value]="'0'"> 국민은행 </mat-option> -->
</mat-select>
<mat-error
*ngIf="signupComposeForm?.get('bankId')?.hasError('required')"
>
은행명은 필수 입력입니다.
</mat-error>
</mat-form-field>
<!-- 계좌번호 -->
<mat-form-field class="w-1/2 pl-2">
<mat-label>계좌번호</mat-label>
<input matInput [formControlName]="'accountNumber'" />
<mat-error
*ngIf="
signupComposeForm
?.get('accountNumber')
?.hasError('required')
"
>
계좌번호는 필수 입력입니다.
</mat-error>
</mat-form-field>
</div>
</div>
<div class="flex flex-col w-full">
<div class="flex items-center w-full mt-6">
<!-- 예금주 -->
<mat-form-field class="w-1/2 pr-2">
<mat-label>예금주</mat-label>
<input matInput [formControlName]="'accountHolder'" />
<mat-error
*ngIf="
signupComposeForm
?.get('accountHolder')
?.hasError('required')
"
>
예금주는 필수 입력입니다.
</mat-error>
</mat-form-field>
</div>
</div>
<!-- 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()"
[disabled]="isSendDisable"
>
회원가입
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>

View File

@ -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<SignUpComposeComponent>,
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;
};
}
}

View File

@ -0,0 +1,123 @@
<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">Withdraw</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"
>
<!-- To -->
<mat-form-field>
<mat-label>To</mat-label>
<input matInput [formControlName]="'to'" />
<div class="copy-fields-toggles" matSuffix>
<span
class="text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.cc"
(click)="showCopyField('cc')"
>
Cc
</span>
<span
class="ml-2 text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.bcc"
(click)="showCopyField('bcc')"
>
Bcc
</span>
</div>
</mat-form-field>
<!-- Cc -->
<mat-form-field *ngIf="copyFields.cc">
<mat-label>Cc</mat-label>
<input matInput [formControlName]="'cc'" />
</mat-form-field>
<!-- Bcc -->
<mat-form-field *ngIf="copyFields.bcc">
<mat-label>Bcc</mat-label>
<input matInput [formControlName]="'bcc'" />
</mat-form-field>
<!-- Subject -->
<mat-form-field>
<mat-label>Subject</mat-label>
<input matInput [formControlName]="'subject'" />
</mat-form-field>
<!-- Body -->
<!-- <quill-editor
class="mt-2"
[formControlName]="'body'"
[modules]="quillModules"
></quill-editor> -->
<!-- Actions -->
<div
class="flex flex-col sm:flex-row sm:items-center justify-between mt-4 sm:mt-6"
>
<div class="-ml-2">
<!-- Attach file -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:paper-clip'"
></mat-icon>
</button>
<!-- Insert link -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:link'"
></mat-icon>
</button>
<!-- Insert emoji -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:emoji-happy'"
></mat-icon>
</button>
<!-- Insert image -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:photograph'"
></mat-icon>
</button>
</div>
<div class="flex items-center mt-4 sm:mt-0">
<!-- Discard -->
<button class="ml-auto sm:ml-0" mat-stroked-button (click)="discard()">
Discard
</button>
<!-- Save as draft -->
<button class="sm:mx-3" mat-stroked-button (click)="saveAsDraft()">
<span>Save as draft</span>
</button>
<!-- Send -->
<button
class="order-first sm:order-last"
mat-flat-button
[color]="'primary'"
(click)="send()"
>
Send
</button>
</div>
</div>
</form>
</div>

View File

@ -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<WithdrawComposeComponent>,
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 {}
}

View File

@ -0,0 +1,123 @@
<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">Withdraw History</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"
>
<!-- To -->
<mat-form-field>
<mat-label>To</mat-label>
<input matInput [formControlName]="'to'" />
<div class="copy-fields-toggles" matSuffix>
<span
class="text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.cc"
(click)="showCopyField('cc')"
>
Cc
</span>
<span
class="ml-2 text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.bcc"
(click)="showCopyField('bcc')"
>
Bcc
</span>
</div>
</mat-form-field>
<!-- Cc -->
<mat-form-field *ngIf="copyFields.cc">
<mat-label>Cc</mat-label>
<input matInput [formControlName]="'cc'" />
</mat-form-field>
<!-- Bcc -->
<mat-form-field *ngIf="copyFields.bcc">
<mat-label>Bcc</mat-label>
<input matInput [formControlName]="'bcc'" />
</mat-form-field>
<!-- Subject -->
<mat-form-field>
<mat-label>Subject</mat-label>
<input matInput [formControlName]="'subject'" />
</mat-form-field>
<!-- Body -->
<!-- <quill-editor
class="mt-2"
[formControlName]="'body'"
[modules]="quillModules"
></quill-editor> -->
<!-- Actions -->
<div
class="flex flex-col sm:flex-row sm:items-center justify-between mt-4 sm:mt-6"
>
<div class="-ml-2">
<!-- Attach file -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:paper-clip'"
></mat-icon>
</button>
<!-- Insert link -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:link'"
></mat-icon>
</button>
<!-- Insert emoji -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:emoji-happy'"
></mat-icon>
</button>
<!-- Insert image -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:photograph'"
></mat-icon>
</button>
</div>
<div class="flex items-center mt-4 sm:mt-0">
<!-- Discard -->
<button class="ml-auto sm:ml-0" mat-stroked-button (click)="discard()">
Discard
</button>
<!-- Save as draft -->
<button class="sm:mx-3" mat-stroked-button (click)="saveAsDraft()">
<span>Save as draft</span>
</button>
<!-- Send -->
<button
class="order-first sm:order-last"
mat-flat-button
[color]="'primary'"
(click)="send()"
>
Send
</button>
</div>
</div>
</form>
</div>

View File

@ -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<WithdrawHistoryComposeComponent>,
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 {}
}

View File

@ -0,0 +1,327 @@
<div class="flex flex-col flex-auto min-w-0">
<!-- Main -->
<div class="wrapper">
<div>
<img class="banner-bg" src="assets/images/beteran/banner-bg.jpg" />
</div>
<!-- Header -->
<!-- Header -->
<div
class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-8 px-6 md:px-8 border-b"
>
<!-- Title -->
<div class="text-4xl font-extrabold tracking-tight">
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__onClickCompose(composeMenuType.deposit)"
>
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
<span class="ml-2 mr-1">입금신청</span>
</button>
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__onClickCompose(composeMenuType.withdraw)"
>
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
<span class="ml-2 mr-1">출금신청</span>
</button>
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__onClickCompose(composeMenuType.notice)"
>
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
<span class="ml-2 mr-1">공지사항</span>
</button>
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__onClickCompose(composeMenuType.comp)"
>
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
<span class="ml-2 mr-1">콤프</span>
</button>
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__onClickCompose(composeMenuType.customer)"
>
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
<span class="ml-2 mr-1">고객센터</span>
</button>
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__onClickCompose(composeMenuType.depositHistory)"
>
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
<span class="ml-2 mr-1">입금내역</span>
</button>
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__onClickCompose(composeMenuType.withdrawHistory)"
>
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
<span class="ml-2 mr-1">출금내역</span>
</button>
</div>
<!-- Actions -->
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
<!-- Search -->
<button
class="ml-4"
mat-flat-button
[color]="'primary'"
(click)="__onClickCompose(composeMenuType.signOut)"
>
<mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon>
<span class="ml-2 mr-1">로그아웃</span>
</button>
</div>
</div>
<div>
<mat-tab-group class="sm:px-2" [animationDuration]="'0'">
<!-- Home -->
<mat-tab label="라이브카지노">
<ng-template matTabContent>
<!-- Cards -->
<div class="flex justify-center mt-10 sm:mt-20">
<div class="w-full max-w-sm md:max-w-7xl">
<div
class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-4 gap-16 mt-8"
>
<ng-container *ngFor="let component of components">
<a
class="flex flex-col rounded-2xl shadow overflow-hidden bg-card hover:shadow-xl transition-shadow duration-200 ease-in-out"
[href]="
'https://material.angular.io/components/' + component.id
"
target="_blank"
rel="noreferrer"
>
<img
class="w-full object-cover border-b"
[src]="'assets/images/beteran/' + component.id + '.jpg'"
/>
<div class="py-4 px-5">
<div class="text-xl font-semibold">
{{ component.name }}
</div>
<div class="mt-1 text-secondary">
{{ component.summary }}
</div>
</div>
</a>
</ng-container>
</div>
</div>
</div>
</ng-template>
</mat-tab>
<!-- Budget -->
<mat-tab label="호텔카지노">
<ng-template matTabContent>
<!-- Cards -->
<div class="flex justify-center mt-10 sm:mt-20">
<div class="w-full max-w-sm md:max-w-7xl">
<div
class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-4 gap-16 mt-8"
>
<ng-container *ngFor="let component of components">
<a
class="flex flex-col rounded-2xl shadow overflow-hidden bg-card hover:shadow-xl transition-shadow duration-200 ease-in-out"
[href]="
'https://material.angular.io/components/' + component.id
"
target="_blank"
rel="noreferrer"
>
<img
class="w-full object-cover border-b"
[src]="'assets/images/beteran/' + component.id + '.jpg'"
/>
<div class="py-4 px-5">
<div class="text-xl font-semibold">
{{ component.name }}
</div>
<div class="mt-1 text-secondary">
{{ component.summary }}
</div>
</div>
</a>
</ng-container>
</div>
</div>
</div>
</ng-template>
</mat-tab>
<!-- Team -->
<mat-tab label="슬롯게임">
<ng-template matTabContent>
<!-- Cards -->
<div class="flex justify-center mt-10 sm:mt-20">
<div class="w-full max-w-sm md:max-w-7xl">
<div
class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-4 gap-16 mt-8"
>
<ng-container *ngFor="let component of components">
<a
class="flex flex-col rounded-2xl shadow overflow-hidden bg-card hover:shadow-xl transition-shadow duration-200 ease-in-out"
[href]="
'https://material.angular.io/components/' + component.id
"
target="_blank"
rel="noreferrer"
>
<img
class="w-full object-cover border-b"
[src]="'assets/images/beteran/' + component.id + '.jpg'"
/>
<div class="py-4 px-5">
<div class="text-xl font-semibold">
{{ component.name }}
</div>
<div class="mt-1 text-secondary">
{{ component.summary }}
</div>
</div>
</a>
</ng-container>
</div>
</div>
</div>
</ng-template>
</mat-tab>
</mat-tab-group>
</div>
<div
class="flex flex-col items-center px-6 py-10 sm:px-16 sm:pt-18 sm:pb-20 bg-white dark:bg-gray-800 sm:mt-20"
>
<div class="w-full max-w-7xl">
<!-- Features grid -->
<div
class="grid grid-cols-1 gap-x-6 gap-y-12 sm:grid-cols-2 lg:grid-cols-3 lg:gap-16 w-full mt-12 sm:mt-16"
>
<div>
<span
class="flex items-center justify-center w-12 h-12 rounded bg-primary"
>
<!-- <mat-icon
class="text-white"
[svgIcon]="'heroicons_outline:pencil-alt'"
></mat-icon> -->
<img class="icon" src="assets/images/beteran/deposit-icon.png" />
</span>
<div class="mt-4 text-xl font-medium">실시간출금</div>
<div class="mt-2 leading-6 text-secondary">
Create and edit projects, upload images via drag drop, add
categories, add custom fields, create interactive forms and more.
</div>
</div>
<div>
<span
class="flex items-center justify-center w-12 h-12 rounded bg-primary"
>
<!-- <mat-icon
class="text-white"
[svgIcon]="'heroicons_outline:filter'"
></mat-icon> -->
<img class="icon" src="assets/images/beteran/withdraw-icon.png" />
</span>
<div class="mt-4 text-xl font-medium">실시간입금</div>
<div class="mt-2 leading-6 text-secondary">
Search and filter within the projects, categories and custom
fields. Save search and filter details for easy access.
</div>
</div>
<div>
<span
class="flex items-center justify-center w-12 h-12 rounded bg-primary"
>
<!-- <mat-icon
class="text-white"
[svgIcon]="'heroicons_outline:refresh'"
></mat-icon> -->
<img class="icon" src="assets/images/beteran/notice-icon.png" />
</span>
<div class="mt-4 text-xl font-medium">공지사항</div>
<div class="mt-2 leading-6 text-secondary">
<!-- Schedule -->
<div
class="sm:col-span-2 md:col-span-2 lg:col-span-2 flex flex-col flex-auto p-6 bg-card shadow rounded-2xl overflow-hidden"
>
<div class="flex flex-col mt-1 divide-y">
<ng-container
*ngFor="
let scheduleItem of data.schedule['today'];
trackBy: trackByFn
"
>
<div
class="flex flex-row items-center justify-between py-4 px-0.5"
>
<div class="flex flex-col">
<div class="font-medium">{{ scheduleItem.title }}</div>
<div
class="flex flex-col sm:flex-row sm:items-center -ml-0.5 mt-2 sm:mt-1 space-y-1 sm:space-y-0 sm:space-x-3"
>
<ng-container *ngIf="scheduleItem.time">
<div class="flex items-center">
<mat-icon
class="icon-size-5 text-hint"
[svgIcon]="'heroicons_solid:clock'"
></mat-icon>
<div class="ml-1.5 text-md text-secondary">
{{ scheduleItem.time }}
</div>
</div>
</ng-container>
<!-- <ng-container *ngIf="scheduleItem.location">
<div class="flex items-center">
<mat-icon
class="icon-size-5 text-hint"
[svgIcon]="'heroicons_solid:location-marker'"
></mat-icon>
<div class="ml-1.5 text-md text-secondary">
{{ scheduleItem.location }}
</div>
</div>
</ng-container> -->
</div>
</div>
<button mat-icon-button>
<mat-icon
[svgIcon]="'heroicons_solid:chevron-right'"
></mat-icon>
</button>
</div>
</ng-container>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sn-overlay"></div>
<button class="scroll-top w-ba" style="display: none">
<i class="fas fa-caret-up" aria-hidden="true"></i>
</button>
</div>
</div>

View File

@ -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!');
});
}
}

View File

@ -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 {}