From 820f89d2502407841652b97944b9a52395e10bf5 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 19 Aug 2022 10:21:56 +0000 Subject: [PATCH] =?UTF-8?q?=EA=B2=8C=EC=9E=84=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../game/components/list.component.html | 8 ++++- .../game/components/list.component.ts | 34 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/app/modules/admin/settings/game/components/list.component.html b/src/app/modules/admin/settings/game/components/list.component.html index 85a74b2..b3796bc 100644 --- a/src/app/modules/admin/settings/game/components/list.component.html +++ b/src/app/modules/admin/settings/game/components/list.component.html @@ -84,7 +84,13 @@ 삭제 diff --git a/src/app/modules/admin/settings/game/components/list.component.ts b/src/app/modules/admin/settings/game/components/list.component.ts index 8745dc1..ca1c140 100644 --- a/src/app/modules/admin/settings/game/components/list.component.ts +++ b/src/app/modules/admin/settings/game/components/list.component.ts @@ -66,6 +66,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { private _unsubscribeAll: Subject = new Subject(); gameForm!: FormGroup; + configForm!: FormGroup; gameSettingDataSource: MatTableDataSource = new MatTableDataSource(); gameSettingTableColumns: string[] = [ @@ -105,6 +106,29 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { // Mark for check this._changeDetectorRef.markForCheck(); }); + + this.configForm = this._formBuilder.group({ + title: '알림', + message: + '정말로 삭제하시겠습니까? 삭제!', + icon: this._formBuilder.group({ + show: true, + name: 'heroicons_outline:exclamation', + color: 'warn', + }), + actions: this._formBuilder.group({ + confirm: this._formBuilder.group({ + show: true, + label: '삭제', + color: 'warn', + }), + cancel: this._formBuilder.group({ + show: true, + label: '취소', + }), + }), + dismissible: true, + }); } /** @@ -129,6 +153,16 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { // @ Private methods // ----------------------------------------------------------------------------------------------------- + __onClickRemoveBtn(event: MouseEvent, id: string): void { + // Open the dialog and save the reference of it + const dialogRef = this._fuseConfirmationService.open(this.configForm.value); + + // Subscribe to afterClosed from the dialog reference + dialogRef.afterClosed().subscribe((result) => { + console.log(result); + }); + } + /** * Create product */