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 */