추천인 추가/삭제
This commit is contained in:
		
							parent
							
								
									0794156b86
								
							
						
					
					
						commit
						a018b473bc
					
				| @ -114,11 +114,14 @@ | |||||||
|                   <td |                   <td | ||||||
|                     class="py-6 px-0 border-0" |                     class="py-6 px-0 border-0" | ||||||
|                     mat-footer-cell |                     mat-footer-cell | ||||||
|                     *matFooterCellDef |                     *matFooterCellDef="let info" | ||||||
|                     colspan="10" |                     colspan="10" | ||||||
|                   > |                   > | ||||||
|                     <div> |                     <div> | ||||||
|                       <button mat-stroked-button (click)="__onClickAdd($event)"> |                       <button | ||||||
|  |                         mat-stroked-button | ||||||
|  |                         (click)="__onClickAddBtn($event)" | ||||||
|  |                       > | ||||||
|                         추천인으로 추가 |                         추천인으로 추가 | ||||||
|                       </button> |                       </button> | ||||||
|                     </div> |                     </div> | ||||||
| @ -253,7 +256,7 @@ | |||||||
|                     <div> |                     <div> | ||||||
|                       <button |                       <button | ||||||
|                         mat-stroked-button |                         mat-stroked-button | ||||||
|                         (click)="__onClickDelete($event)" |                         (click)="__onClickRemoveBtn($event)" | ||||||
|                       > |                       > | ||||||
|                         추천인삭제 |                         추천인삭제 | ||||||
|                       </button> |                       </button> | ||||||
|  | |||||||
| @ -41,8 +41,7 @@ import { MatTableDataSource } from '@angular/material/table'; | |||||||
| import { MemberModel } from 'app/modules/proto/models/member_pb'; | import { MemberModel } from 'app/modules/proto/models/member_pb'; | ||||||
| import { ListMembersResponse } from 'app/modules/proto/c2se/member_pb'; | import { ListMembersResponse } from 'app/modules/proto/c2se/member_pb'; | ||||||
| import { SelectionModel } from '@angular/cdk/collections'; | import { SelectionModel } from '@angular/cdk/collections'; | ||||||
| import { AddComposeComponent } from '../compose/add-compose.component'; | 
 | ||||||
| import { DeleteComposeComponent } from '../compose/delete-compose.component'; |  | ||||||
| @Component({ | @Component({ | ||||||
|   selector: 'partner-recommendation-list', |   selector: 'partner-recommendation-list', | ||||||
|   templateUrl: './list.component.html', |   templateUrl: './list.component.html', | ||||||
| @ -117,6 +116,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { | |||||||
| 
 | 
 | ||||||
|   selection = new SelectionModel<MemberModel>(true, []); |   selection = new SelectionModel<MemberModel>(true, []); | ||||||
| 
 | 
 | ||||||
|  |   addBtnConfigForm!: FormGroup; | ||||||
|  |   removeBtnConfigForm!: FormGroup; | ||||||
|  | 
 | ||||||
|   private _unsubscribeAll: Subject<any> = new Subject<any>(); |   private _unsubscribeAll: Subject<any> = new Subject<any>(); | ||||||
| 
 | 
 | ||||||
|   /** |   /** | ||||||
| @ -299,18 +301,68 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { | |||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   __onClickAdd(event: MouseEvent): void { |   __addBtnConfirmConfig(): void { | ||||||
|     const dialogRef = this._matDialog.open(AddComposeComponent); |     this.addBtnConfigForm = this._formBuilder.group({ | ||||||
| 
 |       title: '알림', | ||||||
|     dialogRef.afterClosed().subscribe((result) => { |       message: '정말 추천인으로 추가하시겠습니까?', | ||||||
|       console.log('Compose dialog was closed!'); |       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 { |   __removeBtnConfirmConfig(): void { | ||||||
|     const dialogRef = this._matDialog.open(DeleteComposeComponent); |     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) => { |     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); | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user