From a018b473bce675ab6a6a0613d208af34b6f20ae0 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 19 Aug 2022 08:36:09 +0000 Subject: [PATCH] =?UTF-8?q?=EC=B6=94=EC=B2=9C=EC=9D=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80/=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/list.component.html | 9 ++- .../components/list.component.ts | 72 ++++++++++++++++--- 2 files changed, 68 insertions(+), 13 deletions(-) diff --git a/src/app/modules/admin/member/partner-recommendation/components/list.component.html b/src/app/modules/admin/member/partner-recommendation/components/list.component.html index 3514db2..d2d5b88 100644 --- a/src/app/modules/admin/member/partner-recommendation/components/list.component.html +++ b/src/app/modules/admin/member/partner-recommendation/components/list.component.html @@ -114,11 +114,14 @@
-
@@ -253,7 +256,7 @@
diff --git a/src/app/modules/admin/member/partner-recommendation/components/list.component.ts b/src/app/modules/admin/member/partner-recommendation/components/list.component.ts index 023eb50..0186942 100644 --- a/src/app/modules/admin/member/partner-recommendation/components/list.component.ts +++ b/src/app/modules/admin/member/partner-recommendation/components/list.component.ts @@ -41,8 +41,7 @@ import { MatTableDataSource } from '@angular/material/table'; import { MemberModel } from 'app/modules/proto/models/member_pb'; import { ListMembersResponse } from 'app/modules/proto/c2se/member_pb'; import { SelectionModel } from '@angular/cdk/collections'; -import { AddComposeComponent } from '../compose/add-compose.component'; -import { DeleteComposeComponent } from '../compose/delete-compose.component'; + @Component({ selector: 'partner-recommendation-list', templateUrl: './list.component.html', @@ -117,6 +116,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { selection = new SelectionModel(true, []); + addBtnConfigForm!: FormGroup; + removeBtnConfigForm!: FormGroup; + private _unsubscribeAll: Subject = new Subject(); /** @@ -299,18 +301,68 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { }); } - __onClickAdd(event: MouseEvent): void { - const dialogRef = this._matDialog.open(AddComposeComponent); - - dialogRef.afterClosed().subscribe((result) => { - console.log('Compose dialog was closed!'); + __addBtnConfirmConfig(): void { + this.addBtnConfigForm = 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, }); } - __onClickDelete(event: MouseEvent): void { - const dialogRef = this._matDialog.open(DeleteComposeComponent); + __removeBtnConfirmConfig(): void { + this.removeBtnConfigForm = 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, + }); + } + __onClickAddBtn(event: MouseEvent): void { + // Open the dialog and save the reference of it + const dialogRef = this._fuseConfirmationService.open(); + // Subscribe to afterClosed from the dialog reference dialogRef.afterClosed().subscribe((result) => { - console.log('Compose dialog was closed!'); + console.log(result); + }); + } + __onClickRemoveBtn(event: MouseEvent): void { + // Open the dialog and save the reference of it + const dialogRef = this._fuseConfirmationService.open(); + + // Subscribe to afterClosed from the dialog reference + dialogRef.afterClosed().subscribe((result) => { + console.log(result); }); }