게임설정 알림

This commit is contained in:
이담 정 2022-08-19 10:21:56 +00:00
parent f0cf02bf47
commit 820f89d250
2 changed files with 41 additions and 1 deletions

View File

@ -84,7 +84,13 @@
<th mat-header-cell *matHeaderCellDef>삭제</th> <th mat-header-cell *matHeaderCellDef>삭제</th>
<td mat-cell *matCellDef="let info"> <td mat-cell *matCellDef="let info">
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">삭제</button> <button
mat-flat-button
[color]="'primary'"
(click)="__onClickRemoveBtn($event, info.id)"
>
삭제
</button>
</div> </div>
</td> </td>
</ng-container> </ng-container>

View File

@ -66,6 +66,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
private _unsubscribeAll: Subject<any> = new Subject<any>(); private _unsubscribeAll: Subject<any> = new Subject<any>();
gameForm!: FormGroup; gameForm!: FormGroup;
configForm!: FormGroup;
gameSettingDataSource: MatTableDataSource<any> = new MatTableDataSource(); gameSettingDataSource: MatTableDataSource<any> = new MatTableDataSource();
gameSettingTableColumns: string[] = [ gameSettingTableColumns: string[] = [
@ -105,6 +106,29 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
// Mark for check // Mark for check
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,
});
} }
/** /**
@ -129,6 +153,16 @@ 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
*/ */