From 642160f8ad9b8e18a727e0622cd8f4d063461172 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 19 Aug 2022 10:25:15 +0000 Subject: [PATCH] =?UTF-8?q?=ED=8C=9D=EC=97=85=20=EC=95=8C=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../popup/components/list.component.html | 7 +++- .../board/popup/components/list.component.ts | 34 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/app/modules/admin/board/popup/components/list.component.html b/src/app/modules/admin/board/popup/components/list.component.html index 0ecc8a2..a669dd9 100644 --- a/src/app/modules/admin/board/popup/components/list.component.html +++ b/src/app/modules/admin/board/popup/components/list.component.html @@ -112,7 +112,12 @@ > 수정 - diff --git a/src/app/modules/admin/board/popup/components/list.component.ts b/src/app/modules/admin/board/popup/components/list.component.ts index 14e12ce..c4cf4ce 100644 --- a/src/app/modules/admin/board/popup/components/list.component.ts +++ b/src/app/modules/admin/board/popup/components/list.component.ts @@ -89,6 +89,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { popupDataSource: MatTableDataSource = new MatTableDataSource(); + configForm!: FormGroup; /** * Constructor */ @@ -119,6 +120,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, + }); } /** @@ -195,6 +219,16 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { let url: string = 'board/popup/redit/' + id; this.router.navigateByUrl(url); } + + __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 */