From 6966e688043b228d718687768c43f3309b54316e Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 19 Aug 2022 10:30:29 +0000 Subject: [PATCH] =?UTF-8?q?=EA=B3=B5=EC=A7=80=EC=82=AC=ED=95=AD=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=EC=95=8C=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notice/components/list.component.html | 7 +++- .../board/notice/components/list.component.ts | 34 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/app/modules/admin/board/notice/components/list.component.html b/src/app/modules/admin/board/notice/components/list.component.html index 66eba1b..b9b81da 100644 --- a/src/app/modules/admin/board/notice/components/list.component.html +++ b/src/app/modules/admin/board/notice/components/list.component.html @@ -102,7 +102,12 @@ 숨김 - diff --git a/src/app/modules/admin/board/notice/components/list.component.ts b/src/app/modules/admin/board/notice/components/list.component.ts index 1ffa139..7aec46c 100644 --- a/src/app/modules/admin/board/notice/components/list.component.ts +++ b/src/app/modules/admin/board/notice/components/list.component.ts @@ -77,6 +77,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { private _unsubscribeAll: Subject = new Subject(); + configForm!: FormGroup; /** * Constructor */ @@ -107,6 +108,29 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { 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, + }); + // Get the products this.notices$ = this._noticeService.notices$; } @@ -142,6 +166,16 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { this.__isSearchOpened = !this.__isSearchOpened; } + __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 */