From b3b4662b21d691fc73ad9b23312f64ee945127d6 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 19 Aug 2022 08:44:43 +0000 Subject: [PATCH] =?UTF-8?q?=EC=9E=A5=EA=B8=B0=EB=AF=B8=EC=A0=91=EC=86=8D?= =?UTF-8?q?=ED=9A=8C=EC=9B=90-=EC=AA=BD=EC=A7=80=EB=B3=B4=EB=82=B4?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/list.component.html | 1 + .../unconnected/components/list.component.ts | 14 ++- .../admin/member/unconnected/compose/index.ts | 3 + .../compose/message-compose.component.html | 89 ++++++++++++++++++ .../compose/message-compose.component.ts | 94 +++++++++++++++++++ .../member/unconnected/unconnected.module.ts | 3 +- 6 files changed, 202 insertions(+), 2 deletions(-) create mode 100644 src/app/modules/admin/member/unconnected/compose/index.ts create mode 100644 src/app/modules/admin/member/unconnected/compose/message-compose.component.html create mode 100644 src/app/modules/admin/member/unconnected/compose/message-compose.component.ts diff --git a/src/app/modules/admin/member/unconnected/components/list.component.html b/src/app/modules/admin/member/unconnected/components/list.component.html index a808524..f61fb9f 100644 --- a/src/app/modules/admin/member/unconnected/components/list.component.html +++ b/src/app/modules/admin/member/unconnected/components/list.component.html @@ -252,6 +252,7 @@ mat-flat-button class="bet-mat-small-8" [color]="'primary'" + (click)="__onClickMessage($event)" > diff --git a/src/app/modules/admin/member/unconnected/components/list.component.ts b/src/app/modules/admin/member/unconnected/components/list.component.ts index 5a4d6ba..a0e9730 100644 --- a/src/app/modules/admin/member/unconnected/components/list.component.ts +++ b/src/app/modules/admin/member/unconnected/components/list.component.ts @@ -33,6 +33,8 @@ import { Unconnected } from '../models/unconnected'; import { UnconnectedPagination } from '../models/unconnected-pagination'; import { UnconnectedService } from '../services/unconnected.service'; import { Router } from '@angular/router'; +import { MatDialog } from '@angular/material/dialog'; +import { MessageComposeComponent } from '../compose/message-compose.component'; @Component({ selector: 'unconnected-list', @@ -87,7 +89,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { private _fuseConfirmationService: FuseConfirmationService, private _formBuilder: FormBuilder, private _unconnectedService: UnconnectedService, - private router: Router + private router: Router, + private _matDialog: MatDialog ) {} // ----------------------------------------------------------------------------------------------------- @@ -206,4 +209,13 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { __trackByFn(index: number, item: any): any { return item.id || index; } + __onClickMessage(event: MouseEvent): void { + const dialogRef = this._matDialog.open(MessageComposeComponent, { + data: { price: '', memo: '' }, + }); + + dialogRef.afterClosed().subscribe((result) => { + console.log('Compose dialog was closed!'); + }); + } } diff --git a/src/app/modules/admin/member/unconnected/compose/index.ts b/src/app/modules/admin/member/unconnected/compose/index.ts new file mode 100644 index 0000000..409003d --- /dev/null +++ b/src/app/modules/admin/member/unconnected/compose/index.ts @@ -0,0 +1,3 @@ +import { MessageComposeComponent } from './message-compose.component'; + +export const COMPOSE = [MessageComposeComponent]; diff --git a/src/app/modules/admin/member/unconnected/compose/message-compose.component.html b/src/app/modules/admin/member/unconnected/compose/message-compose.component.html new file mode 100644 index 0000000..1d55301 --- /dev/null +++ b/src/app/modules/admin/member/unconnected/compose/message-compose.component.html @@ -0,0 +1,89 @@ +
+ +
+
쪽지보내기
+ +
+ + +
+
+ + 제목 + + +
+
+ + 글쓴이 + + +
+
+ + 받는이 + + +
+ + + 내용 + + + + 선택 + --선택--5008\n**입금계좌문의시(가상계좌1)****출금비밀번호문의시**----탈퇴,졸업관련----**졸업안내----입금관련문의---->>타인명의입금시----환전관련문의----**환전지연안내(환전량 + 증가)**은행점검(뱅킹장애)등으로 충환전지연안내서버점검안내서버점검완료안내 + + + +
+
+ + + + +
+
+
+
diff --git a/src/app/modules/admin/member/unconnected/compose/message-compose.component.ts b/src/app/modules/admin/member/unconnected/compose/message-compose.component.ts new file mode 100644 index 0000000..6a4639e --- /dev/null +++ b/src/app/modules/admin/member/unconnected/compose/message-compose.component.ts @@ -0,0 +1,94 @@ +import { + ChangeDetectorRef, + Component, + Inject, + OnInit, + ViewEncapsulation, +} from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { SiteService } from 'app/modules/polyglot/site/services/site.service'; +import { IdentityService } from 'app/modules/polyglot/identity/services/identity.service'; +import { Site } from 'app/modules/proto/models/site_pb'; + +export interface MessageComposeData { + price: string; + memo: string; +} +export interface MessageComposeResult { + price: string; + memo: string; +} + +@Component({ + selector: 'app-message-compose', + templateUrl: './message-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class MessageComposeComponent implements OnInit { + composeForm!: FormGroup; + sites: any[] = []; + // quillModules: any = { + // toolbar: [ + // ['bold', 'italic', 'underline'], + // [{ align: [] }, { list: 'ordered' }, { list: 'bullet' }], + // ['clean'], + // ], + // }; + + /** + * Constructor + */ + constructor( + public matDialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: MessageComposeData, + private _formBuilder: FormBuilder, + private _identityService: IdentityService, + private _changeDetectorRef: ChangeDetectorRef + ) {} + + // ----------------------------------------------------------------------------------------------------- + // @ Lifecycle hooks + // ----------------------------------------------------------------------------------------------------- + + /** + * On init + */ + ngOnInit(): void { + // Create the form + this.composeForm = this._formBuilder.group({ + price: ['', [Validators.required]], + memo: ['', [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 {} +} diff --git a/src/app/modules/admin/member/unconnected/unconnected.module.ts b/src/app/modules/admin/member/unconnected/unconnected.module.ts index c5d187a..dd74106 100644 --- a/src/app/modules/admin/member/unconnected/unconnected.module.ts +++ b/src/app/modules/admin/member/unconnected/unconnected.module.ts @@ -19,11 +19,12 @@ import { TranslocoModule } from '@ngneat/transloco'; import { SharedModule } from 'app/shared/shared.module'; import { COMPONENTS } from './components'; +import { COMPOSE } from './compose'; import { unconnectedRoutes } from './unconnected.routing'; @NgModule({ - declarations: [COMPONENTS], + declarations: [COMPONENTS, COMPOSE], imports: [ TranslocoModule, SharedModule,