파워볼 삭제알림

This commit is contained in:
이담 정 2022-08-19 10:34:56 +00:00
parent 6966e68804
commit 3300c6d579
2 changed files with 34 additions and 0 deletions

View File

@ -202,6 +202,7 @@
mat-flat-button mat-flat-button
class="bet-mat-small-8" class="bet-mat-small-8"
[color]="'warn'" [color]="'warn'"
(click)="__onClickRemoveBtn($event, powerball.id)"
> >
삭제 삭제
</button> </button>

View File

@ -79,6 +79,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
private _unsubscribeAll: Subject<any> = new Subject<any>(); private _unsubscribeAll: Subject<any> = new Subject<any>();
configForm!: FormGroup;
/** /**
* Constructor * Constructor
*/ */
@ -109,6 +110,29 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
this._changeDetectorRef.markForCheck(); this._changeDetectorRef.markForCheck();
}); });
this.configForm = this._formBuilder.group({
title: '알림',
message:
'정말로 삭제하시겠습니까? <span class="font-medium">삭제!</span>',
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 // Get the products
this.powerballs$ = this._powerballService.powerballs$; this.powerballs$ = this._powerballService.powerballs$;
} }
@ -177,6 +201,15 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
// @ Private methods // @ 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 * Create product
*/ */