diff --git a/src/app/modules/admin/member/current-user/components/list.component.html b/src/app/modules/admin/member/current-user/components/list.component.html index ff04a41..60d9aea 100644 --- a/src/app/modules/admin/member/current-user/components/list.component.html +++ b/src/app/modules/admin/member/current-user/components/list.component.html @@ -132,6 +132,7 @@ mat-flat-button class="bet-mat-small-8" [color]="'primary'" + (click)="__onClickMessage($event)" > diff --git a/src/app/modules/admin/member/current-user/components/list.component.ts b/src/app/modules/admin/member/current-user/components/list.component.ts index e705f47..bd71a05 100644 --- a/src/app/modules/admin/member/current-user/components/list.component.ts +++ b/src/app/modules/admin/member/current-user/components/list.component.ts @@ -33,6 +33,8 @@ import { CurrentUser } from '../models/current-user'; import { CurrentUserPagination } from '../models/current-user-pagination'; import { CurrentUserService } from '../services/current-user.service'; import { Router } from '@angular/router'; +import { MatDialog } from '@angular/material/dialog'; +import { MessageComposeComponent } from '../compose/message-compose.component'; @Component({ selector: 'current-user-list', @@ -102,7 +104,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { private _fuseConfirmationService: FuseConfirmationService, private _formBuilder: FormBuilder, private _currentUserService: CurrentUserService, - private router: Router + private router: Router, + private _matDialog: MatDialog ) {} // ----------------------------------------------------------------------------------------------------- @@ -230,4 +233,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/current-user/compose/index.ts b/src/app/modules/admin/member/current-user/compose/index.ts new file mode 100644 index 0000000..409003d --- /dev/null +++ b/src/app/modules/admin/member/current-user/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/current-user/compose/message-compose.component.html b/src/app/modules/admin/member/current-user/compose/message-compose.component.html new file mode 100644 index 0000000..1d55301 --- /dev/null +++ b/src/app/modules/admin/member/current-user/compose/message-compose.component.html @@ -0,0 +1,89 @@ +
+ +
+
쪽지보내기
+ +
+ + +
+
+ + 제목 + + +
+
+ + 글쓴이 + + +
+
+ + 받는이 + + +
+ + + 내용 + + + + 선택 + --선택--5008\n**입금계좌문의시(가상계좌1)****출금비밀번호문의시**----탈퇴,졸업관련----**졸업안내----입금관련문의---->>타인명의입금시----환전관련문의----**환전지연안내(환전량 + 증가)**은행점검(뱅킹장애)등으로 충환전지연안내서버점검안내서버점검완료안내 + + + +
+
+ + + + +
+
+
+
diff --git a/src/app/modules/admin/member/current-user/compose/message-compose.component.ts b/src/app/modules/admin/member/current-user/compose/message-compose.component.ts new file mode 100644 index 0000000..6a4639e --- /dev/null +++ b/src/app/modules/admin/member/current-user/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/current-user/current-user.module.ts b/src/app/modules/admin/member/current-user/current-user.module.ts index 9388804..17021a2 100644 --- a/src/app/modules/admin/member/current-user/current-user.module.ts +++ b/src/app/modules/admin/member/current-user/current-user.module.ts @@ -18,16 +18,18 @@ import { MatGridListModule } from '@angular/material/grid-list'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatRadioModule } from '@angular/material/radio'; import { MatCardModule } from '@angular/material/card'; +import { MatDialogModule } from '@angular/material/dialog'; import { TranslocoModule } from '@ngneat/transloco'; import { SharedModule } from 'app/shared/shared.module'; +import { COMPOSE } from './compose'; import { COMPONENTS } from './components'; import { currentUserRoutes } from './current-user.routing'; @NgModule({ - declarations: [COMPONENTS], + declarations: [COMPONENTS, COMPOSE], imports: [ TranslocoModule, SharedModule, @@ -50,6 +52,7 @@ import { currentUserRoutes } from './current-user.routing'; MatSlideToggleModule, MatRadioModule, MatCardModule, + MatDialogModule, ], }) export class CurrentUserModule {} diff --git a/src/app/modules/admin/member/user/components/list.component.html b/src/app/modules/admin/member/user/components/list.component.html index 1704ba6..a1e319b 100644 --- a/src/app/modules/admin/member/user/components/list.component.html +++ b/src/app/modules/admin/member/user/components/list.component.html @@ -236,7 +236,7 @@ -